-
Notifications
You must be signed in to change notification settings - Fork 7
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
use espeak cmd instead of espeak-ng on macOS #9
base: master
Are you sure you want to change the base?
Conversation
speed = 175, # approx. words per minute | ||
voice = 'english-us'): | ||
speed = 175, # approx. words per minute | ||
voice = 'en'): |
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.
there's no voice named 'english-us' by espeak-ng default installation, you can set it to 'en' or 'en-us'
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.
Please do not change indentation. If voice names have changed, I guess we need to update tests as well.
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.
there are no indentations changed, only some white space trimmed at line end
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.
same problem here. should switch to en-us
|
||
def _espeak_exe(self, args, sync=False): | ||
cmd = ['espeak-ng', | ||
cmd = ['espeak' if platform.system()=='Darwin' else 'espeak-ng', |
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 searched in https://brew.sh/ and found espeak, but no espeak-ng, I guess you can only brew install espeak.
They seem to have some problems unresolved with espeak-ng on mac espeak-ng/espeak-ng#12.
I hope this will solve #1 , but I don't have a mac to confirm . I tested it on Ubuntu18 and Win10
I have a little robot project, it's tts function depends on py-espeak-ng. I hope it support all platforms
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.
This looks like a hack to me. We could look into auto-detecting the availability of first espeak-ng and, as a fallback espeak on a system and use the best available option.
@@ -102,11 +103,11 @@ def say(self, txt, sync=False): | |||
|
|||
return self._espeak_exe(args, sync=sync) | |||
|
|||
def synth_wav(self, txt, fmt='txt'): | |||
def synth_wav(self, txt, file=None, fmt='txt'): |
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.
add a option to save to a non-temp file
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.
lacks implementation, doesn't it?
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.
implemented in line#110
Thanks for your review, I realize it's not the best solution to switch from espeak-ng to espeak on mac, since espeak is no longer developed on. but you get my point. |
I made 3 changes in Line#35, Line#48 and Line#110~#126.
other changes are white space auto trimmed by my sublime-text, please ignore