search for: speex_nb_mode

Displaying 20 results from an estimated 129 matches for "speex_nb_mode".

2008 Aug 06
1
speex_nb_mode declaration problem
Hello all, I am using the speex APIs in a gnuradio block. I used the similar code as in the sampleenc.c/sampledec.c which works perfectly fine. My compilation does not give any error, but when I run the python test, it complains that speex_nb_mode is undefined. I tried to declare it explicitly then it as const SpeexMode *mode = NULL , then i get an error that i cannot initialize the const SpeexMode type. Can someone help me with this problem? Thanks for your time and attention. Regards, Kshama
2004 Nov 03
2
libspeex.dll
...eased as freeware under the bsd license. We have no commercial intentions in mind. One developer start to implement the speex codec to this project. Unfortunately he has some problems to implement the speex headers. According to the manual "speex_encoder_init" expect a pointer of "speex_nb_mode". Sadly, this constant is not exported by the windows dll (see export table of "libspeex.dll" v1.1.6). Just as extern const SpeexMode speex_nb_mode; extern const SpeexMode speex_wb_mode; extern const SpeexMode *speex_mode_list[SPEEX_NB_MODES]; Unfortunately we could not find any fu...
2009 Mar 05
0
speex1.2beta3 "undefined reference to 'speex_nb_mode' " dev-c++
hello, i was download speex1.2beta3 binaries for windows for use it in dev-c++ and print "undefined reference to 'speex_nb_mode' ", wiht speex 1.0.5 i haven`t this error. i question if this is an error of speex1.2beta3. thank you. = Timeshare Exchange, Buy, rent : Acapulco Selection of timeshares in Acapulco that may interest you. http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=26e09d11162fa1bef8ad3370788e4a2...
2006 May 21
2
Re: High pitched whine with Speex
....000 0.000 0.000 -0.000 Out: -0.029 -0.008 0.020 0.018 -0.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->speexIncomingFrameSampleC...
2009 Dec 15
1
encoding time
Good afternoon! Thank you for your product Speex. We want to use it in microcontroller AT91SAM7S256 (48 MHz). We applied the following: #define FIXED_POINT #define DISABLE_WIDEBAND #define DISABLE_HIGHPASS #define MANUAL_ALLOC #define OS_SUPPORT_CUSTOM at speex_encoder_init(&speex_nb_mode); speex_decoder_init(&speex_nb_mode); tmp=2; speex_encoder_ctl(st, SPEEX_SET_QUALITY, &tmp); Encoding time for one frame (20 ms) is 46 ms, and decoding time is 4 ms. Is it possible to reduce encoding time? Thank you. Best regards, Dr Elyagin Sergei
2005 Aug 12
1
Encode/Decode problem
...code: static void testAudio(UInt8 *data, long dataLength) { //data is a linear PCM stream from an attached microphone. sample rate is 8000, 16 bits per sample void *state; void *state2; SpeexBits bits; short tempShort; short tempPtr[160]; short tempPtrDecode[160]; state = speex_encoder_init(&speex_nb_mode); state2 = speex_decoder_init(&speex_nb_mode); speex_bits_init(&bits); //code simplified to just read in the first frame for (int i = 0; i < 320; i +=2) { tempShort = *((short*)(data + i)); tempPtr[i / 2] = tempShort; } speex_bits_reset(&bits); speex_encode_int(state, tempPtr...
2017 Nov 03
1
[PATCH] Check for _WIN32 instead of WIN32 in preprocessor checks
...+- tmv/config.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/speex/speex.h b/include/speex/speex.h index 28c4b44d..34919e2f 100644 --- a/include/speex/speex.h +++ b/include/speex/speex.h @@ -412,7 +412,7 @@ extern const SpeexMode * const speex_mode_list[SPEEX_NB_MODES]; /** Obtain one of the modes available */ const SpeexMode * speex_lib_get_mode (int mode); -#ifndef WIN32 +#ifndef _WIN32 /* We actually override the function in the narrowband case so that we can avoid linking in the wideband stuff */ #define speex_lib_get_mode(mode) ((mode)==SPEEX_MODEID_...
2012 Mar 10
3
problem: The decoded frame is not as the original one
...=========== \n"); ?for( z=0;z<160;z++) ??? { ??????? 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);??????????????? /...
2004 Aug 06
1
About reducing noise..
Hello, When I decode a recoded sound encoded by speex, it has too much noise. The noise is "slightly" reduced if I set the quality to 10. How do I get rid of this noise? The code is as follows. For encoding . state = speex_encoder_init ( &speex_nb_mode ); tmp = 7; speex_encoder_ctl ( state, SPEEX_SET_MODE, &tmp); // set quality tmp = 10; speex_encoder_ctl ( state, SPEEX_SET_QUALITY, &tmp); // initialize bits speex_bits_init(&bits); while( 1 ) { // read FRAME_SIZE bytes from buffer // convert to short for (...
2005 Oct 17
6
Error Executing sampledec in VC++
...: 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), 1, fo); fread (cbits, 1,...
2004 Oct 25
0
speex headers and borland c++ builder (bcb)
hello, I try to include the speex header to a bcb project. Speex headers are the latest one. My first problem was to use the lib file with bcb. I solved this issue by restructing the lib file. The second problem is to access the constant called "extern const SpeexMode speex_nb_mode;" through borland's c++ builder. I could analyze the export table of the libspeex.dll. Unfortunately I could not find an entry for speex_nb_mode. According to the manual I have to assign the address of this constant: /*Create a new encoder state in narrowband mode*/ state = speex_en...
2009 Feb 03
0
Problems with Speex Libary
Hello, today I try to compile a test-file from the Documentation. I link the libarys correct but have only one error in this line: state = speex_encoder_init(&speex_nb_mode); The error: main.cpp|21|undefined reference to `speex_nb_mode'| The linking libarys: "libspeex.lib" "libspeexdsp.lib" I ask in more c++ boards, but nobody can help me. Hopefully I ask the developer :) sincerely yours, Werner Mandla The code: #include "speex/sp...
2009 Feb 04
0
Problems with Speex Libary
today I try to compile a test-file from the Documentation. I link the libarys correct but have only one error in this line: state = speex_encoder_init(&speex_nb_mode); The error: main.cpp|21|undefined reference to `speex_nb_mode'| The linking libarys: "libspeex.lib" "libspeexdsp.lib" I am assuming you are doing this in Windows. You need to change the code as follows: //state = speex_encoder_init(&speex_nb_...
2006 May 21
3
Re: High pitched whine with Speex
....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_FR...
2006 Nov 01
1
Integrating speex with VideoNet application: Constant background noise
...ag =WAVE_FORMAT_PCM; m_waveFormatEx.nChannels =1; m_waveFormatEx.wBitsPerSample =8; m_waveFormatEx.cbSize =0; m_waveFormatEx.nSamplesPerSec = 8000; m_waveFormatEx.nBlockAlign =1; m_waveFormatEx.nAvgBytesPerSec = 8000; int quality =8; speex_bits_init(&bits); enc_state = speex_encoder_init(&speex_nb_mode); speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality); In my recording callback function LRESULT RecordSound::OnSoundData(WPARAM wParam, LPARAM lParam) { .... dataPtr = (char *)lpHdr ->lpData; dataSize = (int)lpHdr ->dwBytesRecorded; for(int k=0;k<FRAME_SIZE;k++)...
2004 Aug 06
2
Please 30 second to look a my code
...uot;), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); SpeexFile = CreateFile(_T("\\Temp\\tempsound.spx"), GENERIC_WRITE, 0, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); speex_bits_init(&bits); //init encoded bits buffer state = speex_encoder_init(&speex_nb_mode); //Init encoder in narrowband mode speex_encoder_ctl(state, SPEEX_GET_FRAME_SIZE, &frame_size);//Get frame size int tmp=0; speex_encoder_ctl(state, SPEEX_SET_VBR, &tmp); tmp=1; speex_encoder_ctl(state, SPEEX_SET_COMPLEXITY, &tmp); bit_rate=24000; speex_encoder_ctl(state, SP...
2004 Sep 12
2
Speex encoding/decoding producing garbled audio
...y it back fine. - I'm using Speex version 1.1.6. I've also used 1.0.4 beforehand and experienced the same problem with it. 1) I initialize the bits, encoder, and decoder as normal (default settings seemed appropriate): speex_bits_init(&mBits); mEncode = speex_encoder_init(&speex_nb_mode); mDecode = speex_decoder_init(&speex_nb_mode); 2) I record my audio at mono 8000Hz, 16bits per sample. 3) I encode frame-sized (320 bytes) fragments. Since I deal only with char data types, I convert to 2-byte short values first and then set the float buffer. char *CSpeex::encode (ch...
2007 Jul 23
2
Shoehorning speex is confusing a newbie
...not have enough data memory to store all the tables. I thought this would work with my initialization but when I stepped through the code in nb_celp for encode it would put it in mode 6 (instead of mode 3), which I believe is 18.2kbs (table 8.2). My set up code is: st = speex_encoder_init(&speex_nb_mode); speex_bits_set_bit_buffer(&bits, &G729_tx, COMPRESS_LENGTH); tmp=TESTENC_QUALITY; //=4 speex_encoder_ctl(st, SPEEX_SET_QUALITY, &tmp); speex_encode_int(st, (spx_int16_t *)samples_in, &bits); which I thought would put it in 8kbs narrowband. I tried to use SPEEX_SET_MODE...
2007 Apr 03
2
Please help, very important (not for fun)
...I tried to compile and run the two sample programs that come with the documentation (after having insalled the speex-devel-1.0.5-1.i386.rpm). However, when I compile. gcc sampleenc.cc Here is what I get: /tmp/ccXKa3LF.o: In function `main': sampleenc.cc:(.text+0x1a): undefined reference to `speex_nb_mode' sampleenc.cc:(.text+0x1f): undefined reference to `speex_encoder_init' sampleenc.cc:(.text+0x43): undefined reference to `speex_encoder_ctl' sampleenc.cc:(.text+0x6f): undefined reference to `speex_bits_init' sampleenc.cc:(.text+0xea): undefined reference to `speex_bits_reset'...
2004 Aug 06
2
Bitrate in encoder
...the encoder. Calling: peex_encoder_ctl(globals->enc_state,SPEEX_GET_BITRATE, &bitrate); Seems to set bitrate to 24600 no matter what the qualitysetting is.. The functions used previous to this call is: peex_bits_init(&globals->bits); globals->enc_state = speex_encoder_init(&speex_nb_mode); speex_encoder_ctl(globals->enc_state,SPEEX_SET_COMPLEXITY,..); speex_encoder_ctl(globals->enc_state,SPEEX_SET_QUALITY, ..); speex_encoder_ctl(globals->enc_state,SPEEX_GET_BITRATE, &bitrate); The last line always sets the bitrate to 24600.. Why? In my previous installation of libspee...