Kenji Chan
2004-Aug-06 15:02 UTC
[speex-dev] What is the format of the PCM/WAV data for speex_encode & speex_decode?
I'm confused about the format of the PCM/WAV data for speex_encode & speex_decode speex_encode(enc_state, input_frame, &bits); In the manual, it says "input_frame is a (float *) pointing to the beginning of a speech frame" (for encode) But I've found that in speexenc.c and testenc.c, short* is used instead of float* So, isn't it signed 16 bit samples(if 16bit) or float? For vorbis, I have to convert signed 16bit to float before encoding, how's about speex? <p><p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Steve Kann
2004-Aug-06 15:02 UTC
[speex-dev] What is the format of the PCM/WAV data for speex_encode & speex_decode?
Kenji Chan wrote:> I'm confused about the format of the PCM/WAV data for speex_encode & > speex_decode > > speex_encode(enc_state, input_frame, &bits); > > In the manual, it says "input_frame is a (float *) pointing to the > beginning of a speech frame" (for encode) > > But I've found that in speexenc.c and testenc.c, short* is used > instead of float* > > > > So, isn't it signed 16 bit samples(if 16bit) or float? > > For vorbis, I have to convert signed 16bit to float before encoding, > how's about speex? > > > > >It changed between speec 1.0 and 1.1. 1.1 (and CVS) uses short, but 1.0 uses float. I believe that the floats should be in the range of short (i.e -32k to 32k). <p><p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Kenji Chan
2004-Aug-06 15:02 UTC
[speex-dev] What is the format of the PCM/WAV data forspeex_encode & speex_decode?
Ok, I'm using 1.1.4, so I should pass signed short(wav data) directly to speex_encode()? But the samplecode that comes with 1.1.4 shows me to put short in float array, and pass the float array to speex_encode() <p>-----Original Message----- From: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org] On Behalf Of Jean-Marc Valin Sent: Saturday, April 17, 2004 6:25 AM To: speex Subject: Re: [speex-dev] What is the format of the PCM/WAV data forspeex_encode & speex_decode? Speex 1.0.3 uses floats, but the unstable version 1.1.x uses short. Jean-Marc <p>--- >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@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
2004-Aug-06 15:02 UTC
[speex-dev] What is the format of the PCM/WAV data for speex_encode & speex_decode?
Speex 1.0.3 uses floats, but the unstable version 1.1.x uses short. Jean-Marc Le ven 16/04/2004 16:04, Kenji Chan a crit :> Im confused about the format of the PCM/WAV data for speex_encode & > speex_decode > > speex_encode(enc_state, input_frame, &bits); > > In the manual, it says input_frame is a (float *) pointing to the > beginning of a speech frame (for encode) > > But Ive found that in speexenc.c and testenc.c, short* is used > instead of float* > > > > So, isnt it signed 16 bit samples(if 16bit) or float? > > For vorbis, I have to convert signed 16bit to float before encoding, > hows about speex? > > > >-- Jean-Marc Valin http://www.xiph.org/~jm/ LABORIUS Universit de Sherbrooke, Qubec, 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 numriquement signe. Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040416/d14a32ea/signature-0001.pgp
Maybe Matching Threads
- What is the format of the PCM/WAV dataforspeex_encode & speex_decode?
- What is the format of the PCM/WAV data for speex_encode & speex_decode?
- What is the format of the PCM/WAV data forspeex_encode & speex_decode?
- What is the format of the PCM/WAV dataforspeex_encode & speex_decode?
- What is the format of the PCM/WAV data for speex_encode & speex_decode?