![]() |
Alexa Auto SDK
4.3
|
Public Types | |
| using | Initiator = SpeechRecognizerEngineInterface::Initiator |
Public Member Functions | |
| bool | holdToTalk () |
| bool | tapToTalk () |
| bool | startCapture (Initiator initiator, uint64_t keywordBegin=UNSPECIFIED_INDEX, uint64_t keywordEnd=UNSPECIFIED_INDEX, const std::string &keyword="") |
| bool | stopCapture () |
| virtual bool | wakewordDetected (const std::string &wakeword) |
| virtual void | endOfSpeechDetected () |
SpeechRecognizer should be extended to initiate voice interactions with Alexa.
SpeechRecognizer provides interfaces for
AlexaClient::dialogStateChanged().Describes type of event that initiated the speech request
| bool aace::alexa::SpeechRecognizer::holdToTalk | ( | ) |
Notifies the Engine of a speech recognition event initiated by a press-and-hold action on the platform. The Engine will call aace::audio::AudioInput::startAudioInput() to notify the platform implementation when to start writing audio samples.
The platform implementation should call stopCapture() to terminate speech recognition on release of the press-and-hold action.
true if the Engine successfully initiated a recognize event, else false | bool aace::alexa::SpeechRecognizer::tapToTalk | ( | ) |
Notifies the Engine of a speech recognition event initiated by a press-and-release action on the platform. The Engine will call aace::audio::AudioInput::startAudioInput() to notify the platform implementation when to start writing audio samples.
The Engine will terminate the recognize event initiated by the press-and-release action when end of speech is detected.
true if the Engine successfully started a recognize event, else false | bool aace::alexa::SpeechRecognizer::startCapture | ( | Initiator | initiator, |
| uint64_t | keywordBegin = UNSPECIFIED_INDEX, |
||
| uint64_t | keywordEnd = UNSPECIFIED_INDEX, |
||
| const std::string & | keyword = "" |
||
| ) |
Notifies the Engine of a speech recognition event.
If the initiator type is HOLD_TO_TALK, then the platform implementation should call stopCapture() to terminate speech recognition on release of the press-and-hold action. Otherwise, the Engine will terminate the recognize event when end of speech is detected.
| [in] | initiator | The Initiator type for the speech recognition event |
| [in] | keywordBegin | The sample index where the keyword begins. This is required when the initiator type is WAKEWORD, otherwise should be set to SpeechRecognizer::UNSPECIFIED_INDEX. |
| [in] | keywordEnd | The sample index where the keyword ends. This is required when the initiator type is WAKEWORD, otherwise should be set to SpeechRecognizer::UNSPECIFIED_INDEX. |
| [in] | keyword | The keyword being recognized, e.g. "alexa". This is required when the initiator type is WAKEWORD, otherwise should be set to an empty string. |
true if the Engine successfully started a recognize event, else false | bool aace::alexa::SpeechRecognizer::stopCapture | ( | ) |
Notifies the Engine to terminate the current recognize event. The Engine will call aace::audio::AudioInput::stopAudioInput() to notify the platform implementation when to stop writing audio samples.
true if the Engine successfully terminated the current recognize event, else false
|
virtual |
Notifies the platform implementation when a wake word is detected
| [in] | wakeword | The wake word that was detected |
true if the Engine should initiate a recognize event, false if the Engine should ignore the invocation
|
virtual |
Notifies the platform implementation when end of speech is detected for the current recognize event
Alexa Auto SDK 4.3 - Copyright 2017-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0