gTTS failed while language code contains `-`
See original GitHub issue(venv) ➜ gtts-cli --lang zh-cn 天氣好 --output hello.mp3
Error: 200 (OK) from TTS API. Probable cause: No audio stream in response. Unsupported language 'zh-cn'
(venv) ➜ gtts-cli --lang zh-CN 天氣好 --output hello.mp3
Error: 200 (OK) from TTS API. Probable cause: No audio stream in response. Unsupported language 'zh-cn'
(venv) ➜ gtts-cli --lang zh-cn 天氣好 --output hello.mp3
Error: 200 (OK) from TTS API. Probable cause: No audio stream in response. Unsupported language 'zh-cn'
(venv) ➜ gtts-cli --lang pt-br 天氣好 --output hello.mp3
Error: 200 (OK) from TTS API. Probable cause: No audio stream in response. Unsupported language 'pt-br'
(venv) ➜ gtts-cli --lang pt-br aa --output hello.mp3
Error: 200 (OK) from TTS API. Probable cause: No audio stream in response. Unsupported language 'pt-br'
(venv) ➜ gtts-cli --lang fr-ca aa --output hello.mp3
Error: 200 (OK) from TTS API. Probable cause: No audio stream in response. Unsupported language 'fr-ca'
(venv) ➜ gtts-cli --lang fr aa --output hello.mp3 (No Error)
Looks like google translate api become case sensitive. It only accept zh-TW
instead of zh-tw
now. So the following line need to fix.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top Results From Across the Web
gTTS failed while language code contains `-` - Bountysource
(venv) ➜ gtts-cli --lang zh-cn 天氣好 --output hello.mp3 Error: 200 (OK) from TTS API. Probable cause: No audio stream in response.
Read more >python gTTS RuntimeError: Unable to get language list ...
I use gTTS module.One day,this error suddenly happened.Yes,I have never handled these codes from the time of importing it.Until yesterday,this ...
Read more >If you get an error using gtts module - python programming
The gtts module, is the api that python can use to access to the google text to speech engine, so that you can...
Read more >Error if text > 200 char · Issue #252 · pndurette/gTTS - GitHub
I am currently running version 2.2.0 and it seems like if the text we are trying to convert is greater than 200 char,...
Read more >Changelog - gTTS documentation
Python 2 support will be completely removed in the next major release. ... The following list of 'hyphenated' language codes no longer work...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pndurette I think the brazil user you mentioned is right to some extent… In india, for ‘en’, ‘en-IN’ is recieved… I guess only selected regions recieve it. I also tried to change the tlds according to the regions, and i did find some variations (I tried only for ‘en’) , but i wasn’t able to label them… I mainly searched for my requirement (en-US) by using tld as ‘us’(instead of ‘com’) but as you tried with VMs; US, UK and Australia did remain same.
I think bug label should be added to this issue.