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

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] Length of a soundfile in a script
From: Hans Fugal (hans_AT_fugal.net)
Date: Thu Jul 08 2004 - 07:34:58 EEST


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



New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jul 08 2004 - 07:40:49 EEST