Recording of speech or audio signals requires compressing (encoding) it for efficient storage or transmission. Some embedded applications may require recording of speech while the system is deployed in the field. A new voice message could be recorded as part of a field update to change an existing message being played back by the system. In the case of communication applications, recording (including compression) may be performed prior to streaming out data.
In both cases, the quality of audio depends on both the compression scheme (G.726A, Speex, etc.) used in firmware as well as the hardware peripherals used (PWM, DAC, etc.) for reproducing the sound. Most communication applications that require encoding of streaming audio will also require decoding of received speech data. In all applications requiring recording of speech, the processor throughput (MIPS) required by the microcontroller (MCU) or Digital Signal Contrller (DSC) is largely dependent on the encoding algorithm. These applications are discussed in detail in the Communications section. In this section, we present the solutions required for playback-only applications in two parts:
Note: The MIPS usage statistics shown for algorithms within gray ellipses in the graph above represent the requirements of our implementation of these algorithms on 16-bit PIC® MCUs and dsPIC DSCs.
A decision on the algorithm to use is often based on a tradeoff between quality and memory costs incurred in saving large amounts of audio data. Another critical benchmark affecting the choice of processor used in recording applications is the MIPS needed to execute the encoding algorithm. The table below shows approximate MIPS needed for various algorithms on our 16-bit MCUs and DSCs. Since most applications that require encoding also require decoding, the MIPS throughput for both encoding and decoding is presented below:
The table below provides approximate throughput of various Microchip products:
A representative design exercising this option using a voice-band codec can be found in the PIC32 Audio Development Board (DM320011). Schematics and source code for a demo are available in the zip file provided with the board.
In the option shown here, a 12-bit ADC may be used to digitize speech data once the analog waveform from the microphone or line input has been amplified and band-limited. A 12-bit ADC peripheral is available in many PIC MCUs and dsPIC DSCs. A representative design exercising this option can be found in the MPLAB® Starter Kit for dsPIC DSCs (DM330011). Schematics and source code for a demo are available in the zip file provided with the board.
|AN1367 - Porting the Helix MP3 Decoder onto Microchip's PIC32MX 32-bit MCUs||Download|
|AN1152 - Achieving Higher ADC Resolution Using Oversampling||Download|
|AN1422 - High-Quality Audio Applications Using the PIC32||Download|
|AN643 - Adaptive Differential Pulse Code Modulation using the PIC16/17||Download|
|dsPIC33EPXXX(GP/MC/MU)806/810/814 and PIC24EPXXX(GP/GU)810/814 Data Sheet||Download|
|dsPIC33FJXXXGPX06A/X08A/X10A Family Data Sheet||Download|
|PIC32MX1xx/2xx 28/36/44-pin Family Data Sheet||Download|
|PIC32MZ Embedded Connectivity with Floating Point Unit (EF) Family Data Sheet||Download|
|PIC32MX330/350/370/430/450/470 Family Data Sheet||Download|
|PIC32MX1xx/2xx/5xx 64/100-pin Family Data Sheet||Download|
|PIC24FJ1024GA610/GB610 Family Data Sheet||Download|
|PIC32MX1XX/2XX 28/44-pin XLP Family Data Sheet||Download|