[Speex-dev] sampleenc/sampledec

Gervase Markham gerv at gerv.net
Mon Jan 3 09:19:00 PST 2005

I can't get the versions of sampleenc and sampledec in the manual to 
work back-to-back. I've tried using speex 1.0.4 and 1.1.6. What am I 
doing wrong?

[gerv at otter]$ file in.wav
in.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, 
mono 8000 Hz

Strip headers:
[gerv at otter]$ sox in.wav in.raw

Command as given on manual page:
[gerv at otter]$ ./sampleenc in.raw | ./sampledec out.raw

Re-add headers:
[gerv at otter]$ sox -r 8000 -w -s out.raw out.wav

If I then play back out.wav using mplayer, I get a horrible noise - a 
continuous loud hum with bursts of static where the speech was.

Converting in.raw to a temporary wav file (using that last command-line) 
and playing it back works fine. So the sampleenc/sampledec pair is doing 
something funny to my data.

Looking at the audio waveform using audacity, it looks like some sort of 
overflow/wrapping problem...


More information about the Speex-dev mailing list