search for: speex_decode

Displaying 20 results from an estimated 155 matches for "speex_decode".

2004 Aug 06
1
auto-detection of frame boundary
I tried feeding in the 3 encoded frame in ONE BLOCK, and calling speex_decode() 3 times in a roll. Only the 1st frames came out perfectly. For the other 2, I got "corrupt" frame warning. I was supposed to get 38 bytes consumed each frame (narrow-band, VBR off). I tried speex_bits_remaining() to peek on the # of bits consumed, and got variable (clearly wrong)#s...
2004 Aug 06
2
What is the format of the PCM/WAV dataforspeex_encode & speex_decode?
...ed. Should I post the errors here? <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:42 AM To: speex Subject: RE: [speex-dev] What is the format of the PCM/WAV dataforspeex_encode & speex_decode? Le ven 16/04/2004 à 16:39, Kenji Chan a écrit : > Ok, I'm using 1.1.4, so I should pass signed short(wav data) directly to > speex_encode()? First, I'd like to ak why you want to use 1.1.4. If you don't need the new features (fixed-point or preprocessor), you should probably st...
2004 Aug 06
2
What is the format of the PCM/WAV data forspeex_encode & speex_decode?
...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' contai...
2004 Aug 06
0
What is the format of the PCM/WAV dataforspeex_encode & speex_decode?
...ntered. - Abhishek <p><p><p>---------- Original Message ----------- From: "Kenji Chan" <adslbqmr@tpg.com.au> To: <speex-dev@xiph.org> Sent: Sat, 17 Apr 2004 07:09:47 +1000 Subject: RE: [speex-dev] What is the format of the PCM/WAV dataforspeex_encode & speex_decode? > I thought it would be more update/better/faster, any thing wrong? > In the future, would you use short, and forget about float? > If so, I use 1.1.4, I wouldn't need to change my code in the future, > right? > > You said, it's unstable, yes, I got compiling errors wi...
2004 Aug 06
3
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 sa...
2004 Aug 06
3
Multiple Frames per Packet
David, Here's the trick ... do this just before your speex_bits_write(): speex_bits_insert_terminator(&bits); Then, when decoding, keep calling speex_decode() until it returns -1 or speex_bits_remaining(&bits) returns 0. Works for me, anyway. Tom David Barrett (dbarrett@quinthar.com) wrote: > > Hi, I'm using Speex and I want to pack multiple frames into a single > packet. The manual (section 4.5) says to call "speex_encode()&q...
2010 Apr 11
2
Is Speex 1.0 and >=1.1 compatible?
...n the decoder temporarily as a test and voil?, it works! The problem seem to be some incompatibility in the termination handling. After processing exactly four frames the number of remaining bits can be anything from zero to seven which I guess is normal. However, if I use the while loop below, speex_decode will get called one more time (a total of five times) and that seem to mess up the decoder state. The decoded audio get sort of "bubbly". while ((speex_decode(dec_state,&bits, samples) == 0) && (speex_bits_remaining(&bits) >= 0)) {} As far as I can see, th...
2010 Apr 10
2
Is Speex 1.0 and >=1.1 compatible?
...er have looked like this for quite a while: void AudioDecoderSpeex::writeEncodedSamples(void *buf, int size) { char *ptr = (char *)buf; speex_bits_read_from(&bits, ptr, size); float samples[frame_size]; #if SPEEX_MAJOR > 1 || (SPEEX_MAJOR == 1 && SPEEX_MINOR >= 1) while (speex_decode(dec_state, &bits, samples) == 0) #else while ((speex_decode(dec_state, &bits, samples) == 0) && (speex_bits_remaining(&bits) > 0)) #endif { for (int i=0; i<frame_size; ++i) { samples[i] = samples [i] / 32767.0; } sinkWriteSamples(samples,...
2004 Aug 06
1
speex_decode() doesn't empty buffer in u-wideband and quality 4
Hello there I'm having trouble decoding speex frames when using 32KHz audio and quality setting 4. If I encode three frames and then decode the three frames then the speex_bits_remaining() still reports that there are bits remaining. All other band modes and qualities reports that the buffer is emptied. Here's an example that shows 4 bits remaing in the buffer after the frames have
2010 Apr 15
2
Decoded output buffer size
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 15/04/2010 01:30, Conrad Parker wrote: > >> But how can I know the size of each speex frame into a multiframe payload? > > use speex_bit_read_from() just once on the packet, then call > speex_decode() once for each frame. > > Conrad. Thanks for the reply, Conrad. What is not clear for me (and I didn't found it on the manual) is how to decode a multi-frame payload. Once have called speex_bits_read_from, I need a way to know how many speex frames there are, how can I do this? I try...
2004 Aug 06
0
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* > > &...
2004 Aug 06
0
What is the format of the PCM/WAV data forspeex_encode & speex_decode?
...data) directly to > speex_encode()? First, I'd like to ak why you want to use 1.1.4. If you don't need the new features (fixed-point or preprocessor), you should probably stick to 1.0.3, which has received more testing. If you choose to use 1.1.4, you need to send shorts to speex_encode/speex_decode. > 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() The document hasn't been updated for 1.1.x. Jean-Marc -- Jean-Marc Valin http://www.xiph.org/~jm/ LABORIUS Université de Sherbrooke, Québec, Canada...
2004 Aug 06
1
Packet Loss
I've just started testing Speex, and it seems very good so far. In testing the Speex decoder and simulating packet loss, I noticed that simply not calling speex_decode(st, NULL, output) when a packet is dropped doesn't appear to degrade the quality of the audio later on. The reason for this test is that in a real-time situation, you may not know right away when a packet is dropped vs. just out of order, etc. Plus, I wanted to see if it was necessary t...
2007 Dec 21
1
Continous decoding of several audio files without destroying speex_decoder
...e is a problem in the way we uses speex decoder API. Basically, we initialize speex decoder only once and just reset the decoder before we decoding another file. Do we need to intialize speex decoder and destory decoder for each audio file decoding ? Here is current pseudo code. main() { m_speex = speex_decoder_init(speex_nb_mode); speex_decoder_ctl(m_speex, SPEEX_SET_ENH, &tmp); speex_bits_init(&m_bits); while(end of files) { speex_decoder_ctl(m_speex, SPEEX_RESET_STATE, &tmp); speex_bits_reset(&m_bits); OpenFile(speex audio file); while(end of file) { fread(speex...
2010 Apr 11
0
Is Speex 1.0 and >=1.1 compatible?
...mporarily as a test and voil?, it works! The problem > seem to be some incompatibility in the termination handling. After processing > exactly four frames the number of remaining bits can be anything from zero to > seven which I guess is normal. However, if I use the while loop below, > speex_decode will get called one more time (a total of five times) and that > seem to mess up the decoder state. The decoded audio get sort of "bubbly". > > while ((speex_decode(dec_state,&bits, samples) == 0)&& > (speex_bits_remaining(&bits)>= 0)) {} > &g...
2004 Nov 15
2
Jitter buffer
...> >> > >Yes, this jitter buffer is adaptive. There are still some improvements >left to do (e.g. making sure packets are dropped/interpolated during >silent periods), but it's already working good. > >As for being Speex-dependent, I'd say yes and no. It calls speex_decode, >which is a Speex "virtual" function, so it would be rather simple to >wrap any other codec to make it work like that. If you're interested, I >can provide help doing that. > > OK, I'm actually about ready to start working on this now. If people in the speex com...
2004 Aug 06
1
draft-herlein-speex-rtp-profile-01
Ok, I figured it out. :) This seems to work: 1) Call speex_bits_read_from() once, specifying the location in memory of the compressed data, and the total length of that data. 2) Keep calling speex_decode() until speex_bits_remaining() returns 0. Then you don't have to keep track of the # of frames per packet, or the size of each compressed frame. It's done magically by the codec. I now see that in section 4.5 of SpeexManual.pdf it touches on this briefly, and mentions a terminator co...
2005 Oct 17
6
Error Executing sampledec in VC++
...in SPXDEC.exe: 0xC0000005: Access violation reading location 0x0000000c. Unhandled exception at 0x004010fa in SPXDEC.exe: 0xC0000005: Access violation reading location 0x0000000c. It looks like the same error. I've attached the code below Thanks, Mon Portion of the revised code: decstate = speex_decoder_init (&speex_nb_mode); // Set default options for decoding: temp = 1; speex_decoder_ctl(decstate, SPEEX_SET_ENH, &temp); // Initialize spxbits (structure SpeexBits) speex_bits_init (&spxbits); while (!(feof(fo))) // this is where the problem starts { fread (&nbBytes, sizeof(int),...
2004 Aug 06
1
auto-detection of frame boundary
...appendix C, of Jean-Marc's Speex Codec Manual, verison 1.0), "it's only necessary to consider the sequence of bits as output by the Speex encoder, and present the same sequence to the decoder", I kind of got the impression that length-prefix PER FRAME is not necessary, as long as speex_decode() is called 3 times. Is this true ? Thanks all, Tongbiao Li <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 onl...
2004 Aug 06
0
Multiple Frames per Packet
Hi, I'm using Speex and I want to pack multiple frames into a single packet. The manual (section 4.5) says to call "speex_encode()" multiple times before calling "speex_bits_write()", and then call "speex_decode()" until it returns -1. However, when I try that "speex_decode()" never returns -1, and it enters an infinite loop. I'm using 1.0.4. Any suggestions? Surely this isn't a new question. (Incidentally, the Xiph.org archives of this mailing list appear to be offline. Where a...