nateshmbhat / pyttsx3

Offline Text To Speech synthesis for python
Mozilla Public License 2.0
2.12k stars 332 forks source link

Why does pyttsx3 not detect voices on Linux? #178

Closed DgDays closed 6 days ago

DgDays commented 3 years ago

Good day! I installed the module and RHVoice voices, but the module does not see them in Linux. At the same time, everything works great on Windows. Please help me solve the problem.

PS for more details here: https://stackoverflow.com/questions/66012431/why-cant-i-change-voice-in-pyttsx3

TotallyAProgrammer commented 3 years ago

What TTS engine are you using on your Linux tests?

DgDays commented 3 years ago

Какой движок TTS вы используете в своих тестах Linux?

If I understand you correctly, then RHVoice-test converts text to speech

TotallyAProgrammer commented 3 years ago

RHVoice is a speech synthesis engine, and there is no wrapper in PyTTSX3 for it. So anything you do with it won't really impact PyTTSX3 or even be accessible from PyTTSX3.

DgDays commented 3 years ago

RHVoice - это механизм синтеза речи, и в PyTTSX3 для него нет оболочки. Так что все, что вы с ним сделаете, на самом деле не повлияет на PyTTSX3 и даже не будет доступно из PyTTSX3.

Damn, but languages appeared. Before that, there was not even a list of voices, but now there is one, though there are only languages ...

TotallyAProgrammer commented 3 years ago

I'm using eSpeak-ng on Arch linux and am able to get the russian language to work by default.

TotallyAProgrammer commented 3 years ago

To be more specific, my code looks like this:

#!/bin/python3

import pyttsx3

engine = pyttsx3.init()

engine.setProperty('voice', 'russian')

engine.setProperty('rate', 100)

engine.say("русский язык")

engine.runAndWait()

I am also running the latest version of pyttsx3, which has to be built from source. That is the version that implements support for eSpeak-ng which has native support for the Russian language

DgDays commented 3 years ago

Nothing has changed. Even this package installed and zero changes

TotallyAProgrammer commented 3 years ago

If you build PyTTSX3 from source, it will be version 2.91 which contains the updated code to interact with eSpeak-ng, enabling the Russian language. The PyPi version (2.90), does not contain the updated code.

DgDays commented 3 years ago

If you build PyTTSX3 from source, it will be version 2.91 which contains the updated code to interact with eSpeak-ng, enabling the Russian language. The PyPi version (2.90), does not contain the updated code.

I installed 2.91 version...

TotallyAProgrammer commented 3 years ago

If you are running pyttsx3 2.91 and eSpeak-ng, then I don't know what else would be wrong. I tested 2.91 with eSpeak-ng and I had no issues. I'm sorry, but this might not be an issue with pyttsx3, which makes it something we can't really help with.

DgDays commented 3 years ago

If you are running pyttsx3 2.91 and eSpeak-ng, then I don't know what else would be wrong. I tested 2.91 with eSpeak-ng and I had no issues. I'm sorry, but this might not be an issue with pyttsx3, which makes it something we can't really help with.

It's a shame(

Added a video with work. Writes that the Russian language is not completely installed

https://user-images.githubusercontent.com/55804305/106929699-80b25d80-6736-11eb-8492-886c0f34166f.mp4

TotallyAProgrammer commented 3 years ago

It says that the video is corrupt. Also, the Russian language not being completely installed shouldn't stop you from using the language, I got the same error and it sounded right with what I tested. I really don't know why it would complain about that anyway, because the Russian language comes preinstalled with eSpeak-ng

DgDays commented 3 years ago

It says that the video is corrupt. Also, the Russian language not being completely installed shouldn't stop you from using the language, I got the same error and it sounded right with what I tested. I really don't know why it would complain about that anyway, because the Russian language comes preinstalled with eSpeak-ng

Try to remove the voice change line and the result will be the same) The fact is that pyttsx3 tries to sound the Russian line in an English voice, therefore it outputs that there are not enough files for Russian

willwade commented 6 days ago

ok to be clear..

I'm like 90% RH arent doing that. The closest is they likely used the phonemizer from espeak.. feel free for someone to correct me!