search for: speex_preprocess_state_init

Displaying 20 results from an estimated 53 matches for "speex_preprocess_state_init".

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, March 18, 2010 10:57 PM To: Jozsef Vass Cc: speex-dev at xiph.org Subject: Re: [Speex-dev] Speex in flash player: how to work with? On Fri, Mar 19, 2010 at 3:27 AM,...
2010 Feb 09
1
Stereo AEC
Hi, Can anybody show me how to enable stereo AEC, I tried with the following code and the result is bad, degraded output. Init: ec_state = speex_echo_state_init_mc(frame_size, aec_tail, 2, 2); speex_echo_ctl(ec_state, SPEEX_ECHO_SET_SAMPLING_RATE, &sample_rate); preprocess_state_left = speex_preprocess_state_init(frame_size, sample_rate); preprocess_state_right = speex_preprocess_state_init(frame_size, sample_rate); speex_preprocess_ctl(preprocess_state_left , SPEEX_PREPROCESS_SET_ECHO_STATE, ec_state ); speex_preprocess_ctl(preprocess_state_right , SPEEX_PREPROCESS_SET_ECHO_STATE, ec_state ); AEC: speex...
2007 Dec 06
2
Some question about speexcodex 1.2 beta2 on linux
..._SET_VAD, &nOff); speex_encoder_ctl(state,SPEEX_SET_DTX, &nOn); speex_encoder_ctl(state,SPEEX_SET_MODE,&m_encMode); speex_encoder_ctl(state,SPEEX_SET_BITRATE,&m_bitrate); // speex_encoder_ctl(state, SPEEX_SET_QUALITY, &tmp); m_preProcesser = speex_preprocess_state_init(m_frame_size, 8000); speex_preprocess_ctl(m_preProcesser, SPEEX_PREPROCESS_SET_DENOISE, &m_iDenoise); speex_preprocess_ctl(m_preProcesser, SPEEX_PREPROCESS_SET_AGC, &m_iAGC); fin = fopen("test.pcm", "r+b"); fout = fopen("out.spx&quot...
2010 Mar 19
2
Speex in flash player: how to work with?
First of all, Flash Player can only publish Speex at 16 kHz. 20 ms of audio (320 samples) will result in compressed payload size of 106 bytes (42.4 kbps). When Flash Player sends a TC message, there is 11 bytes TC message header and a single byte of audio message header. For more information, please see ActionScript 3 reference http://help.adobe.com/en_US/AS3LCR/Flash_10.0/ Jozsef
2004 Aug 06
2
Question about SPEEX_PREPROCESS_SET_DENOISE
I just download the 1.1.5. And it is working well. I try the xxx_int functions at least it works. But I did not find the performance improvement. But when I try this: m_pPreprocess= speex_preprocess_state_init(m_nSamplesPerFrame, m_nSampleRate); speex_preprocess_ctl(m_pPreprocess, SPEEX_PREPROCESS_SET_DENOISE, &tmp); and add speex_preprocess(m_pPreprocess, buf, NULL); before encode. The result is really unacceptable. I think there must be something wrong. And for the encode I...
2005 Oct 11
1
noise when passing trougth speex_preprocess
Hi all, as in subject, speex_preprocess inject noise in my data. Someone can help ? Here's the way that i'm using: #define NN 160 /* 20msec di audio */ #define AUDIO_SAMPLERATE 8000 spx_int16_t TEMP_Buffer[NN]; speex_pp_state = speex_preprocess_state_init(NN,AUDIO_SAMPLERATE); c = denoise; speex_preprocess_ctl(speex_pp_state, SPEEX_PREPROCESS_SET_DENOISE,&c); c = agc; speex_preprocess_ctl(speex_pp_state, SPEEX_PREPROCESS_SET_AGC, &c); if(agc) { float t; t = agc_level * 3276; speex_preprocess_ctl(speex_pp_state,SPEEX_PREPROCESS_SET_AGC_LEVEL,...
2007 Jan 08
1
VAD in preprocessor
...that sound, there is a defect). To overcome this problem, are SPEEX_PREPROCESS_SET_PROB_START, SPEEX_PREPROCESS_SET_PROB_CONTINUE parameters or other anything useful? int param_enabled = 1; int param_disabled = 0; int sampling_rate = 8000; SpeexPreprocessState *preprocess; preprocess = speex_preprocess_state_init(frame_size, sampling_rate); /* frame_size = 160 */ speex_preprocess_ctl(preprocess, SPEEX_PREPROCESS_SET_DENOISE, &param_enabled); speex_preprocess_ctl(preprocess, SPEEX_PREPROCESS_SET_VAD, &param_enabled); speex_preprocess_ctl(preprocess, SPEEX_PREPROCESS_SET_AGC, &param_disabled);...
2008 Jan 07
2
Problem related to Voice activity detection
...ity to detect voice activity in voice stream and then record only portion of this stream which contains the activity. i went through these steps. 1. Captured voice through Waveform Functions of Windows Multimedia API 2. Started Speex Preprocessing liberary 3. Turned on preprocessor by calling speex_preprocess_state_init and passing it 20 ms frame size and sampling rate 4. Set VAD on 5. Copied byte data into __int16 variables and passed it to speex_preprocess_run function. in return of these steps i got wrong date back to me. could you please send me the sample code or could you identify the problem? i...
2008 Aug 23
1
Echo canceller
...ifferent that the 'output' in capture) buffer store the last frame audio to be used later on capture (look on capture) Echo and preprocess states are conveniently initiated using speex_echo_state_init(fpb,fpb*25) and speex_echo_ctl(es,SPEEX_ECHO_SET_SAMPLING_RATE,&sr) (and, of course speex_preprocess_state_init) Echo state is associated with preprocess state using SPEEX_PREPROCESS_SET_ECHO_STATE What is wrong?
2010 Feb 10
0
Speex-dev Digest, Vol 69, Issue 8
...enable stereo AEC, I tried with the > following code and the result is bad, degraded output. > > Init: > > ec_state = speex_echo_state_init_mc(frame_size, aec_tail, 2, 2); > speex_echo_ctl(ec_state, SPEEX_ECHO_SET_SAMPLING_RATE, &sample_rate); > > preprocess_state_left = speex_preprocess_state_init(frame_size, > sample_rate); > preprocess_state_right = speex_preprocess_state_init(frame_size, > sample_rate); > > speex_preprocess_ctl(preprocess_state_left , > SPEEX_PREPROCESS_SET_ECHO_STATE, ec_state ); > speex_preprocess_ctl(preprocess_state_right , > SPEEX_PREPROCESS_S...
2010 Mar 30
0
Speex in flash player: how to work with?
...oid* 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.getMicrophone(); _microphone.setSilenceLevel(0); _microphone.codec = SoundCodec.SPEEX; _microphone.encodeQuality = 10; _microphone.rate = 16; _microphone.framesPerPacket = 1; _microphone....
2010 Mar 31
1
Speex in flash player: how to work with?
...oid* 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.getMicrophone(); _microphone.setSilenceLevel(0); _microphone.codec = SoundCodec.SPEEX; _microphone.encodeQuality = 10; _microphone.rate = 16; _microphone.framesPerPacket = 1; _microphone....
2010 Feb 22
0
Speex echo cancellation and denoise issues
...ng various options. I would really appreciate if you could help me with the issues I am facing. 1. Denoise: I have written the following to code to perform denoise. //To initialize speex preprocess state and set the denoise option int nEnable = 1; SpxPreprocessState = speex_preprocess_state_init(160, 8000); //20ms audio at 8000 bps speex_preprocess_ctl(SpxPreprocessState, SPEEX_PREPROCESS_SET_DENOISE, &nEnable); //Run the preprocess on the buffer captured before encoding speex_preprocess_run(SpxPreprocessState, (short*)pbBuffer); speex_encode_int(EncoderS...
2010 Jun 28
1
ACE does not work for me at all.
...tions : * #define BITS_PER_SAMPLE (16) * #define SAMPLE_RATE (8000) * #define CHANNEL_NB (1) * #define DURATION (20) * SPEEX_MODEID_NB */ _eco_state = speex_echo_state_init(_encframe_size, 10*_encframe_size); speex_echo_ctl(_eco_state, SPEEX_ECHO_SET_SAMPLING_RATE, &_sample_rate); _den_state = speex_preprocess_state_init(_encframe_size, _sample_rate); speex_preprocess_ctl(_den_state, SPEEX_PREPROCESS_SET_ECHO_STATE, _eco_state); tmp=1; speex_preprocess_ctl(_den_state, SPEEX_PREPROCESS_SET_DENOISE, &tmp); tmp=1; speex_preprocess_ctl(_den_state, SPEEX_PREPROCESS_SET_AGC, &tmp); ftmp=24000; // actually defa...
2008 Dec 11
1
preprocessor VAD only rocognize between silence and not silence
...0 a 10 speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality); int dtx = 0; speex_encoder_ctl(enc_state, SPEEX_SET_DTX, &dtx); int vbr = 0; speex_encoder_ctl(enc_state, SPEEX_SET_VBR, &vbr); // PREPROCESADOR pre_state = speex_preprocess_state_init(frame_size, samplingrate); int denoise = 1; speex_preprocess_ctl(pre_state, SPEEX_PREPROCESS_SET_DENOISE, &denoise); int pvad = 1; speex_preprocess_ctl(pre_state, SPEEX_PREPROCESS_SET_VAD, &pvad); int agc = 1; speex_preprocess_ctl(pre_stat...
2005 Sep 22
1
Noise :-(
...this way: =================================== #define NN 160 /* 20msec di audio */ ... int tbc=0,c,d,ret; spx_int16_t TEMP_Buffer[NN]; char DLECODE; /* Inizializza il preprocessore Speex se non inizializzato */ if(Modem->speex_pp_state == NULL) { Modem->speex_pp_state = speex_preprocess_state_init(NN,AUDIO_SAMPLERATE); } /* Modifica i parametri di Speex */ c = Modem->denoise; speex_preprocess_ctl(Modem->speex_pp_state, SPEEX_PREPROCESS_SET_DENOISE, &c); c = Modem->agc; speex_preprocess_ctl(Modem->speex_pp_state, SPEEX_PREPROCESS_SET_AGC, &c); i...
2004 Aug 06
2
Speex for videoconferencing
...d in some files. This should be made in a basic include. - cbsearch.c: line 147 : resj = MAC16_32_Q11((float)resj,shape[k],(int)r[j-k]); Ilegal use of float. - There are some problems with: - speex_preprocess. - speex_preprocess_ctl. - SpeexPreprocessState *speex_preprocess_state_init. They produce link errors. Looks like preprocessing is experimental at the moment. OK, that's my two cents. I dont know if i have fixed the MAC16_32_Q11 right. Perhaps someone can give me a hint. Best Regards, <p><p>Carsten Breuer <p><p>--- >8 ---- List...
2007 Jun 26
2
Residual Echo Suppression by the Preprocessor
...heck my understanding... Do I need only the following initialization code (along with my already-working code that calls the AEC and preprocessor) to get the echo suppressor working? (Some declarations omitted, to save labor.) // m_EchoState = speex_echo_state_init( ... ); // m_PreProc = speex_preprocess_state_init( ... ); speex_preprocess_ctl( m_PreProc, SPEEX_PREPROCESS_SET_ECHO_STATE, m_EchoState ); //optional: INT32 maxEchoAttenuationDB = -40; //use negative; default is -40 speex_preprocess_ctl( m_PreProc, PREPROCESS_SET_ECHO_SUPPRESS, &maxEchoAttenuationDB );...
2004 Aug 06
1
Proposed AGC additions
...easy to implement these commands: In preprocess.h, SpeexPreprocessState: float agc_gain; float agc_max_gain; In preprocess.h, #defines at the end: #define SPEEX_PREPROCESS_GET_AGC_GAIN 14 #define SPEEX_PREPROCESS_SET_AGC_MAX_GAIN 15 #define SPEEX_PREPROCESS_GET_AGC_MAX_GAIN 16 In preprocess.c, speex_preprocess_state_init(): st->agc_gain = 1; st->agc_max_gain = 200; In preprocess.c, speex_compute_agc(), before last for loop: if (agc_gain > st->agc_max_gain) agc_gain = st->agc_max_gain; st->agc_gain = agc_gain; In preprocess.c, speex_preprocess_ctl(): case SPEEX_PREPROCESS_GET_AGC_GAIN: (*(float*)...
2009 Sep 02
3
voice sound like robot voice :)
...e 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 ); } void TVoiceCodec::setupDecoder() { // catch invalid sample rates resulting...