-
Notifications
You must be signed in to change notification settings - Fork 6
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
Added functionality for using pyttsx3 instead of coqui-ai TTS #33
base: dev
Are you sure you want to change the base?
Conversation
Thanks @soleyhyman - I've updated |
…st-time run, but leaves the tts engine in an abortive state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for your work! I had a few issues with pyttsx3
on my system, but with some tweaks it's almost there I think. see here: soleyhyman#1 - I'd like to look into this a but more
src/strauss/tts_caption.py
Outdated
else: | ||
TTS() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can move this to L116 in order to work correctly for no tts modules case
src/strauss/tts_caption.py
Outdated
try: | ||
import pyttsx3 | ||
ttsMode = 'pyttsx3' | ||
print('pyttsx3 has been successfully imported.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can comment out these prints for now - we want to implement logging / debug text at some point but generally trying to keep quiet unless needed
src/strauss/tts_caption.py
Outdated
print('Rendering caption (this can take a while if the caption is long)...') | ||
|
||
# capture stdout from the talkative TTS module | ||
with utils.Capturing() as output: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like pttsx3
is quiet - so perhaps don't need the capturing environment in this case
…to pyttsx3 or nothing.
…tting edge git version currently)
Merging into dev branch before testing examples
@soleyhyman looks like a fix for nateshmbhat/pyttsx3#384 was pushed (willwade/pyttsx3@4d90b3f) - could try this with
|
This pull request adds additional text-to-speech functionality in case users are unable to install the Coqui-AI TTS package. The proposed code uses the pyttsx3 package. In it's essence, the added code checks whether the Coqui-AI TTS package can be imported. If it can, the code proceeds as usual (with the new ttsMode variable set to 'coqui-TTS'). Otherwise, it tries to import pyttsx3 and set the ttsMode variable to 'pyttsx3'.