cancel
Showing results for 
Search instead for 
Did you mean: 

Speex encoding for voice data on STM32F407

nhandt3
Associate II
Posted on March 06, 2014 at 03:14

Hi, I use speex encoding with Stm32f407VG microcontrollers follows application note ''Vocoder demonstration using a Speex audio codec on STM32F101xx and STM32F103xx microcontrollers'' but differrent: I use an codec IC to ADC and DAC. I take library on sample code for stm32f103xx into stm32f407's project. I use functions: speex_encode_int, speex_bits_write, speex_bits_read_from, speex_decode_int to test encode and decode function. ADC and DAC is 8khz on Codec. Then the equal is, - The quality is very bad, I cannot hear human voice. I would like to ask the quality of Speex encoding on Stm32? Is it really good or have someting wrong with mine? - Are there any compression voice library on stm32f407. My voice stream is 64kbp and I need to compress as small as it can. Thanks you so much.,

4 REPLIES 4
chen
Associate II
Posted on March 06, 2014 at 10:22

Hi

''

ADC and DAC is 8khz on Codec. Then the equal is, - The quality is very bad,

''

Are you saying that the ADC is sampling at 8KHz?

That would be the reason for poor audio performance - I doubt it is the codec.

CD quality is around 24Khz

Telephone is around 3Khz

frankmeyer9
Associate II
Posted on March 06, 2014 at 11:05

The quality is very bad, I cannot hear human voice.

 

Then you probably did something wrong.

A 4kHz bandwidth is enough for things like phone encoding. Remember, the AM radio in former time (and up to now) has a similiar bandwidth.

Try to apply test signals (say, 0.5kHz, 1kHz, 4kHz sinus wave), and check the output.

nhandt3
Associate II
Posted on March 06, 2014 at 11:14

Hi,

ADC is  sampling at 8Khz, I looped the signal without speex encoding and its good, problem is I use speex library folow the application note for Stm32f1xx and I dont know why the quality is very bad.

Thanks u.

frankmeyer9
Associate II
Posted on March 06, 2014 at 11:24

Checking the Speex webpage reveals that:

 - Speex itself is obsolete, and encourages one to use Opus instead;

 - wideband (16kHz) and ultra-wideband (32kHz) compressions are available;

 - builds by default with floating point;

I assume you need to build your project with FPU support (abi=softfp or abi=hard), otherwise you might get performance problems.

Alternatively, you could try the fixed-point variant.

Edit:

If your project is based on a F1xx application note, it surely ignores floating point.

And if you use external ADC/DACs, make sure the performance requirements are met.