search for: spx_int16_t

Displaying 20 results from an estimated 57 matches for "spx_int16_t".

2008 Mar 29
0
GCC/ELF Visibility patch
...-545,7 +545,7 @@ } /** Destroys an echo canceller state */ -void speex_echo_state_destroy(SpeexEchoState *st) +EXPORT void speex_echo_state_destroy(SpeexEchoState *st) { spx_fft_destroy(st->fft_table); @@ -587,7 +587,7 @@ #endif } -void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out) +EXPORT void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out) { int i; /*speex_warning_int("capture with fill level ", st->play_buf_pos/st->frame_size);*/ @@ -610,7 +610,7 @@ } } -void speex_echo_playback(SpeexE...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...-545,7 +545,7 @@ } /** Destroys an echo canceller state */ -void speex_echo_state_destroy(SpeexEchoState *st) +EXPORT void speex_echo_state_destroy(SpeexEchoState *st) { spx_fft_destroy(st->fft_table); @@ -587,7 +587,7 @@ #endif } -void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out) +EXPORT void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out) { int i; /*speex_warning_int("capture with fill level ", st->play_buf_pos/st->frame_size);*/ @@ -610,7 +610,7 @@ } } -void speex_echo_playback(SpeexE...
2007 Apr 25
0
echo cancellation on Blackfin DSK
...CTIVATE_STEREO // Demux the stereo stream for(i = 0; i < SPEEX_FRAME_SIZE; i++) { *in_left++ = *in++; // channel 1 in++; // channel 2 } in_left = in_buffer_calc; speex_bits_reset(&g_Bits); // Encode the frame speex_encode_int(g_pvEnc, (spx_int16_t *)in_left, &g_Bits); nbBits = speex_bits_write(&g_Bits, cbits, 200); speex_bits_rewind(&g_Bits); SpeexEchoState *st= speex_echo_state_init(SPEEX_FRAME_SIZE,filter_length); speex_echo_cancel(st,(spx_int16_t *)in_left,(spx_int16_t *)out_left,(spx_int16_t *)out2,NULL);...
2009 Sep 02
3
voice sound like robot voice :)
...ality ); speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_VBR, &disabled ); speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_DTX, &disabled ); // init encoder speex_bits_init( &codecBits ); speex_bits_reset( &codecBits ); // determine encoded bytes per frame 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...
2009 Sep 03
1
Speex-dev Digest, Vol 64, Issue 2
...d ); > > speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_DTX, > > &disabled ); > > > > // init encoder > > speex_bits_init( &codecBits ); > > speex_bits_reset( &codecBits ); > > > > // determine encoded bytes per frame 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 &gt...
2010 Sep 30
2
[SPAM] [BombData][alltestmode] Using Speex Echo Canceller
Hi Anton Thanks for the info... What if I use this function do I still need to sync the playback and capture? Assuming that the captured voice (*rec) already contains the echo which I need to cancel out... -------------------------------- void speex_echo_capture (SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out) Parameters: st Echo canceller state rec signal from the microphone (near end + far end echo) out Returns near-end signal with echo removed ---------------------------------- thanks & regards, Chris Adoremos On Wed, Sep 29, 2010 at 5...
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...
2009 Jan 30
1
echo_cancellation_api
Please, I'm looking at speex rc1 echo_cancellation API docs and I found there is now a funcion for doing decorrelation: void speex_decorrelate( SpeexDecorrState * st, const spx_int16_t * in, spx_int16_t * out, int strength) How does it fit to the speex_echo_cancellation function ? When removing echo from multiple channels I need to decorrelate the input mic first and then put the decorrelation output in the rec parameter of speex_echo_cancellation ? I didn't get...
2009 Feb 13
0
Why speex echo cancellation is not work
...f[SPEEX_NN]; SpeexEchoState *st; SpeexPreprocessState *den; char* inputBuf; ~AECHandler(void){ speex_echo_state_destroy(this->st); speex_preprocess_state_destroy(this->den); } void HookComingSound(char* buf){ speex_echo_playback(this->st,(spx_int16_t*)buf); } void HookOutingSound(char* origin, char* &outbuf){ speex_echo_capture(this->st,(spx_int16_t*)origin,(spx_int16_t*)outbuf); speex_preprocess_run(this->den,(spx_int16_t*)outbuf); } }; -------------- next part -------------- An HTML attachment was scrubbe...
2008 Jul 25
2
Problem in Echocancelation
Hi, We are using your speex codec in our VirtuvalClassRoom product. It's working good but we have problem using your echo canceller. Can you send me some code samples which use the echo cancelation? thanks suresh A Bring your gang together. Do your thing. Find your favourite Yahoo! group at http://in.promos.yahoo.com/groups/ -------------- next part -------------- An HTML
2019 Nov 06
0
【SPEEX】 use speex resample make noise
...    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; >     spx_uint32_t outlen = 1920; >     while (1) >     { >         speex_resampler_reset_mem(speex_resampler); >         int len = fread(inbuff, 2, 320, fp); >         if (len...
2007 Sep 17
1
Possible fixed point overflow/div 0 preprocess.c
...nal beta calculation within speex_preprocess_run> ... st->nb_adapt++; st->min_count++; beta = MAX16(QCONST16(.03,15),DIV32_16(Q15_ONE,st->nb_adapt)); beta_1 = Q15_ONE-beta; ... </> On my architecture(x86) at least the DIV32_16 is defined as follows. typedef short spx_int16_t; typedef spx_int16_t spx_word16_t; #define DIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a))/((spx_word16_t)(b)))) The nb_adapt overflow occurred when its value reached 0x00010000 when the cast is performed to a short the value 0x0000 is given and hence the divide by zero exception. Proposed reso...
2008 Nov 13
2
decoded sample is completely differen from original one
...set? Thanks, Andre #include <stdio.h> #include <tchar.h> #include <speex/speex.h> #define FRAME_SIZE 160 #define QUALITY 8 #define ENHANCEMENT 1 int encode(int * nbBytes, char * encSamples) { void * state; SpeexBits bits; int quality = QUALITY; spx_int16_t input[] = {0x703B, 0x7361, 0x7567, 0x3969, 0x6874, 0x3B76, 0x3020, 0x3534, 0x3871, 0x7967, 0x3B75, 0x6C6F, 0x7261, 0x7965, 0x2038, 0x3B67, 0x7639, 0x3238, 0x3634, 0x6879, 0x3B20, 0x6F74, 0x6C69, 0x7276, 0x7771, 0x...
2014 May 16
3
Error when compiling FFmpeg with speex-git.
...In file included from /home/user/build/include/speex/speex_types.h:122:0, from /home/user/build/include/speex/speex.h:43, from libavcodec/libspeexdec.c:21: /home/user/build/include/speex/speex_config_types.h:12:1: error: unknown type name ?int16_t? typedef int16_t spx_int16_t; ^ /home/user/build/include/speex/speex_config_types.h:13:1: error: unknown type name ?uint16_t? typedef uint16_t spx_uint16_t; ^ /home/user/build/include/speex/speex_config_types.h:14:1: error: unknown type name ?int32_t? typedef int32_t spx_int32_t; ^ /home/user/build/include/speex/speex_con...
2009 Sep 03
0
voice sound like robot voice :)
...rState, SPEEX_SET_VBR, > &disabled ); > speex_encoder_ctl( pCodecEncoderState, SPEEX_SET_DTX, > &disabled ); > > // init encoder > speex_bits_init( &codecBits ); > speex_bits_reset( &codecBits ); > > // determine encoded bytes per frame 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( pCodec...
2005 Sep 22
1
Noise :-(
Hi all, i use speex preprocessor features in 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;...
2011 Jun 22
1
Acoustic echo cancellation
On 06/22/2011 09:30 AM, Steve Kann wrote: > Speaking of AEC (thought not quite on topic for this thread), > > Has anyone on this list played with the GIPS code that google just > open-sourced? It looks like their AEC also has code to handle > differential sample rates, though I haven't really evaluated it > thoroughly. > > There is really a lot of code in the drop ?
2010 Sep 30
0
[SPAM] [BombData][alltestmode] Re: [SPAM] [BombData][alltestmode] Using Speex Echo Canceller
...ou don't want to use speex_echo_cancellation than you should do next way: Save the playback frames (clean echo) within separate playback thread with speex_echo_playback func. Then use speex_echo_capture - it will remove the clean echo frame (saved with speex_echo_playback func) from const spx_int16_t *rec buffer (saved with speex_echo_capture) and you will get clean frame in "out" buffer. The sync is very important - because speex_echo_capture won't be able to remove clean echo frame that you didn't provide with speex_echo_playback. I hope I didn't messed up anythi...
2007 Jul 23
2
Shoehorning speex is confusing a newbie
...d 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 in there too but it just got overwritten by the set mode in the encode function. So I thought I'd try to force it into mode 3 and see what happens, and I got A result, but when I try to...
2008 May 29
0
Again, teach me speex AEC please!
...= (*env)->GetArrayLength(env, buf1); int len2 = (*env)->GetArrayLength(env, buf2); jint ret = 0; Codec* pCodec = (Codec* )p; if (pCodec->type != TYPE_ENCODE) { return ret; } // How to use AEC to cancel? speex_preprocess_run(pCodec->pPre, (spx_int16_t* )bytes1); speex_bits_reset(&pCodec->bits); speex_encode_int(pCodec->pSt, (spx_int16_t* )bytes1, &pCodec->bits); ret = speex_bits_write(&pCodec->bits, bytes2, len2); (*env)->SetByteArrayRegion(env, buf1, 0, len1, bytes1); (*env)->SetByteArrayRegion...