From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0BMmZDO014918 for ; Mon, 11 Jan 2010 17:48:35 -0500 Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.6]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0BMmTqg014249 for ; Mon, 11 Jan 2010 17:48:29 -0500 Received: from mail-yw0-f200.google.com (mail-yw0-f200.google.com [209.85.211.200]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0BMmCUL026960 for ; Mon, 11 Jan 2010 17:48:13 -0500 Received: by ywh38 with SMTP id 38so21268248ywh.6 for ; Mon, 11 Jan 2010 14:48:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:subject :in-reply-to:references:comments:date; bh=HXXycUUlphL9PCbmG2UGfXSMt28fs+7T45ZoZD94AX0=; b=L4bR4DuML1h5k61a5ZW/wxC4fYXX2hy5B2zX33tIGNvtjSBBU9WANDZ/Gb0EU+E5JP A/ejUBJlyNPzNI0Cv7XKaSW8ZbxeDr12q3Ex9FSC89Fv7t0pSgVtTkai3okycs+s0KKG de9EmP2rqLqbLupwxxlmXbttp5f4M7lWkyoZA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:subject:in-reply-to:references:comments:date; b=gST7plp1QUgp8rd503RkxK4M/KDl1OO81BFFVyW5wBPuORMpBmJNi0KVfuNEQ1To2Z +NnpQQKRkGggdhbR2Dgzs1b22atxZcfQv1xC3ebrXJ2QG+JC/shjTYvtEcvyevOjffdH AkkUEkXHHYsEiDYQSOZhyU3QIIdRI3rrTGAXs= Received: by 10.151.89.31 with SMTP id r31mr6690136ybl.99.1263250092506; Mon, 11 Jan 2010 14:48:12 -0800 (PST) Received: from localhost (ip24-253-221-18.ok.ok.cox.net [24.253.221.18]) by mx.google.com with ESMTPS id 6sm9102760ywc.54.2010.01.11.14.48.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 11 Jan 2010 14:48:11 -0800 (PST) Message-ID: <4b4baaab.0603c00a.7198.ffffff20@mx.google.com> From: Chris Brannon To: Linux for blind general discussion Subject: Re: analyze a .wav or .mp3 file In-reply-to: <201001112126.o0BLQh88029576@mx1.redhat.com> References: <201001112126.o0BLQh88029576@mx1.redhat.com> Comments: In-reply-to Terry Klarich message dated "Mon, 11 Jan 2010 15:06:51 -0600." Date: Mon, 11 Jan 2010 16:48:15 -0600 X-RedHat-Spam-Score: -0.007 (AWL,RCVD_IN_DNSWL_NONE) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.6 X-loop: blinux-list@redhat.com X-BeenThere: blinux-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: Linux for blind general discussion List-Id: Linux for blind general discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 22:48:35 -0000 Terry Klarich wrote: > I would like to see if anyone has an idea how to analyze a wav or mp3 file in > a shell script to see if there is any audio present; > or, it is a blank file. The command-line syntax of sox changed. As of version 14.3.0, it is sox whatever.wav -n stat, instead of -e stat. Here's some sample output generated by an audio file of mine. Note that the data is written to stderr. Samples read: 215560756 Length (seconds): 9775.998005 Scaled by: 2147483647.0 Maximum amplitude: 1.000000 Minimum amplitude: -1.000000 Midline amplitude: -0.000000 Mean norm: 0.073211 Mean amplitude: -0.000002 RMS amplitude: 0.119737 Maximum delta: 1.026207 Minimum delta: 0.000000 Mean delta: 0.019383 RMS delta: 0.035299 Rough frequency: 1034 Volume adjustment: 1.000 The volume adjustment number always seemed helpful when looking for a blank file. It is much greater than 1.00 if the file contains silence. The other statistics are probably useful as well, but I don't know very much about digital audio. -- Chris PS. I think that you and I have a few common acquaintances outside of the net. I caught mention of your name several times when I was pursuing an undergrad CS degree. 73 DE KB5KZZ