-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding error (non ascii characters are not valid in gTTS()) #71
Comments
I can confirm this (or very similar) issue with Russian language. The reason for such behaviour is that gtts breaks long string on small chunks without preserving coding structure. |
I encounter similar issues for zh-cn, ja. If I input long text. |
Hey! Thanks @Fatallis! Sorry it took so long to look at this, glad you had a working workaround. Everyone: this should be fixed in |
Hello I recently found this new amazing project. Cangratulations!!! I found an error while using a file with spanish text in it.
This is the error message:
'ascii' codec can't encode character u'\xbf' in position 0: ordinal not in range(128)
The text in the input file:
¿Cómo sabes que amas a alguien? Filosofía Martha Nussbaum Incomplegencia Teorema de la Verdad del Corazón, de Platón a Proust.
The command:
gtts-cli -o test.mp3 -f test.txt -l 'es'
I am not an expert with codecs and this stuff, I added this lines to gtts-cli.py:
And it worked well, however I don't know if it's the optimal solution.
The text was updated successfully, but these errors were encountered: