Arduino_PiSpeech.jpg

From Alpha to Beta!

All it took was a dream... Both, my Raspberry PiRaspberry Pi and Arduino DUEArduino DUE came from element14; interfacing them together with my long-life dream creates something spectacular! What I've done now, is combined three hobbies of mine (speech synthesis, Linux OS, electronics) into one conglomerate.

A Gentle Reminder...

This project is of my speech synthesis hobby. This is completely unrelated to voice activation, sound activation, voice recognition, speech recognition, and any other method that requires a microphone. Arduino audio input is not one of my projects!

My Code: Reworked!

Between last night and this morning, I rewrote my entire Arduino sketch, once I figured out how to use strings in Arduino IDE. Last night, it was an alpha and I almost published a blog post then, but I was tired. I wanted my Arduino DUE to have more control over what festival does on my Raspberry Pi, and so I created working functions:

  • SayText(WORDS) - The Text-to-Speech (TTS) Routine
  • SayPhones(PHONES) - Speaks the Phonemes
  • System(COMMAND) - Executes a Linux command
  • Voice(Number) - Selects a voice

The System(COMMAND) function allows the Arduino DUE to execute system commands outside of Festival. In a way, this is mostly good. It can be destructive, too, if your user account is privileged (sudo'd). But, I'm focusing on productivity, and this can be the start of Arduino-controlled maintenance of the Raspberry Pi.

One-Way Operation

When running festival in pipe mode, it doesn't send data in return. That's why there are only two wires between my Raspberry Pi and Arduino DUE; one for TX3 pin 14 and the other for ground (GND). The speaker connected to the Raspberry Pi can give feedback as to what's happening, if not connected to a secure shell (SSH).

Work in Progress...

In no way am I done with this project! It is not ready for field operation; which is its final goal. The goal of standalone is still there, as I plan on interfacing my RTC module to my Raspberry Pi, as well as, making it battery powered and capable of being operated by solar power. I'm looking at provincial operation where it may not have an Internet connection and a keyboard, mouse, and monitor isn't available, and may not have adequate commercial electric power. With the added ability of being able to speak Tagalog, it can prove very beneficial in the long run.

The Wonderful Beta Source Code

Enjoy!!!

 

Marcos "Kuya Marc" Miranda