-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
add offline tts using pico #5005
Conversation
finally: | ||
os.remove(fname) | ||
if data: | ||
return ("wav", data) |
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.
no newline at end of 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.
updated
|
||
class PicoProvider(Provider): | ||
"""pico speech api provider.""" | ||
|
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.
blank line contains whitespace
Looks good. Finish all task they are open in your PR and fix lint |
with open(fname, 'rb') as voice: | ||
data = voice.read() | ||
except OSError: | ||
return |
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.
You need to return (None, None)
to indicate nothing got returned.
with open(fname, 'rb') as voice: | ||
data = voice.read() | ||
except OSError: | ||
_LOGGER.error("Error trying to read %s",fname) |
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.
missing whitespace after ','
Please look at you Checklist and fix ie. all lint error and add a docu. |
"""Load TTS using pico2wave.""" | ||
if language not in SUPPORT_LANGUAGES: | ||
language = self.language | ||
with tempfile.NamedTemporaryFile(suffix='.wav', delete=False) as tempfp: |
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.
line too long (80 > 79 characters)
Description:
add offline tts using pico
it requires pico2wave to be install on the system, on debian like
sudo apt install libttspico-utils
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#1706
Example entry for
configuration.yaml
(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass