tom dunigan
/
tts
text-to-speech through DAC to audio amp/speaker
text-to-speech TTS
- This program was based on modifying the Arduino/Teensy TTS library https://github.com/manitou48/TTS
- The audio is generated with the ARM's DAC pin.
- TTS.h selects DAC pin based on MBED board. Only tested on K64F
- Teensy discussions https://forum.pjrc.com/threads/44587-TTS-(Text-to-Speech)-Library-Port
Diff: TTS.cpp
- Revision:
- 1:548323cfdb5d
- Parent:
- 0:bcd16e4a0207
- Child:
- 2:eceeac07154b
--- a/TTS.cpp Sun Jun 11 11:03:23 2017 +0000 +++ b/TTS.cpp Mon Jun 12 19:24:16 2017 +0000 @@ -15,7 +15,6 @@ #include "TTS.h" AnalogOut dac(DACpin); -DigitalOut tom(D0); // Random number seed static byte seed0; @@ -372,11 +371,8 @@ static void sound(byte b) { // Update PWM volume - static int v=1; b = (b & 15); dac.write(0.5*b/16.); - - tom = v; v=1-v; } static byte playTone(byte soundNum, byte soundPos, char pitch1,