-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[PiperTTS] Initial contribution #15965
Conversation
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
Hey @dalgwen, if you have a chance to giving it a try, in case you notice something wrong or improvable. |
Excellent ! About the code, I have suggestions, all about cache :
Thanks again |
Does it mean we have to remove the binding? Or does it still work? |
mimic 3 is completely offline, and the code is 100% open source and on github. So, it will continue to work and to be available. Piper has the support of rhasspy and Home Assistant, and many qualities, so it is IMHO the perfect choice now. EDIT : I just realize that you may refer to the Mycroft binding ? |
Additionnal question : Is the service supposed (do you want the service) to work on openHAB 4.0 ? With a 4.0.3 version, I have this :
|
Thank you for testing it. And yes make a lot of sense to apply both suggestions. I found an issue with the option for keeping the voice loaded, seems like when I keep one voice in memory and use another there is a bug in the moment of release the memory of the second one, I think I've made something wrong. I hope to find time these weekend to get the PR ready.
I think bindings of the branch 4.1.0 are not compatibles with 4.0.x versions, I'm not sure about it, I started having problems testing some bindings and moved to the milestones. |
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
I found the problem, I incorrectly understood the piper initialize and terminate methods, I have fixed the implementation. Either way I have changed the preloadModel operation to keep the last voice used loaded, I think it has a lot more sense implemented that way. Also I've extended the cache class and it works nicely, and added a simple cache mechanism to avoid the json read, thank you for the comments! |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/dialog-processing-with-the-pulseaudiobinding/148191/1 |
Co-authored-by: Wouter Born <github@maindrain.net> Signed-off-by: GiviMAD <GiviMAD@users.noreply.github.com>
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
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.
Mainly some minor text comments. Also also some Exception handling improvements can be made. Half way the PiperTTSService i stopped checking, as it seems consistent and i think if you refactor it, you will fix them.
Hope this makes any sense.
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
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.
LGTM, finished the review, but i'm new to voice add-on's, so i think an extra set of @openhab/add-ons-maintainers eyes would be usefull
Thank you for the review! |
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 for the PR! I've added few more minor comments below:
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
...penhab.voice.pipertts/src/main/java/org/openhab/voice/pipertts/internal/PiperTTSService.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Wouter Born <github@maindrain.net> Signed-off-by: GiviMAD <GiviMAD@users.noreply.github.com>
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
Thanks for this contribution. Also @wborn for the extra check. |
* [PiperTTS] Initial contribution Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
This is a
working in progressPR for integrating Piper.It's already finished, but I let by error a println call inside the library used, so it can not be merged. I'm going to let it for next weekend so I can also give it another review.I noticed a problem with Piper when using the low size models at short phrases, but with the medium model I have tested it works great and very fast without using too much ram.