28.11.12

Magic Mouth: Arduino Speech Shield

Ready to talk the talk? Give your Arduino the power of speech. This easy-to-build circuit includes a voice synthesizer and amplifier.


Magic Mouth v0.1: Screenshot of Eagle layout


Webbotlib gets microcontrollers talking


Webbotlib is an open source collection of C/C++ libraries for AVR microprocessors. It's a fantastic resource, and not just for robot builders. One feature that particularly interests me is the Text2Speech module, which compresses a text parser and 4-bit phoneme samples into just 12 kilobytes of compiled code.

It is exciting that microcontrollers as small as the Atmega168 can be made to speak intelligibly. This opens up an entire channel of communications for embedded applications. Up until now, speech synthesis has been the province of more powerful chips or dedicated coprocessors like the BabbleBot SSG01.

Naturally, certain compromises have been made to achieve code with this degree of compression. The webbot module speaks only English and its 4-bit speech samples sound distinctly machine-like. In addition, the microcontroller can't do anything much while it is talking. Ideally it could send out to a slave chip which would carry out the hard work of parsing the text and giving voice to the speech samples.


Magic Mouth Speech Shield v0.1


Given the popularity of Arduino-compatible development boards, it seemed sensible to start by designing a PCB that would piggy back on this form factor. I have made a first stab at both a single sided board (for easy home manufacture) and a double sided prototype. The design incorporates a simple amplifier borrowed directly from Webbot. Both boards use kit-friendly through hole components for easy soldering.

The slave chip could be either an atmega168P or an atmega328P. A thumbwheel trimmer (Bourns 3352T-1-103LF) acts as the volume control. The other parts are generic. The atmega communicates with the Arduino using the I2C protocol on the SDA and SCL pins. The sound signal is output on pin PB2 to either a headphone jack or external 8 Ω speaker. Most of the other pins are broken out to optional headers. The atmega can be programmed using the Arduino by attaching jumpers to 4 adjacent header pins that connect its RST, MOSI, MISO, and SCK pins to the Arduino's digital pins 10-13, respectively.

The designs, together with such documentation and firmware I have been able to put together, are archived in a github repository. Please tell me your concerns and comments! You can also participate in the forum discussion on Dangerous Prototypes.


Watch this space


Keep a look out over the coming weeks as I post builds of the shield itself and demonstration projects including a talking calculator, together with code, pictures, and all the usual documentation.


Acknowledgments


This project would not be possible without Webbot, who developed the speech2text module and put it in the public domain. Thanks!


Linkbacks


Dangerous Prototypes

No comments:

Post a Comment