search for: speex_get_frame_size

Displaying 20 results from an estimated 83 matches for "speex_get_frame_size".

2006 Sep 15
2
Constant noise in the background in realtime data
...ode the samples and play them using openAL again. Capture and play formats for the samples is AL_FORMAT_MONO16 and frequency is 22050. we are using wide band encoding/decoding. The encoding sample frame buffer size is returned by speex as 320, on both ends ( speex_encoder_ctl(m_poSpeexState, SPEEX_GET_FRAME_SIZE, &nFrameSize) ). Coming to the problem, when I play the sound I get a high picthed noise in the background. I do hear my voice with a decreased quality but the noise keeps running in the background whether I talk or not. Here are the two main encoding/decoding function I am usin...
2006 May 21
2
Re: High pitched whine with Speex
....001 Input: -0.000 -0.000 -0.000 -0.000 0.000 Out: -0.029 -0.008 0.020 0.018 -0.001 My samples are 4 byte floats. My sample rate is 8000 Here's pretty much all my speex code: ENCODING INIT: channel->enc_state=speex_encoder_init(&speex_nb_mode); speex_encoder_ctl(channel->enc_state, SPEEX_GET_FRAME_SIZE, &channel->speexOutgoingFrameSampleCount); DECODING INIT: channel->dec_state=speex_decoder_init(&speex_nb_mode); speex_decoder_ctl(channel->dec_state, SPEEX_GET_FRAME_SIZE, &channel->speexIncomingFrameSampleCount); ENCODING: speex_encode(channel->enc_state, (float *)...
2010 Mar 19
4
Speex in flash player: how to work with?
Nicer way: void* speexState = speex_encoder_init(&speex_wb_mode); int speexFrameSize, speexRate; speex_encoder_ctl(speexState, SPEEX_GET_FRAME_SIZE, &speexFrameSize); speex_encoder_ctl(speexState, SPEEX_GET_SAMPLING_RATE, &speexRate); SpeexPreprocessState* speexPreprocessState = speex_preprocess_state_init(speexFrameSize, speexRate); Jozsef -----Original Message----- From: Max Lapshin [mailto:max.lapshin at gmail.com] Sent: Thursday...
2007 Jun 26
2
number of samples in input_frame
...0 samples left to encode (which is less than the frame_size of 160 samples), can I just use an array that contains 100 samples, or do I need to create an array containing the 100 "real" samples plus 60 null samples at the end? Let me put it one more way for clarity: is the response to SPEEX_GET_FRAME_SIZE a maximum, can I use shorter frames if I want? -Thom -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20070626/b52a1448/attachment.htm
2012 Mar 10
3
problem: The decoded frame is not as the original one
...?? { ??????? printf("%i",frame[z]); ??? printf ("? "); ??????? } /*===============================ENCODING==============================================*/ ???? speex_bits_init(&bits); ???? enc_state = speex_encoder_init(&speex_nb_mode); ???? speex_encoder_ctl(enc_state,SPEEX_GET_FRAME_SIZE,&frame_size); ???? speex_encoder_ctl(enc_state,SPEEX_SET_QUALITY,&quality); ???? speex_bits_reset(&bits); ? //-----------TWO CALLS FOR ENCODING------------------- ???? speex_encode_int(enc_state, frame, &bits);??????????????? // encoding from frame to &bits ???? nbBytes = speex_...
2008 Dec 11
1
preprocessor VAD only rocognize between silence and not silence
...ng wrong with the current. Here is the code of the compressor: if (inicializado == false) { bits = new SpeexBits; speex_bits_init(bits); enc_state = speex_encoder_init(&speex_nb_mode); // obtenemos tama?o frame speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE, &frame_size); // configuramos parametros int complexity = 5; speex_encoder_ctl(enc_state, SPEEX_SET_COMPLEXITY, &complexity); int samplingrate = 8000; speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING_RATE, &samplingrate); int quality =...
2006 May 21
3
Re: High pitched whine with Speex
...0.001 >> >> My samples are 4 byte floats. >> >> My sample rate is 8000 >> >> Here's pretty much all my speex code: >> ENCODING INIT: >> channel->enc_state=speex_encoder_init(&speex_nb_mode); >> speex_encoder_ctl(channel->enc_state, SPEEX_GET_FRAME_SIZE, >> &channel->speexOutgoingFrameSampleCount); >> >> DECODING INIT: >> channel->dec_state=speex_decoder_init(&speex_nb_mode); >> speex_decoder_ctl(channel->dec_state, SPEEX_GET_FRAME_SIZE, >> &channel->speexIncomingFrameSampleCount); >...
2009 Sep 02
3
voice sound like robot voice :)
...ame with spx_int16_t type, speex can work with float;s, but not in this engine speex_encode_int( pCodecEncoderState, (spx_int16_t*)pCodecBuffer, &codecBits ); encodedFrameBytes = (uint)speex_bits_nbytes( &codecBits ); // setup preprocessor speex_encoder_ctl( pCodecEncoderState, SPEEX_GET_FRAME_SIZE, &encoderFrameSize ); // pPreprocessorState = speex_preprocess_state_init( encoderFrameSize, sampleRate ); // speex_preprocess_ctl( pPreprocessorState, SPEEX_PREPROCESS_SET_DENOISE, &enabled ); speex_preprocess_ctl( pPreprocessorState, SPEEX_PREPROCESS_SET_VAD, &disabled...
2010 Apr 14
3
Decoded output buffer size
...at) of 640 PCM frames. In output I have 4 speex frame of 20 byte each that I put in a RPT payload of 80 bytes: UINT CSpeexCodec::Encode( float *inBuff, const char**outBuff, UINT BufferFrames ) { speex_encoder_ctl(spx_state_, SPEEX_GET_FRAME_SIZE, &spx_frame_size_); while (BufferFrames>0) { speex_bits_reset(&spx_bits_); speex_encode(spx_state_, inBuff, &spx_bits_); nbBytes += speex_bits_write(&spx_bits_, spx_enc_frame_, sp...
2009 Sep 03
1
Speex-dev Digest, Vol 64, Issue 2
...not in this engine > > speex_encode_int( pCodecEncoderState, (spx_int16_t*)pCodecBuffer, > > &codecBits ); > > encodedFrameBytes = (uint)speex_bits_nbytes( &codecBits ); > > > > // setup preprocessor > > speex_encoder_ctl( pCodecEncoderState, SPEEX_GET_FRAME_SIZE, > > &encoderFrameSize ); > > // > > pPreprocessorState = speex_preprocess_state_init( encoderFrameSize, > > sampleRate ); > > // > > speex_preprocess_ctl( pPreprocessorState, > SPEEX_PREPROCESS_SET_DENOISE, > > &enabled ); > >...
2004 Aug 06
1
Computing pcm size
Hello, given a Speex-encoded ogg file, is there a way I can compute the total pcm size (that is, the number of samples after decompression)? I know I can get the frame size from the decoder with SPEEX_GET_FRAME_SIZE, and that the number of frames per packet is written inside the header. But this brings me to the question: how many packets are there in the file? I guess this is more related to libogg than speex itself, but still I thought maybe somebody could have helped me out here. In fact, libvorbisfile has...
2006 May 21
0
Re: High pitched whine with Speex
...gt; Out: -0.029 -0.008 0.020 0.018 -0.001 > > My samples are 4 byte floats. > > My sample rate is 8000 > > Here's pretty much all my speex code: > ENCODING INIT: > channel->enc_state=speex_encoder_init(&speex_nb_mode); > speex_encoder_ctl(channel->enc_state, SPEEX_GET_FRAME_SIZE, > &channel->speexOutgoingFrameSampleCount); > > DECODING INIT: > channel->dec_state=speex_decoder_init(&speex_nb_mode); > speex_decoder_ctl(channel->dec_state, SPEEX_GET_FRAME_SIZE, > &channel->speexIncomingFrameSampleCount); > > ENCODING: > s...
2007 Apr 11
0
Problem with speex
...Pointer; decframe: integer; buffEnc: array of single; buffDec: array of single; encstate := speex_encoder_init(speex_lib_get_mode(SPEEX_MODEID_WB)); speex_encoder_ctl(encstate,SPEEX_SET_SAMPLING_RATE,@smpRt); speex_encoder_ctl(encstate,SPEEX_SET_QUALITY,@n); speex_encoder_ctl(encstate,SPEEX_GET_FRAME_SIZE,@encframe); speex_bits_init(@encbits); SetLength(buffEnc,encframe); enh:=0; speex_bits_init(@decbits); decstate := speex_decoder_init(speex_lib_get_mode(SPEEX_MODEID_WB)); speex_decoder_ctl(decstate,SPEEX_GET_FRAME_SIZE,@decframe); speex_decoder_ctl(decstate,SPEEX_SET_ENH,@enh); SetLength(buffDec,d...
2009 Apr 13
0
encoding -> decoding doesnt work
...rt noise is all I get. I hope you have any ideas! kind regards juergen SpeexBits bits; void *enc_state; speex_bits_init(&bits); const SpeexMode *mode; mode = speex_lib_get_mode (SPEEX_MODEID_WB); enc_state = speex_encoder_init(mode); int frame_size = 0; speex_encoder_ctl(enc_state,SPEEX_GET_FRAME_SIZE,&frame_size); int tmp = 16000; speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING_RATE, &tmp); tmp = 4; speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &tmp); tmp = 1; speex_encoder_ctl(enc_state, SPEEX_SET_VBR, &tmp); tmp = 4; speex_encoder_ctl(enc_state, SPEEX_SET_VBR_QUALI...
2010 Mar 30
0
Speex in flash player: how to work with?
On Sat, Mar 20, 2010 at 12:04 AM, Jozsef Vass <jovass at adobe.com> wrote: > Nicer way: > > void* speexState = speex_encoder_init(&speex_wb_mode); > int speexFrameSize, speexRate; > speex_encoder_ctl(speexState, SPEEX_GET_FRAME_SIZE, &speexFrameSize); > speex_encoder_ctl(speexState, SPEEX_GET_SAMPLING_RATE, &speexRate); > SpeexPreprocessState* speexPreprocessState = speex_preprocess_state_init(speexFrameSize, speexRate); > Jozsef, would you kindly help me. Both, this code: _microphone = Microphone.getMicrop...
2010 Mar 31
1
Speex in flash player: how to work with?
...ect: Re: [Speex-dev] Speex in flash player: how to work with? On Sat, Mar 20, 2010 at 12:04 AM, Jozsef Vass <jovass at adobe.com> wrote: > Nicer way: > > void* speexState = speex_encoder_init(&speex_wb_mode); > int speexFrameSize, speexRate; > speex_encoder_ctl(speexState, SPEEX_GET_FRAME_SIZE, &speexFrameSize); > speex_encoder_ctl(speexState, SPEEX_GET_SAMPLING_RATE, &speexRate); > SpeexPreprocessState* speexPreprocessState = speex_preprocess_state_init(speexFrameSize, speexRate); > Jozsef, would you kindly help me. Both, this code: _microphone = Microphone.getMicrop...
2010 Jun 10
0
speex multi frame
...eOut, SPEEX_SET_QUALITY, &nQuality); //speex_encoder_ctl(m_pSpeexEncStateOut, SPEEX_SET_VBR, &nEhc); //speex_encoder_ctl(m_pSpeexEncStateOut, SPEEX_SET_VAD, &nEhc); //speex_encoder_ctl(m_pSpeexEncStateOut, SPEEX_SET_DTX, &nEhc); speex_encoder_ctl(m_pSpeexEncStateOut, SPEEX_GET_FRAME_SIZE, &m_nEncodeFrameSize); // speex_bits_init(&m_speexBitsIn); m_pSpeexDecStateIn= speex_decoder_init(&speex_nb_mode); speex_decoder_ctl(m_pSpeexDecStateIn, SPEEX_GET_FRAME_SIZE, &m_nDecodeFrameSize); } int CSpeexCodec::Decode(const char* pcIndata, int nIndataSize,...
2004 Aug 06
1
LIB usage
...9;t do it. I've made just like the example (on the site) says. Some times I get SIGFAULT. Also, I'm reading the input_frames from /dev/dsp (directly). What is missing here? speex_bits_init(&bits); enc_state = speex_encoder_init(&speex_nb_mode); speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE, &frame_size); for(n=0; n<100; n++) { read_from_dev(fd1, (float *)input_frame, 1024); speex_bits_reset(&bits); speex_encode(enc_state, input_frame, &bits); nBytesFrame = speex_bits_nbytes(&bits); nbBytes = speex_bits_write(&bits, byte_ptr, nByte...
2005 Jan 17
2
Programming questions
...of encoder. This situation arise when the coded data for a duration greater than the frame size of decoder are used. Should I call some integer number of times the decoding procedure (like it is done in the java code of Speex). 4) What is the difference "SPEEX_GET_FRAME_SIZE" and "SPEEX_MODE_FRAME_SIZE" operations. This should not be identical since these operations are provided by two different functions but I don't see any explanation of a difference in the documentation. Iwould greatly appreciate If somebody h...
2004 Aug 06
0
About sample code
...like speex provide , as follows: SpeeXCodec::SpeeXCodec() { rate = 8000; speex_bits_init(&enbits); speex_bits_init(&debits); enc_state = speex_encoder_init(&speex_nb_mode); dec_state = speex_decoder_init(&speex_nb_mode); // set option for encoder speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE, &frame_size); speex_encoder_ctl(enc_state, SPEEX_SET_COMPLEXITY, &complexity); speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING_RATE, &rate); int tmp=8; speex_encoder_ctl(enc_state,SPEEX_SET_QUALITY,&tmp); // set option for decoder speex_decoder_ctl(dec_state, SPEEX_GET...