Reputation: 31
i'm trying to change the accent of gTTS from the default to another (en-uk, en-au, en-za, whichever). It works fine when i set it to
tts = gTTS(text=audio_string, lang='en',slow=False)
but not when I set it to anything else, like
tts = gTTS(text=audio_string, lang='en-au',slow=False)
or even
tts = gTTS(text=audio_string, lang='en-us',slow=False)
other languages work fine as long as I don't specify an accent. why is this? thanks :)
Upvotes: 0
Views: 3233
Reputation: 31
You can check Localized ‘accents’ and Examples on gTTS documentation. It should be:
tts = gTTS(text=audio_string, tld='com.au', lang='en', slow=False)
Upvotes: 3