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 get_response method as a synchronous alternative to converse #1278
Conversation
d3e37bd
to
c19d65e
Compare
|
Hello @MatthewScholefield! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. Comment last updated on December 07, 2017 at 21:50 Hours UTC |
d345e87
to
98d8506
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.
LGTM! once ake approves we are good to merge
98d8506
to
dff2f6e
Compare
mycroft/client/speech/main.py
Outdated
| @@ -56,6 +56,10 @@ def handle_utterance(event): | |||
| ws.emit(Message('recognizer_loop:utterance', event)) | |||
|
|
|||
|
|
|||
| def handle_unknown(): | |||
| ws.emit(Message('speech.recognition.unknown')) | |||
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.
@penrods suggested using recognizer_loop:x internally in the speech client and using mycroft.x.y on the interprocess message bus.
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.
OK, this has been changed to recognizer_loop:speech.recognition.unknown and mycroft.speech.recognition.unknown. Let me know if any other name sounds better.
dff2f6e
to
25d4c98
Compare
25d4c98
to
d2c0528
Compare
d2c0528
to
72eef9c
Compare
mycroft/client/speech/listener.py
Outdated
| @@ -152,6 +152,7 @@ def transcribe(self, audio): | |||
| text = "pair my device" # phrase to start the pairing process | |||
| LOG.warning("Access Denied at mycroft.ai") | |||
| except Exception as e: | |||
| self.emitter.emit('recognizer_loop:peech.recognition.unknown') | |||
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.
Is "peech" intentional?
mycroft/client/speech/main.py
Outdated
| @@ -56,6 +56,10 @@ def handle_utterance(event): | |||
| ws.emit(Message('recognizer_loop:utterance', event)) | |||
|
|
|||
|
|
|||
| def handle_unknown(): | |||
| ws.emit(Message('mycroft.mycspeech.recognition.unknown')) | |||
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.
Is "mycspeech" intentional? Looks like a search/replace error.
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.
Lol, no idea how I failed at typing that much. Fixed now.
72eef9c
to
b82421a
Compare
Several minor documentation changes, plus: * 'cancel' now has to be an exact match * Cancel events return None instead of the spoken cancelation string * Reduced timeout to 10 seconds instead of 20 * Changed 'text' to 'announcement' and simplified logic
Extended the timeout to longer than the listener default (in case of operating in a noisy environment).
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'm good with this after the changes we have made.
mycroft/skills/core.py
Outdated
| def is_cancel(utterance): | ||
| return utterance in cancel_words | ||
|
|
||
| def on_valid_default(utterance): |
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.
Sounds a bit funny since the original parameter isn't called on_valid.
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, merging.
Documentation:
Example usage: