SparkFun Electronics will be closed on July 3rd, 2015 in observance of Independence Day. Any orders placed after 2:00pm MT on July 2nd will be shipped out after the weekend. Thanks!
The VoiceBox shield is a unique component that lets your Arduino-compatible system speak in a robotic voice. It consists of a SpeakJet speech-synthesizer chip and an audio amplifier that can directly drive a small speaker. In addition to forming speech from commands sent to it, the SpeakJet chip has many other features such as the ability to synthesize tones and other "robot" noises. It can also be set up to say pre-stored phrases when its input pins are triggered. See the SpeakJet User's Guide for detailed technical information.
For the this guide you'll need the following:
Arbitrary text-to-speech generation is a difficult problem.* Think back to when you learned to speak and spell (maybe with a Speak & Spell). As you learned, proper pronunciation is governed by numerous (actually hundreds) of arcane rules and exceptions to those rules. The SpeakJet chip on the VoiceBox shield can't quite turn arbitrary text into speech, but if you're willing to enter the sounds that make up words rather than the letters, the SpeakJet chip is quite capable of synthesizing them.
The SpeakJet chip contains a specialized audio synthesizer capable of generating all the individual sounds of speech, called allophones. These are different than letters - the letter 'a' will have a different sound in "parrot" than in "part". Unlike letters, there are different allophones for those two sounds. Here are those words spelled out in allophones:
parrot= \PE \EYRR \UX \TT
part= \PO \AWRR \TT
Each allophone has a text representation (as shown above), and a numeric code, which is what is stored in the example code below. In addition to the allophones, there are inline commands like \SLOW and \FAST that add cadence, emphasis and other effects that make the resulting speech much more natural.
Sort of. But it's really not difficult, and you'll quickly get used to it. The SpeakJet User's Guide lists all of the available allophones, along with tips on how they're best used, and the SpeakJet Dictionary is a text file of hundreds of words already broken down into their allophones. If you have a limited number of words that need to be spoken, it's easy to copy them out of the dictionary into your code. If you need to build new words that aren't in the dictionary, start with a similar-sounding word in the dictionary to see how it's constructed, and play around with the allophones until it sounds right.
To plug your VoiceBox shield into an Arduino, you'll need to solder the included stackable headers to the board. If you've never soldered before, don't worry, it's easy (although you may want to practice on something else if this is your very first time soldering). The six and eight-pin headers go into the matching groups of six and eight holes on the edges of the board. The socket side of the header goes on the component (top) side of the board, and and the pins stick out the bottom. The easiest way to solder these headers to the board is to insert all four headers into the holes in the board, then flip the assembly upside down and place it on a flat surface. Then you can solder the joints from the bottom (now facing up) side of the board.
It's important for the headers to be soldered on straight so that they will easily plug into an Arduino (and other boards can plug into them). A good way to ensure this is to first solder only one pin on each header, then check the alignment. If something's not right, remelt the joint and straighten up the header before the solder cools. Once the header is straight, solder all the joints. Try not to get too much solder on the long pins that are sticking up, as these need to be clean in order to plug into the sockets on your Arduino.
You'll also need to connect a speaker (such as our 0.5W model, COM-09151) or an amplifier (such as our KIT-09612) to the speaker header, SPK+ and SPK-. The easiest way to do this is to solder short lengths of wire from the speaker header to the terminals on your speaker or amplifier. For speakers, it usually doesn't matter which terminals you connect to which side (but if you're using multiple speakers, you'll want them all wired the same way). If you're using an external amplifier, connect the minus side (SPK-) to the ground or minus side of the amplifier's input.
Once you have a speaker connected, upload the below example code to your Arduino and give it a try. The board will say "ready" when reset, then say "all your base are belong to us" followed by some robotic beeps and chirps. If the volume isn't to your liking, you can adjust the tiny potentiometer on the board. You'll need an equally tiny Phillips screwdriver to turn it, and please be gentle as tiny pots are fragile.
By default, a three-pad solder jumper connects the SpeakJet's serial input to Arduino pin D2. As D2 isn't the standard Arduino TX pin, you'll need to use a software serial library to talk to the SpeakJet chip through D2 (the advantage of this arrangement is that it leaves the standard serial pins D0 and D1 free for other serial use). If you'd rather use the standard TX pin, you can modify solder jumper JP2 to do so (but note if you do this, the SpeakJet chip may make gibberish noises while you're uploading code unless you unplug the VoiceBox shield first). To change the position of the solder jumper, first completely remove the existing solder from the jumper using solder wick (TOL-09327), then add solder to the other side of the jumper to bridge the new connection.
For a more advanced project, check out our tutorial on interfacing a VoiceBox shield to a WiFly shield: WiFly Wireless SpeakJet Server.
If you need help, don't hesitate to contact us at email@example.com, or get advice from other users in our forums. We also love hearing about your projects, so let us know what you're building!
-Your friends at SparkFun.
*If you really need arbitrary text-to-speech generation, SparkFun sells a chip which can do it - the TTS256 (COM-09811). This chip knows 600 rules which let it do a pretty good (but not always perfect) job of translating arbitrary text to allophones (and generally you can fix any problems by "phonetically" spelling the words it's having trouble with). It's even possible to add this chip to the VoiceBox shield, see our tutorial on how to do this (the tutorial is for an earlier version of the VoiceBox board, but the process is the same).