Created
March 30, 2010 21:06
-
-
Save maxlapshin/349594 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| speex_bits_init(&driver->bits); | |
| driver->encoder = speex_encoder_init(&speex_wb_mode); | |
| driver->decoder = speex_decoder_init(&speex_wb_mode); | |
| speex_decoder_ctl(driver->decoder, SPEEX_GET_FRAME_SIZE, &driver->frame_size); | |
| speex_decoder_ctl(driver->decoder, SPEEX_GET_SAMPLING_RATE, &driver->sample_rate); | |
| driver->den = speex_preprocess_state_init(driver->frame_size, driver->sample_rate); | |
| // for each frame: | |
| spx_int16_t rec[SPX_SIZE]; | |
| int size; | |
| // ei_decode_binary(input, &ptr, rec, &size); <- extracting data | |
| // size is 10 or 52 bytes | |
| int was_speech = speex_preprocess_run(driver->den, rec); | |
| //here get trash in rec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment