ST AN2812 Application note Vocoder demonstration using a Speex audio codec on STM32F101xx STM32F103xx microcontrollers handbook

This application note describes how to implement the Speex software codec on the STM32F101xx and STM32F103xx microcontrollers to build a vocoder application. 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.


ST AN2812 Application note Vocoder demonstration using a Speex audio codec on STM32F101xx STM32F103xx microcontrollers handbook - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
21
File format
PDF
File size
256 KB
Published
07 August, 2012
Updated
30 September, 2023
MD5 checksum
48A65265E30B98ACA889B70FFCDD3D46

About this manual

The document details how to build a vocoder application using the Speex software codec, which supports compression bitrates from 2 to 44 kbps. It covers narrowband (8 kHz), wideband (16 kHz), and ultrawideband (32 kHz) modes with features like voice activity detection and noise suppression.

The guide provides a hardware description using the STM32F103-STK board, explaining how to connect microphones via ADCs and speakers via PWM timers. It includes specific implementation settings for an 8 kbps constant bitrate mode and lists functions optimized in assembly code for ARM Cortex-M3 cores.

What's inside

  • Speex codec overview
  • Vocoder application overview
  • Hardware description
  • Speex codec implementation
  • Speex codec settings
  • Speex codec optimization
  • Playback application
  • Record and play application
  • Loopback application

Specifications

Supported compression bitrates2 to 44 kbps
Sampling rates supported8 kHz, 16 kHz, and 32 kHz
ADC resolution12-bit
Timer PWM capability16-bit
Flash memory (Demo Board)128 Kbytes
RAM (Demo Board)20 Kbytes

Frequently asked questions

What is the recommended complexity setting for Speex on STM32F101xx/STM32F103xx?

The complexity should be set to a value lower than or equal to 2 to avoid excessive CPU cycles while maintaining quality.

What is the purpose of the Speex codec described in this document?

It is a free audio codec dedicated to speech encoding and decoding that provides high compression with good sound quality.

What are the typical applications for this vocoder implementation?

It is suitable for message playback or voice recorder applications such as answering machines, intercoms, smart appliances, or walkie-talkies.

What bitrate and compression ratio does the implementation use?

The codec is implemented to encode at a bitrate of 8 kbps, which provides a compression ratio equal to 16:1.

Download PDF (256 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →