[linux-audio-dev] Length of a soundfile in a script

Hans Fugal hans at fugal.net
Thu Jul 8 04:34:58 UTC 2004


I thought sox might be able to do it but I don't see it if it's there. I
want to know how long (in time) an audio file is. Preferably output the
number of seconds or some fraction thereof to stdout, and preferably can
handle a large variety of sound types like sox (but if not, I can use
sox). 

I know I could use sox to output raw and get the size of the resulting
file and do a little arithmetic, but that would be silly if there's a
utility for doing this sort of thing.

Why? I have my computer as an answering machine, and don't want to be
bothered with hangups (very short messages). BTW, an answering machine
is great fun to mess with all sorts of audio things, especially the
beeps. :-)

-- 
 .O.  Hans Fugal            | De gustibus non disputandum est.
 ..O  http://hans.fugal.net | Debian, vim, mutt, ruby, text, gpg
 OOO                        | WindowMaker, gaim, UTF-8, RISC, JS Bach
---------------------------------------------------------------------
GnuPG Fingerprint: 6940 87C5 6610 567F 1E95  CB5E FC98 E8CD E0AA D460
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20040707/3906452a/attachment.pgp>


More information about the Linux-audio-dev mailing list