Here is the github page https://github.com/jscrane/TTS
## Supported Hardware
- ATmega328-based Arduinos (e.g., Uno, Pro, Pro Mini, etc.): pins 3, 9, 10
-ESP8266: pins 0 to 16 (with analogWrite())
(It does support others too, but I've mentioned only these)
what do I need to change in the code?
Here is the example code which worked for the nano. changing just the PIN number to the appropriate number of the esp8266 according to its pinout did not work.
#include <TTS.h>
// Media pins
#define PIN 3
//#define LED 13
TTS text2speech(PIN); // default is digital pin 10
void setup() {
// pinMode(LED, OUTPUT);
}
void loop() {
// digitalWrite(LED, !digitalRead(LED));
text2speech.setPitch(6);
text2speech.sayText("Hello master! How are you doin?");
delay(500);
text2speech.setPitch(1);
text2speech.sayText("I am fine, thankyou.");
delay(1000);
}