[Speex-dev] file couldn't play after Speex encode and decode

John Edwards john.edwards33 at ntlworld.com
Fri Jul 13 04:12:15 PDT 2007


I suggest that you write the command line as Jean-Marc suggested:

speexenc sample.wav - | speexdec - sample_out.wav

I have tested this and it works as expected. You need to specify the '-'
for stdin and also for stdout.

John

As an aside, I notice that the wave output from speexdec does not write
the wave file header when the output is destined for stdout. I believe
this is incorrect and that the first write of the header should be
performed so that the output can be identified. Clearly the subsequent
seeks to rewrite the header information should only be performed on a
'real' output file.

鲍 wrote:
> 
> thank you,sir!But I don't konw how to add the file header.Could you help me?
> 2007/7/12, John Edwards <john.edwards33 at ntlworld.com 
> <mailto:john.edwards33 at ntlworld.com> >:
> 
>     This is because the output file has been written without the 44 byte
>     wave file header.
> 
>     John
> 
>     鲍 wrote:
>      > Dear sir,
>      > I've a problem that the .wav file couldn't play after calling
>     "sampleenc
>      > male.wav|sampledec male_speex_15.wav".I found that the new file
>      > male_speex_15.wav is smaller than the original file in size.I
>      > implemented the test on Linux system.The original file male.wav
>     is 96044
>      > bytes,while the new file male_speex_15.wav is 96000 bytes.I'm
>     eager to
>      > know the reason.Thank you!
>      >
>      > sincerely,
>      > Weiqin Bao
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Speex-dev mailing list
>      > Speex-dev at xiph.org <mailto:Speex-dev at xiph.org>
>      > http://lists.xiph.org/mailman/listinfo/speex-dev
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > No virus found in this incoming message.
>      > Checked by AVG Free Edition.
>      > Version: 7.5.476 / Virus Database: 269.10.4/897 - Release Date:
>     11/07/2007 21:57
> 
> 
> 
> ------------------------------------------------------------------------
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.476 / Virus Database: 269.10.4/898 - Release Date: 12/07/2007 16:08


More information about the Speex-dev mailing list