-
-
Notifications
You must be signed in to change notification settings - Fork 429
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] Allow hli list #2906
[Voice] Allow hli list #2906
Conversation
ups, adding WIP |
100b934
to
d35048f
Compare
You should keep getHLI unchanged and add a new method taking a comma separated list of IDs and returning a list of HLI. . Note the typo: comma separated list |
d35048f
to
3d91d97
Compare
Ok, but there will be no uses for the 'getHLI(String id)' method other than inside the own VoiceManager, as all the places will call the new method 'getHLIByIds(String idList)'. Is this ok? Edit: Done. I have added 2 new methods at the end because another one was needed to replace the 'getHLI()' method call in some places. |
I think it is better, it avoids breaking the interface and it avoids having a method name not matching what it does. |
3d91d97
to
b2fd89d
Compare
Yes it makes sense, specially the last part, thanks for the explanation. |
b2fd89d
to
50f9d3d
Compare
I forgot to apply spotless last time. |
50f9d3d
to
0908a81
Compare
Now is ready for review. |
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
...s/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java
Outdated
Show resolved
Hide resolved
...s/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java
Outdated
Show resolved
Hide resolved
...s/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java
Outdated
Show resolved
Hide resolved
...s/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java
Outdated
Show resolved
Hide resolved
...s/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java
Outdated
Show resolved
Hide resolved
@lolodomo I have solve part of the review. |
43fb931
to
f48e791
Compare
@lolodomo I have finally followed your advice so I can complete the review. |
48cc12f
to
848eea0
Compare
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
848eea0
to
3ff5086
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.
Still few comments.
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/VoiceManager.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/VoiceManager.java
Outdated
Show resolved
Hide resolved
...s/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java
Show resolved
Hide resolved
...s/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java
Show resolved
Hide resolved
...es/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java
Outdated
Show resolved
Hide resolved
@GiviMAD : most of my remaining comments are about documentation, I think there is not too much work to finish. |
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.
Sorry for being late to the party. I have one general question (which is probably due to me missing knowledge on this part, I never used HLI): If there are multiple HLI and they are all listed, the first result is taken. Could it happen that the user is interested in the result of another HLI? Since Collection
in general does not guarantee order, the user can't control which HLI is queried first.
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/Voice.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/VoiceManager.java
Show resolved
Hide resolved
...es/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java
Outdated
Show resolved
Hide resolved
...es/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java
Outdated
Show resolved
Hide resolved
The order was very important. The user just wants to get the result of the first interpreter able to interpret, considering an ordered list of interpreters. |
Considering @J-N-K comments, I think we should duplicate REST API and actions for "interpret", keeping the existing ones unchanged. That means, we forget the idea of a string containing a coma separated list of ids. For "startDialog" and "listenAndAnswer", as this is recent features added, we can directly consider the list of interpreters as parameter without duplicating them. For REST API, having a List as parameter is not a problem. And finally, is |
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Miguel Álvarez Díez <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.
Please also adapt the documentation: /~https://github.com/openhab/openhab-docs/blob/main/configuration/multimedia.md
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/VoiceManager.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/VoiceManager.java
Show resolved
Hide resolved
...es/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java
Outdated
Show resolved
Hide resolved
...es/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java
Outdated
Show resolved
Hide resolved
...s/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java
Outdated
Show resolved
Hide resolved
...s/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java
Outdated
Show resolved
Hide resolved
...s/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceManagerImpl.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/VoiceManager.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Miguel Álvarez Díez <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.
Final review
bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/VoiceManager.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/VoiceManager.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/VoiceManager.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/VoiceManager.java
Outdated
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
....core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Miguel Álvarez Díez <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, thank you @GiviMAD
The parameters for REST API that have been marked as deprecated could be discussed as these REST API were added very recently and are only available in 3.3 snapshots and 3.3 milestones.
@GiviMAD ; is it clear for you what must be kept as deprecated and what must be removed? |
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
Perfect IMHO |
Once merged, I will propose a big update in the documentation to add/update all existing actions and console commands about voice management. |
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.
This fixes the null type errors in Eclipse which were introduced by openhab#2906. Signed-off-by: Wouter Born <github@maindrain.net>
This fixes the null type errors in Eclipse which were introduced by #2906. Signed-off-by: Wouter Born <github@maindrain.net>
* [Voice] Allow hli list Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com> GitOrigin-RevId: 5753627
This fixes the null type errors in Eclipse which were introduced by openhab#2906. Signed-off-by: Wouter Born <github@maindrain.net> GitOrigin-RevId: 86ee4dc
Signed-off-by: Miguel Álvarez Díez miguelwork92@gmail.com
This is a proposed solution for #2904 based on the feedback from @lolodomo.
Basically allows to pass a comma separate list of hli ids instead of a single one.
I have some doubts about renaming the hli vars, and the 'getHLI' methods, as there is already a getHLIs method that returns all the available interpreters, let me know if it's better to rename them.