dsPIC30F Speech Encoding/Decoding Library
Microchip Technology Incorporated
Summary
The dsPIC30F Speech Encoding/Decoding Library performs
toll-quality voice compression and voice decompression. The
library is based on a modified version of Speex source code
and features a 16:1 compression ratio. It samples speech
at 8 kHz and compresses it to a rate of 8 kbps. Storing
compressed speech for playback requires approximately
1 KByte of memory for each second of speech. The library is
especially suitable for the following voice-based applications:
Answering machines
Building and home safety systems
Intercoms
Smart appliances
Voice recorders
Walkie-talkies
Any application using message playback
Description
The Speech Encoding/Decoding Library is a modified
version of the Speex speech coder made specifically for
the dsPIC30F family of Digital Signal Controllers (DSCs).
Encoding uses Code Excited Linear Prediction (CELP), which
is a popular coding technique. CELP provides a reasonable
trade-off between performance and computational complexity.
The library samples speech at 8 kHz and compresses it to
a rate of 8 kbps. The library is appropriate for half-duplex
systems, such as answering machines, intercoms and walkie-
talkies. With the decoder’s small footprint, the library is also
ideal for playback-only applications, such as building safety
systems and smart appliances.
Predominantly written in assembly language, the Speech
Encoding/Decoding Library optimizes computational
performance and minimizes RAM usage. A well-defined API
makes it easy to integrate with your application.
A flexible analog interface gives your design several
options to consider. The speech encoder samples speech
at 8 kHz using either an external codec or the on-chip
12-bit analog-to-digital converter. The speech decoder
plays decoded speech through an external codec or the
on-chip pulse-width-modulator (PWM).
A PC-based Speech Encoder Utility program (pictured above)
allows you to create your own encoded speech files for
playback. Encoded speech files are made from either a PC
microphone or existing WAV file. Once you create the encoded
speech files, they are added to your MPLAB® C30 project, just
like a regular source file, and built into your application.
The Speech Encoder Utility allows you to select four target
memory areas to store your speech file: program memory,
data EEPROM, RAM and external flash memory. External flash
memory allows you to store many minutes of speech
(1 minute of speech requires 60 KB) and it is supported
through a dsPIC30F general purpose I/O port.
Features
Key features of the Speech Encoding/Decoding Library include:
Fixed 8 kHz sample rate
Fixed 8 kbps output rate
PESQ-based Mean Opinion Score: 3.7 – 4.2 (out of 5.0)
Code Excited Linear Prediction (CELP)-based coding
Two analog input interfaces – codec or on-chip 12-bit ADC
Two analog output interfaces – codec or on-chip PWM
Optional Voice Activity Detection
Playback-only applications will benefit from the Speech
Encoder Utility. It allows you to make encoded speech
files from your desktop using a PC microphone or WAV file
Storing compressed speech requires 1 KB of memory per
second of speech
Off-chip support for playback of long speech samples
Royalty free (only one-time license fee)
Full compliance with Microchip MPLAB® C30 Language
Tools
dsPIC30F Speech Encoding/Decoding Library User’s
Guide is provided to help the user understand and use
the library (DS70154)
Designed to run on dsPICDEM™ 1.1 General Purpose
Development Board (DM300014)
Microchip Technology Inc. 2355 W. Chandler Blvd. Chandler, AZ 85224-6199 USA (480) 792-7200 FAX (480) 792-7277
The Microchip name and logo, the Microchip logo, Accuron, dsPIC, KEELOQ, microID, MPLAB, PIC, PICmicro, PICSTART, PRO MATE, PowerSmart, rfPIC and SmartShunt are registered trademarks of Microchip
Technology Incorporated in the U.S.A. and other countries. AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB, PICMASTER, SEEVAL, SmartSensor and The Embedded Control Solutions Company
are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense,
FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, MPASM, MPLIB, MPLINK, MPSIM, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, rfLAB, rfPICDEM,
Select Mode, Smart Serial, SmartTel Total Endurance and WiperLock are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology
Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. © 2005, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. 4/05
DS70146A
*DS70146A*
Part Numbers and Ordering Information
Devices Supported
dsPIC30F5011 dsPIC30F6011 dsPIC30F6013
dsPIC30F5013 dsPIC30F6012 dsPIC30F6014
Resource Requirements
Decoder:
Playback Interface: Si-3000 Audio Codec or PWM
Computational Power: 3 MIPs
Program Flash Memory: 15 KB
RAM*: 3.2 KB
Encoder:
Sampling Interface: Si-3000 Audio Codec or 12-bit ADC
Computational Power: 19 MIPs (worst case)
Program Flash Memory: 33 KB
RAM*: 5.4 KB (1.2 KB is scratch)
*Full-duplex support is presently not possible due to RAM requirements,
but support will be provided with future devices. Half-duplex support is
now possible and requires 6.8 KB of RAM.
Host Requirements
PC-compatible system with an Intel Pentium® class or higher
processor or equivalent
A minimum of 16 MB RAM
A minimum of 40 MB available for hard drive space.
CD-ROM drive
Microsoft Windows® 98, Windows NT® 4.0 or Windows XP®
dsPIC30F Speech Encoding/Decoding Library
Part Number Description Availability
SW300070-EVAL dsPIC30F Speech Encoder/Decoder Library Software License (Evaluation Only) Q2/2005
SW300070-5K dsPIC30F Speech Encoder/Decoder Library Software License (Up to 5K Units) Q2/2005
SW300070-25K dsPIC30F Speech Encoder/Decoder Library Software License (Up to 25K Units) Q2/2005
SW300070-100K dsPIC30F Speech Encoder/Decoder Library Software License (Up to 100K Units) Q2/2005
Note: Quantities are per project, payable as a one-time license fee based on estimated lifetime volume for products resulting from the project.
Please consult the factory for quantities above 100K.
dsPIC®DSC Development Tools from Microchip
MPLAB®
IDE Free
MPLAB®
Visual Device Initializer (included in MPLAB®
IDE)
MPLAB®
C30 C Compiler SW006012
MPLAB®
ICD 2 In-Circuit Debugger/Programmer DV164005, DV164007
MPLAB®
ICE 4000 ICE4000
MPLAB®
PM3 Universal Device Programmer DV007004
dsPIC30F Math Library (included in download of MPLAB®
C30 C Compiler) Free
dsPIC30F DSP Library Free
dsPIC30F Peripheral Library Free
dsPICworks™ Data Analysis and DSP Software Free
dsPIC®DSC Digital Filter Design SW300001
dsPIC30F Soft-Modem Library SW300002/3/4/5
dsPIC®
DSC Speech Recognition Library SW300010/11/12
dsPIC®
DSC Symmetric Key Embedded Encryption Library SW300050
dsPIC®
DSC Asymmetric Key Embedded Encryption Library SW300055
dsPIC30F Acoustic Echo Cancellation Library SW300060
dsPIC30F Noise Suppression Library SW300040
CMX-RTX™ for dsPIC30F SW300031
CMX-Tiny+™ for dsPIC30F SW300032
CMX-Scheduler™ for dsPIC®
Devices Free at www.cmx.com
dsPICDEM™ Starter Demonstration Board DM300016
dsPICDEM™ 28-pin Starter Demonstration Board DM300017
dsPICDEM™ 1.1 General Purpose Development Board DM300014
dsPICDEM™ MC1 Motor Control Development System DM300020
dsPICDEM.net™ 1 Connectivity Development Boards DM300004-1
dsPICDEM.net™ 2 Connectivity Development Boards DM300004-2
Visit our web site at www.microchip.com for additional product information and your local sales office.
Mouser Electronics
Authorized Distributor
Click to View Pricing, Inventory, Delivery & Lifecycle Information:
Microchip:
SW300070-100K SW300070-25K SW300070-5K SW300070-EVAL