text-to-speech through DAC to audio amp/speaker

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 // TTS text to speech from AVR
00002 // https://github.com/manitou48/TTS
00003 //  connect DAC pin to audio amp/speaker
00004 #include "mbed.h"
00005 #include "TTS.h"
00006 
00007 TTS text2speech;
00008 
00009 
00010 int main()
00011 {
00012     printf("hello\n");
00013     wait(2);
00014 
00015     while (true) {
00016         text2speech.setPitch(6);
00017         text2speech.sayText("Hello  master! How are you doin?");
00018         wait(.5);
00019         text2speech.setPitch(1);
00020         text2speech.sayText("I am fine, thankyou.");
00021         wait(.5);
00022         text2speech.sayText("a a  a");;
00023 
00024         wait(5);
00025     }
00026 }