String GoogleTTS::getSpeechUrl(String text, String lang)
{
return String("https://") + HOST_GTRANS + PATH_GTRANS + "?ie=UTF-8&q=" + this->urlencode(text) + "&tl=" + lang + "&client=tw-ob&ttsspeed=1";
}
Giving something like this:
https://translate.google.com/translate_tts?ie=UTF-8&q=This%20is%20just%20a%20test%20on%20the%20ESP8266&tl=en&client=tw-ob&ttsspeed=1
This is also mentioned on the original Japanese page:
Library for TextToSpeech with ESP8266 using Google Translate
In fact, the ESP8266 doesn't speak, so it's a title scam.
what you can do
Again, the ESP8266 doesn't speak a word.
Just use Google Translate to create an audio file (mp3) URL from the text you want to speak.
It doesn't download the audio file from the created URL either.
Essentially, it's a reinvention of the google-tts-api module for node.js.
Downloading and playback of audio files should be implemented by each person.