search for: speex_set_sampling_rate

Displaying 20 results from an estimated 32 matches for "speex_set_sampling_rate".

2005 Feb 09
2
encoding speex, (insanity looming)
...its // quaility and rate int quality = 8, rate = 16000; // setup encoder speex_bits_init(&enc_bits); enc_state = speex_encoder_init(&speex_wb_mode); speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality); speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING_RATE, &rate); // setup decoder speex_bits_init(&dec_bits); dec_state = speex_decoder_init(&speex_wb_mode); speex_encoder_ctl(dec_state, SPEEX_SET_QUALITY, &quality); speex_encoder_ctl(dec_state, SPEEX_SET_SAMPLING_RATE, &rate); int file; //...
2006 May 20
2
Size of each block in a circular buffer and the sample rate
int frameSize; speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE, &frameSize); Is frameSize in bytes? If not, what unit is it in? I need to know so I know how big to make each element in my circular buffer. Also, do I need to call speex_encoder_ctl( enc_state, SPEEX_SET_SAMPLING_RATE, &sampleRate ); Depending on sample rate I record my audio in? If not, is there any benefit to setting the sample rate, such as reduced bandwidth?
2009 Sep 02
3
voice sound like robot voice :)
.../ assert( ( pCodecEncoderState == NULL ) && "encoder already initialized" ); // int enabled = 1; int disabled = 0; // float highpass = 80; // setup encoder pCodecEncoderState = speex_encoder_init( pMode ); // speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_SAMPLING_RATE, &sampleRate ); speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_COMPLEXITY, &encoderComplexity ); speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_QUALITY, &encoderQuality ); speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_VBR, &disabled ); speex_encoder_ctl( pCodecEnc...
2005 Feb 09
1
encoding speex, (insanity looming)
..., I have repeated the relevent bits of the example bellow. My version of speex is 1.1.6. Thanks once again for your help, David. enc_state = speex_encoder_init(&speex_wb_mode); speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality); speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING_RATE, &rate); // setup decoder speex_bits_init(&dec_bits); dec_state = speex_decoder_init(&speex_wb_mode); On Wed, 9 Feb 2005 09:08:47 -0500, Tom Newbern <tnewbern@comcast.net> wrote: > In short try calling speex_encode_int and speex_decode_int. > > The c...
2009 Sep 03
1
Speex-dev Digest, Vol 64, Issue 2
...gt; > // > > int enabled = 1; > > int disabled = 0; > > // > > float highpass = 80; > > > > // setup encoder > > pCodecEncoderState = speex_encoder_init( pMode ); > > // > > speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_SAMPLING_RATE, > > &sampleRate ); > > speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_COMPLEXITY, > > &encoderComplexity ); > > speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_QUALITY, > > &encoderQuality ); > > speex_encoder_ctl( pCodecEncoderState, SPE...
2010 Jul 20
2
[SPAM] [BombData][alltestmode] Re: Speex Echo Cancellation
As for me - speex_echo_cancellation is a better choise. Try using it in capture thread instead of those speex_echo_capture and speex_echo_playback functions. And please, describe your problem in details. Cause the fact that you "didn get echo cancellation" doesn't mean you are doing smth wrong. Regards, Anton A. Shpakovsky -----Original Message----- From: speex-dev-bounces at
2007 Jun 07
1
speex1.2-beta2 and noise suppression problem
...ut files. Speex-1.2beta1 crashes with all 44kHz input file and it's very hard to debug, because I'm using .NET P/Invoke to call native DLL and the application just closes down when it crashes. As for the code, it's quite simple, the basic flow is as follows: 1. Init encoder, bits, set SPEEX_SET_SAMPLING_RATE 2. Init preprocessor state, set SPEEX_PREPROCESS_SET_DENOISE 3. Set quality/complexity 4. loop with: encode_stereo, preprocess, encode int Any suggestions as to what I might be doing wrong? Or is it a bug? Maybe something with the last fixed-point changes? -- Piotr Domagalski
2004 Aug 06
0
About sample code
...ate = 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_FRAME_SIZE, &frame_size); speex_decoder_ctl(dec_state, SPEEX_SET_SAMPLING_RATE, &rate); int tmp2=1; speex_decoder_ctl(dec_state,SPE...
2010 Jul 20
0
[SPAM] [BombData][alltestmode] Re: Speex Echo Cancellation
...speex_bits_init(&bits); int hz = 16000; // 8khz sampling if (speex_mode == SPEEX_MODE_ENCODE) { const SpeexMode * mode = speex_lib_get_mode (SPEEX_MODEID_WB); enc_state = speex_encoder_init(mode); // For Wideband speex_wb_mode ,Narrowband speex_nb_mode speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING_RATE, &hz); int quality= 8; speex_encoder_ctl(enc_state,SPEEX_SET_QUALITY,&quality); quality = 2; speex_encoder_ctl(enc_state, SPEEX_SET_COMPLEXITY, &quality); echo_state = speex_echo_state_init(20,320*10); speex_echo_ctl(echo_state,SPEEX_ECHO_SET_SAMPLING_RATE,&hz);...
2013 May 09
1
Moving from Speex to Opus (question 2)
...codec.h" #define MAX_FRAME_SIZE 2000 #define MAX_FRAME_BYTES 2000 CSpxCodec::CSpxCodec() : enh(1), rate(8000) { } CSpxCodec::~CSpxCodec() { } void CSpxCodec::Init() { speex_bits_init(&bits); decstate = speex_decoder_init(&speex_nb_mode); speex_decoder_ctl(decstate, SPEEX_SET_SAMPLING_RATE, &rate); speex_decoder_ctl(decstate, SPEEX_SET_ENH, &enh); int iFrameSize=0; speex_decoder_ctl(decstate, SPEEX_GET_FRAME_SIZE, &iFrameSize); } void CSpxCodec::Free() { speex_bits_destroy(&bits); speex_decoder_destroy(decstate); } void CSpxCodec::Decode(u...
2005 Feb 09
0
encoding speex, (insanity looming)
...its // quaility and rate int quality = 8, rate = 16000; // setup encoder speex_bits_init(&enc_bits); enc_state = speex_encoder_init(&speex_wb_mode); speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality); speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING_RATE, &rate); // setup decoder speex_bits_init(&dec_bits); dec_state = speex_decoder_init(&speex_wb_mode); speex_encoder_ctl(dec_state, SPEEX_SET_QUALITY, &quality); speex_encoder_ctl(dec_state, SPEEX_SET_SAMPLING_RATE, &rate); int file; //...
2008 Dec 11
1
preprocessor VAD only rocognize between silence and not silence
...ma?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 = 8; //Calidad relativa de 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_S...
2009 Sep 03
0
voice sound like robot voice :)
..."encoder already initialized" > ); > // > int enabled = 1; > int disabled = 0; > // > float highpass = 80; > > // setup encoder > pCodecEncoderState = speex_encoder_init( pMode ); > // > speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_SAMPLING_RATE, > &sampleRate ); > speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_COMPLEXITY, > &encoderComplexity ); > speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_QUALITY, > &encoderQuality ); > speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_VBR, > &disabled...
2010 Jul 20
1
[BombData][alltestmode] Re: [SPAM] [BombData][alltestmode] Re: Speex EchoCancellation
...speex_bits_init(&bits); int hz = 16000; // 8khz sampling if (speex_mode == SPEEX_MODE_ENCODE) { const SpeexMode * mode = speex_lib_get_mode (SPEEX_MODEID_WB); enc_state = speex_encoder_init(mode); // For Wideband speex_wb_mode ,Narrowband speex_nb_mode speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING_RATE, &hz); int quality= 8; speex_encoder_ctl(enc_state,SPEEX_SET_QUALITY,&quality); quality = 2; speex_encoder_ctl(enc_state, SPEEX_SET_COMPLEXITY, &quality); echo_state = speex_echo_state_init(20,320*10); speex_echo_ctl(echo_state,SPEEX_ECHO_SET_SAMPLING_RATE,&hz);...
2004 Aug 06
0
libspeex crash with RC3
...SpeexBits; SpeexEncoderState = speex_encoder_init(&speex_nb_mode); INT FrameSize, SamplingRate = 8000, // 8000 Hz BitRate = 4000; // 4kbps == 10 bytes per 20 ms peex_encoder_ctl( SpeexEncoderState, SPEEX_SET_BITRATE , &BitRate ); speex_encoder_ctl( SpeexEncoderState, SPEEX_SET_SAMPLING_RATE , &SamplingRate ); speex_encoder_ctl( SpeexEncoderState, SPEEX_GET_FRAME_SIZE , &FrameSize ); FLOAT Src[VOICE_FRAME_SIZE]; appMemzero( Src, sizeof(Src) ); char Dest[VOICE_FRAME_SIZE]; peex_bits_init( SpeexEncoderBits ); speex_bits_reset( SpeexEncoderBits ); speex_encode( SpeexEncoderSta...
2006 May 20
2
Size of each block in a circular buffer and the sample rate
...eSize in bytes? If not, what unit is it in? I need to know so I >> know how big to make each element in my circular buffer. > > It's in samples, regardless of whether you use floats or shorts. > >> Also, do I need to call >> >> speex_encoder_ctl( enc_state, SPEEX_SET_SAMPLING_RATE, &sampleRate ); >> >> Depending on sample rate I record my audio in? If not, is there any >> benefit to setting the sample rate, such as reduced bandwidth? > > The only thing Speex does with the sampling rate is compute the final > bit-rate it corresponds to. If yo...
2007 Apr 11
0
Problem with speex
...10; encbits: TSpeexBits; encstate: Pointer; encframe: integer; decbits: TSpeexBits; decstate: 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(de...
2007 Oct 10
0
encode return 0
...eSize = &_FrameSize, __Complexity = &_Complexity, __SamplingRate = &_SamplingRate) { speex_encoder_ctl(_State, 3 /*SPEEX_GET_FRAME_SIZE*/, __FrameSize); speex_encoder_ctl(_State, 16 /*SPEEX_SET_COMPLEXITY*/, __Complexity); speex_encoder_ctl(_State, 24 /*SPEEX_SET_SAMPLING_RATE*/, __SamplingRate); } _Bits = new SpeexBits(); //Data encoding public byte[] ProcessData(byte[] ABuffer, int ADataSize) { int OutputDataSize; short[] TempData = new short[ADataSize]; for (int Index = ADataSize-1; Index >= 0; Index--) T...
2009 Apr 13
0
encoding -> decoding doesnt work
...; 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_QUALITY, &tmp); tmp = 2; speex_encoder_ctl( enc_state, SPEEX_SET_COMPLEXITY, &tmp );...
2010 Jun 10
0
speex multi frame
...fer this is my simple code CSpeexCodec::CSpeexCodec(void) { // speex_bits_init(&m_speexBitsOut); m_pSpeexEncStateOut = speex_encoder_init(&speex_nb_mode); int nEhc=1; int nSamplePerSec = SAMPLES_PER_SEC; static int nQuality = 8; speex_encoder_ctl(m_pSpeexEncStateOut, SPEEX_SET_SAMPLING_RATE, &nSamplePerSec); speex_encoder_ctl(m_pSpeexEncStateOut, 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_D...