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

Dependencies:   mbed

text-to-speech TTS

Committer:
manitou
Date:
Sun Jun 11 11:03:23 2017 +0000
Revision:
0:bcd16e4a0207
text-to-speech TTS through DAC to audio amp/speaker

Who changed what in which revision?

UserRevisionLine numberNew contents of line
manitou 0:bcd16e4a0207 1 // TTS text to speech from AVR
manitou 0:bcd16e4a0207 2 // https://github.com/manitou48/TTS
manitou 0:bcd16e4a0207 3 // connect DAC pin to audio amp/speaker
manitou 0:bcd16e4a0207 4 #include "mbed.h"
manitou 0:bcd16e4a0207 5 #include "TTS.h"
manitou 0:bcd16e4a0207 6
manitou 0:bcd16e4a0207 7 TTS text2speech;
manitou 0:bcd16e4a0207 8
manitou 0:bcd16e4a0207 9
manitou 0:bcd16e4a0207 10 int main()
manitou 0:bcd16e4a0207 11 {
manitou 0:bcd16e4a0207 12 printf("hello\n");
manitou 0:bcd16e4a0207 13 wait(2);
manitou 0:bcd16e4a0207 14
manitou 0:bcd16e4a0207 15 while (true) {
manitou 0:bcd16e4a0207 16 text2speech.setPitch(6);
manitou 0:bcd16e4a0207 17 text2speech.sayText("Hello master! How are you doin?");
manitou 0:bcd16e4a0207 18 wait(.5);
manitou 0:bcd16e4a0207 19 text2speech.setPitch(1);
manitou 0:bcd16e4a0207 20 text2speech.sayText("I am fine, thankyou.");
manitou 0:bcd16e4a0207 21 wait(.5);
manitou 0:bcd16e4a0207 22 text2speech.sayText("a a a");;
manitou 0:bcd16e4a0207 23
manitou 0:bcd16e4a0207 24 wait(5);
manitou 0:bcd16e4a0207 25 }
manitou 0:bcd16e4a0207 26 }