-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
[voice] Update dialog processing #2693
Conversation
ee5c58c
to
9317b44
Compare
9b5e80c
to
f9d3fed
Compare
@cweitkamp @wborn @kaikreuzer : this PR is now ready for review. |
I have to mention that it is a API breaking change as the public |
@openhab/core-maintainers : I would appreciate if this could be included in 3.3M1. This is important as first keyword spotting and Speech-to-Text addons will be included. |
Hey @lolodomo, many thanks for your work on this.
As it is only adding a method (and new runtime exceptions to existing methods), this is not breaking for API consumers, which is fine. This interface is not meant to be implemented by anybody else, it's only meant to be used. |
Related to openhab#2688 Updated methods startDialog New method stopDialog Null annotations added to the class DialogProcessor Allow translation of sentences "said" by the dialog processor in case of error 2 console commands added to start and stop a dialog Enhanced integration tests Signed-off-by: Laurent Garnier <lg.hc@free.fr>
f9d3fed
to
e46df3c
Compare
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.
As we have slightly postponed M1, I just found the time for the review, @lolodomo!
Just a few very minor remarks that should be quick and easy to address (and which could also be done as a follow-up PR in case you cannot address them within the next 2 hours).
private void closeStreamKS() { | ||
AudioStream stream = streamKS; | ||
if (stream != null) { | ||
// Due to the current implementation of JavaSoundAudioSource, the stream is not closed as it would |
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.
Could you elaborate a bit (in the comment) on what the exact problem is?
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 is explained in issue #2702
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.
Could you add a link to this issue in the code then, please?
It looks as this should/could be easily fixed as well, right?
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 will, but I can't do it immediately. (not at home)
Yes a fix is apparently easy. The idea was to discuss the issue with the author code. Maybe you are the author? I don't remember and I have not checked.
if (stream != null) { | ||
// Due to the current implementation of JavaSoundAudioSource, the stream is not closed as it would | ||
// lead to problem | ||
// try { |
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'd prefer to then remove the commented code here.
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 mean we keep the method the comment but not the commented code. Ok with that.
private void closeStreamSTT() { | ||
AudioStream stream = streamSTT; | ||
if (stream != null) { | ||
// Due to the current implementation of JavaSoundAudioSource, the stream is not closed as it would |
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.
see above
@@ -65,7 +76,11 @@ public VoiceConsoleCommandExtension(final @Reference VoiceManager voiceManager, | |||
public List<String> getUsages() { | |||
return List.of(buildCommandUsage(SUBCMD_SAY + " <text>", "speaks a text"), | |||
buildCommandUsage(SUBCMD_INTERPRET + " <command>", "interprets a human language command"), | |||
buildCommandUsage(SUBCMD_VOICES, "lists available voices of the TTS services")); | |||
buildCommandUsage(SUBCMD_VOICES, "lists available voices of the TTS services"), | |||
buildCommandUsage(SUBCMD_START_DIALOG + " [<source> <interpreter> <sink> <keyword>]", |
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.
It looks as if you allow a flexible number of parameters in the implementation, so the usage might better be something like
[<source> [<interpreter> [<sink> [<keyword>]]]]
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.
Yes you're right.
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.
@lolodomo Ok, I merge it now so that it is in 3.3 M1 and you can do a follow-up PR.
Thank you Kai |
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Related to openhab#2688 Updated methods startDialog New method stopDialog Null annotations added to the class DialogProcessor Allow translation of sentences "said" by the dialog processor in case of error 2 console commands added to start and stop a dialog Enhanced integration tests Signed-off-by: Laurent Garnier <lg.hc@free.fr> GitOrigin-RevId: 8f0dd94
…nhab#2729) Signed-off-by: Laurent Garnier <lg.hc@free.fr> GitOrigin-RevId: 3e94dd6
Related to #2688
Updated methods startDialog
New method stopDialog
Null annotations added to the class DialogProcessor
Allow translation of sentences "said" by the dialog processor in case of error
2 console commands added to start and stop a dialog
Enhanced integration tests
Signed-off-by: Laurent Garnier lg.hc@free.fr