[Speex-dev] speexdec 1.2.3

Peter Grayson jpgrayson at gmail.com
Fri Apr 4 06:36:15 PDT 2008

On Fri, Apr 4, 2008 at 12:19 AM, Jean-Marc Valin
<jean-marc.valin at usherbrooke.ca> wrote:
> Jahn, Ray (R.) a écrit :
> > Dear Speex codec community:
>  >
>  > I am working on conversion of voice files.  I could not figure out how to use speexdec.exe 1.2.3 in piped mode in order to avoid the creation of the potentially large intermediate *.wav or *.pcm files.  Any pointer to web or file of instruction is appreciated.
>  >
>  > Attempt (one long command line, failed):
>  >
>  > type d:\test.spx | "d:\speex 1.2.3\bin\speexdec.exe" - - | "d:\lame 3.97\bin\lame.exe" --preset voice - - > d:\test.mp3
>  Probably the reason why this doesn't work is that by default, speexdec
>  outputs a raw file and not a wav file. So you'll want to pipe it into
>  something that adds the wav header (e.g. sox).

Alternatively, lame has a -r option which tells it to assume the input
is raw pcm (no wav headers).

I've used a command line like this to encode into mp3s:

  $ speexdec --mono --rate 8000 foo.spx - | lame -b 32 -q 9 -s 8 -m m - foo.mp3

Note that with lame 3.97 I also had to use the -x option to swap input
bytes. This was not required with lame 3.98b6.


More information about the Speex-dev mailing list