search for: speex_resampler_init

Displaying 11 results from an estimated 11 matches for "speex_resampler_init".

2009 Mar 17
2
Resample UltraWideBand to NarrowBand
...e to convert this frame to G711. But when I use Speex UltraWideBand the Asterisk don't convert it. Then I need in my Asterisk Channel Source include the Speex Library in resample this frame in 32KHz to 8KHz. Searching for it in Speex Doc, I found it: SpeexResamplerState *resampler; resampler = speex_resampler_init(nb_channels, input_rate, output_rate, quality, &err); err = speex_resampler_process_int(resampler, channelID, in, &in_length, out, &out_length); But in my source I have one *dataframe where is my payload. How I can use it to resample my frame? Thanks you very much, Thiago. -----------...
2019 Nov 06
0
【SPEEX】 use speex resample make noise
...t; but the sound quality is very bad, what would be the cause? > I tried to call speex_resampler_reset_mem before each sample, but the > effect is not as good as usual. > > int main() > { >     int err; >     SpeexResamplerState *speex_resampler; >     speex_resampler = speex_resampler_init(1, 16000, 48000, 10, &err); >     FILE *fp = fopen("/data/zhou.wav", "rb+"); >     FILE *fp2 = fopen("/data/zhou2.wav", "ab+"); >     spx_int16_t inbuff[640] = {0}; >     spx_int16_t outbuff[1920] = {0}; >     spx_uint32_t inlen = 640;...
2007 Mar 22
1
[SPAM] RE: Encoding audio sampled at 44.1 khz?
...play back the output file: GoldWave */ #include <speex/speex_resampler.h> #include <stdio.h> //#pragma comment(lib, "libspeex_test.lib") #define ReadSize 16384 int main(int argc, char* argv[]) { // First of all, declare the resampler state SpeexResamplerState* State = speex_resampler_init(2, 44100, 22050, 5); short in[ReadSize]; short out[ReadSize]; FILE* fin = fopen(argv[1], "rb"); FILE* fout = fopen(argv[2], "wb"); unsigned InLength = ReadSize, OutLength = ReadSize;; speex_resampler_skip_zeros(State); while (1) { // Read in the short data fread(&in...
2009 Mar 18
0
Resample UltraWideBand to NarrowBand
...rt this frame to G711. But when I use Speex UltraWideBand the Asterisk don't convert it. Then I need in my Asterisk Channel Source include the Speex Library in resample this frame in 32KHz to 8KHz. Searching for it in Speex Doc, I found it: SpeexResamplerState *resampler; resampler = speex_resampler_init(nb_channels, input_rate, output_rate, quality, &err); err = speex_resampler_process_int(resampler, channelID, in, &in_length, out, &out_length); But in my source I have one *dataframe where is my payload. How I can use it to resample my frame? Thanks you very much, Thiago. --...
2010 Jul 15
1
Speex Echo Cancellation
Hi I am using speex for cancelling echo.but i am not succeeded. I need echo cancellation in urgent.Please help m. Thanks in advance Devi
2010 Jul 15
0
Speex Resampler
...my float samples from bass > float bufout[640]; //speex resample out buffer > spx_uint32_t buf_len = 0; //set later by bass > spx_uint32_t bufout_len = 320; //when i use 640 which is correct, the program crashes. > int speex_err = 0; > > mspeex_src_state = speex_resampler_init(2,44100,8000,4,&speex_err); > // other code eg. using bass to feed "buf" and set buf_len etc. but this part is correct. > speex_err = speex_resampler_process_interleaved_float(mspeex_src_state,buf,&buf_len,bufout,&bufout_len); > // speex_err: 0, buf_len...
2011 Jan 02
0
Newbie problem with encoding
..._bits_init(&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); // Set up a resampler to resample to 16K which is wideband mode resampler = speex_resampler_init(2, 48000, 16000, quality, &err); return 0; } int lib_speex_resample(short* in, unsigned int* in_length, short* out, unsigned int* out_length) { // Resample the input frame to 16KHz if(enc_state == NULL) return -100; return speex_resampler_process_interleaved_int(resampler, in, i...
2019 Nov 05
0
【SPEEX】 use speex resample make noise
...on is very noisy, > but if I read 6400bytes each time. The conversion will be much better, > the line is my sample code, am I using it incorrectly? please help confirm? > > int main() > { >     SpeexResamplerState *speex_resampler; >     int err; >     speex_resampler = speex_resampler_init(1, 16000, 48000, 10, &err); >     FILE *fp = fopen("/data/zhou.wav", "rb+"); >     FILE *fp2 = fopen("/data/zhou2.wav", "ab+"); >     spx_int16_t inbuff[640] = {0}; >     spx_int16_t outbuff[1920] = {0}; >     spx_uint32_t inlen = 640;...
2007 Mar 21
2
Encoding audio sampled at 44.1 khz?
Hi everyone, I recently began using libspeex 1.2 Beta 1 on Windows using MS Visual C++. I have gotten a decoder and an encoder to work fine from the excellent sample code posted at the website. But I face a problem. I am working on using Speex in a program to play and create audio books encoded using Speex (currently testing it only; for these tests, I do not use Ogg to save the encoded
2008 Mar 29
0
GCC/ELF Visibility patch
...void *ptr) { return mode->query(mode->mode, request, ptr); } Index: libspeex/resample.c =================================================================== --- libspeex/resample.c (revision 14645) +++ libspeex/resample.c (working copy) @@ -721,12 +721,12 @@ } -SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) +EXPORT SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) { return speex_resampler_init_frac(nb_channels, in_rate,...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...void *ptr) { return mode->query(mode->mode, request, ptr); } Index: libspeex/resample.c =================================================================== --- libspeex/resample.c (revision 14645) +++ libspeex/resample.c (working copy) @@ -721,12 +721,12 @@ } -SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) +EXPORT SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) { return speex_resampler_init_frac(nb_channels, in_rate,...