[speex-dev] Speex, what container?
Jean-Marc Valin
Jean-Marc.Valin at USherbrooke.ca
Thu Mar 4 09:08:26 PST 2004
Unless you have a good reason not to do so, I thing you should use Ogg.
That's the standard format everybody will be able to play.
Jean-Marc
Le jeu 04/03/2004 à 11:26, miguel.gomes a écrit :
> The aplication that I am developing is like a sound recorder (goes directly to the soundboard and start capturing the sound and writing the file, using the directsound api). I'm already capable of writing to normal wav files but I wanted to encode the audio with speex to have smaller size (and still good quality).
>
> How can I write the wav files with speex content using the ACM codec? (like windows sound recorder)
>
> Do you think that it is much more complicated than just writing it with the ogg format?
>
> Thanks a lot for your help.
>
> Miguel Gomes
>
> -----Mensagem original-----
> De: owner-speex-dev at xiph.org em nome de Christian Buchner
> Enviada: qui 04-03-2004 16:09
> Para: speex-dev at xiph.org
> Cc:
> Assunto: Re: [speex-dev] Speex, what container?
>
>
>
>
>
>
> > But using the ACM codec I just need to put the speex content into the wave file data chunk and then
> > windows will play it?
>
> Typically it is the application like for example Windows Sound Recorder that creates the AVI/WAVE file
> and writes it to disk. After installing the ACM you can simply start recording with any application that
> supports recording to WAVE files. Windows Sound Recorder, GoldWave come to my mind.
>
> The packaging of speex frames into the data chunk is not trivial. It slightly more complicated than concatenating
> individual speex audio frames. For efficiency, I grouped several audio frames into blocks. Depending on the
> speex mode, these groups have different sizes. This minimizes bit padding loss. Also to be compatible with the
> ACM you need to create a WAVEFORMATEX header that is exactly like in my ACM.
>
> I recommend against using the Speex API to create wave files that try to be playable with the ACM.
> Way too mouch trouble.
>
> Of course you could write a program that talks directly to the ACM and then create the WAVE file based
> on the data returned by the ACM (for example using the AVIFile API provided by Windows). But that
> is quite complicated. Definitely more troublesome than if you just used using the native speex API and the
> suggested ogg container format (see speexenc.c)
>
> Christian
>
>
> --- >8 ----
> List archives: http://www.xiph.org/archives/
> Ogg project homepage: http://www.xiph.org/ogg/
> To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
> containing only the word 'unsubscribe' in the body. No subject is needed.
> Unsubscribe messages sent to the list will be ignored/filtered.
>
--
Jean-Marc Valin, M.Sc.A., ing. jr.
LABORIUS (http://www.gel.usherb.ca/laborius)
Université de Sherbrooke, Québec, Canada
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Ceci est une partie de message numériquement signée.
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040304/b9e9e418/signature-0001.pgp
More information about the Speex-dev
mailing list