So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By QuickFix
#96322 As I understand that library is only a simple ESP8266 implementation of the Google TTS link creator; it's doesn't do the actual audio download, processing or output, but merely creates a URL to the Google service for the text you want an MP3 of:
Code: Select allString 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:
Code: Select allhttps://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.