cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Now Speaks ! with Speex Codec

16-32micros
Associate III
Posted on January 09, 2009 at 12:55

STM32 Now Speaks ! with Speex Codec

9 REPLIES 9
16-32micros
Associate III
Posted on May 17, 2011 at 12:49

Dear all,

This is not a joke but a reality 🙂 STMicroelectroncs has released the first Industry STM32 Speex Audio Codec demonstration with full source codes fully optimized for STM32 architecture.

Speex is a free audio codec dedicated to speech encoding and decoding. It provides a high level of compression with a good quality of sound. That makes it a high-performance solution for any application using message playback or a voice recorder, like answering machines, building and home safety systems, intercoms, smart appliances, voice recorders or walkie-talkies.

Three different applications are provided:

â—� Playback application: to play encoded files

â—� Record and play application: to store a message in internal memory and play it back ( more than 1 minute of message using only 59Kbytes of internal Flash)

â—� Loopback application: To run a real-time vocoder

Full details are here :

http://www.st.com/stonline/products/support/micro/files/an2812.zip

,

http://www.st.com/stonline/products/literature/an/14910.pdf

For more information about the Speex codec, please refer to the Speex website:

http://www.speex.org

Enjoy Listening to your STM32 🙂

Cheers,

STOne-32.

pandoraems
Associate II
Posted on May 17, 2011 at 12:49

Awesome news

now if only there were more than 24hrs a day to play around with all this tech

brianforde9
Associate II
Posted on May 17, 2011 at 12:49

Not the first! I've had Speex running on STM32 for some time (since April / May), although not public demonstration code.

Brian Forde

Europlex Technologies

16-32micros
Associate III
Posted on May 17, 2011 at 12:49

Dear Brian,

This is interesting to know, do you have a full demonstration ? and did you tried to use ST official one and compare it to your implementation ? If yes, please let us know to share it to forum users.

Cheers,

STOne-32.

brianforde9
Associate II
Posted on May 17, 2011 at 12:49

I've only just seen the ST official release of Speex, so havn't compared my version with yours. If I get a chance I will do so, and let you know.

Brian F.

brianforde9
Associate II
Posted on May 17, 2011 at 12:49

Quote:

This is interesting to know, do you have a full demonstration ? and did you tried to use ST official one and compare it to your implementation ? If yes, please let us know to share it to forum users.

I have finally had a chance to do some further measurements on my codec implementation, and find the following (using gcc 4.3.2, 2008q3-66);

Running on an STM32F103xx, CPU load;

Encode: 65%

Decode: 5%

The Speex codec was configured in the narrowband mode, with the quality parameter set to 5 and the complexity equal to 1.

vk1
Associate
Posted on May 17, 2011 at 12:49

I have an own optimisation for Speex for different versions of ARM architecture that much more optimised than your release.

Also in my version it is implement more modes of speex (4000 kbit/sec, 6000 kbit/sec, 8000 kbit/sec, 11200 kbit/sec, 15000 kbit/sec 18200 kbit/sec).

Here is Measurements of performance for STM32 72 MHz.

4000 kbit/sec

Encoder - 59%

Decoder - 3%

6000 kbit/sec

Encoder - 43%

Decoder – 3.8%

8000 kbit/sec

Encoder - 47%

Decoder - 4%

Aprocsimatly 20% faster than your version

11200 kbit/sec

Encoder - 65%

Decoder – 4.1%

15000 kbit/sec

Encoder - 53%

Decoder – 4.2%

Except 11200 mode it can work on 48 MHz STM32 USB Access Line. (11200 probably can work in non full duplex application).

But 8000 kbit/sec is a “light� mode (lighter just 6000 kbit). For all other modes difference will be much deeper (Other modes have longer CELP codebook).

Version for ARM v5E (STR9) is faster for about of 25% for comparable processor’s frequencies, by using of DSP commands.

Version for ARM v4 (STR7) can work even on STR7 60 MHz. (but not all speex modes. Just 6,8,15).

The size of a code, it is natural, more, but just on 10k, in case of making library that support all modes. In case of supporting only 8000 kbit/sec code size is a little bit shorter than yours.

If it is interestingly possible for you is mutually advantageous to co-operate.

sadman
Associate
Posted on May 17, 2011 at 12:49

Hello,

I'm trying to achieve 4kb/s with speex using STM32. The sources provided by STM are supporting only 8kb/s, and this works me. 4kb/s don't work, I found in STM sources that this mode isn't supported, or I'm doing something wrong? I need to add, that I'm using gcc compiler. Vk how did You run with 4kb/s ? I need to take original speex version from speex.org, and only compile to this processor? This 4kb/s can save my life! Any help will appreciated.

You can send me sources or advices to:

mailto:sadman@linuxfreak.pl

vk1
Associate
Posted on May 17, 2011 at 12:49

Quote:

I'm trying to achieve 4kb/s with speex using STM32. The sources provided by STM are supporting only 8kb/s, and this works me. 4kb/s don't work, I found in STM sources that this mode isn't supported, or I'm doing something wrong?

Nothing wrong. 4 kb/s isn't supported in that version.

Quote:

I need to add, that I'm using gcc compiler. Vk how did You run with 4kb/s ?

I have own optimised version.

Quote:

I need to take original speex version from speex.org, and only compile to this processor?

It's possible solution but it can't work in real time.

4 kbit/sec It is very ''heavy'' mode for processor. Even for STM32 - 72MHz.