Adding Text to Speech to OSD335x Products is Easy

With the introduction of Siri, Cortana, Alexa and other voice based personal assistants; communicating with computers using voice has become the order of the day. Voice communication also makes things more intuitive and definitely cooler. People have been using various versions of electronic speech synthesis since the 1950’s and it has come a long way since our Founder,  Gene Frantz helped develop the Speak & Spell, utilizing the first single-chip voice synthesizer.  However, the most famous Text-to-Speech (TTS) synthesizer was used by the great scientist, Stephen Hawking, starting in the late 1980’s as a result of degradation of his natural abilities from amyotrophic lateral sclerosis (ALS). Dr Hawking’s synthesizer went silent this month, and the scientific community for speech synthesis and many other areas are grateful for his tremendous contributions.

Since TTS technology has matured, many resources are available including open source libraries like eSpeak and Flite that can be easily incorporated into projects. This article helps you install and use TTS synthesizers for any board using the OSD335x family.

eSpeak, Flite and ALSA

eSpeak is compact, open source and available for English and many other languages. eSpeak uses a “formant synthesis” method. This allows many languages to be provided in a small size.   It is capable of handling several languages and producing both male and female voices. You can also make the voice whisper and change the speed.

An alternate synthesizer to use is Flite (festival-lite). This open source, small, fast run-time, text-to-speech synthesis engine was developed at Carnegie Melon University (CMU). It is primarily designed for small embedded machines. Flite supports various voices in English and a few additional languages.

The Advanced Linux Sound Architecture (ALSA) is a part of the Linux Kernel that provides drivers to sound cards. ALSA basically manages all sound cards and sound devices on your Linux system and also allows direct interaction with sound devices through its libraries. Both eSpeak and Flite TTS synthesizers use ALSA for their operation.

Implementing Text-to-Speech

This project is simple to implement on any OSD335x based development board or custom hardware with off-the-shelf components. Attach a USB Sound Card and headphones or speaker to your board, connect to the Internet, and your project can easily talk.

Steps to configure and use the eSpeak TTS on the OSD3358-SM-RED board are as follows.

Adding Text-to-Speech with a OSD3358-SM-RED Board

First, configure the sound card:

Copy and paste the following piece of code:

Next, install espeak (Make sure your board is connected to the internet):

Make your board talk!

More detailed step by step instructions and code to install and use TTS Synthesizers on the latest low cost board from BeagleBoard.org® ; PocketBeagle®, is available on this Hackster.io page 

Step by step instructions are available on the Hackster.io project page

 

We’d love to hear how you’ve implemented speech into your products. Please contact us directly through the Octavo Systems forums.