Skip to content
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 expect_response option to speak_methods #576

Merged
merged 1 commit into from Mar 20, 2017

Conversation

Projects
None yet
2 participants
@forslund
Copy link
Member

forslund commented Mar 17, 2017

If expect_response flag is set to True the STT will be triggered just as if the wakeword has been received or the button on the Mycroft enclosure has been pressed.

The speak and speak_dialog methods will continue to work as before

self.speak('Hello there')

But if Mycroft asks a user a question and would like a response from the user the STT can be triggered directly after mycroft finish speaking by setting the expect_result parameter to True

self.speak('Would you like a cookie?', expect_response=True)

Can be useful to create some more natural interaction between the user and Mycroft.

A test skill using this can be downloaded here:
https://drive.google.com/open?id=0B2_BylN8IxZUal9VWFoyNTIyS3c
Hey mycroft I'd like a cup of tea

Add expect_response option to speak_methods
if expect_response flag is set to True the stt will be triggered just as if the wakeword has been received or the button on the mycroft enclosure has been pressed.
@forslund

This comment has been minimized.

Copy link
Member Author

forslund commented Mar 17, 2017

A possible improvement is to check for a ? at the end of the utterance given to speak

@augustnmonteiro augustnmonteiro self-requested a review Mar 20, 2017

@augustnmonteiro augustnmonteiro merged commit 0fe6ee6 into MycroftAI:dev Mar 20, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@forslund forslund deleted the forslund:expect_response branch Sep 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.