Alexa Auto SDK
4.3
|
Public Member Functions | |
bool | prepareSpeech (const std::string &speechId, const std::string &text, const std::string &provider, const std::string &options="") |
bool | getCapabilities (const std::string &requestId, const std::string &provider) |
virtual void | prepareSpeechCompleted (const std::string &speechId, std::shared_ptr< aace::audio::AudioStream > preparedAudio, const std::string &metadata)=0 |
virtual void | prepareSpeechFailed (const std::string &speechId, const std::string &reason)=0 |
virtual void | capabilitiesReceived (const std::string &requestId, const std::string &capabilities)=0 |
The TextToSpeech
platform interface should be extended to allow the platform to synthesize Alexa and non-Alexa speech using a text or a SSML document.
The platform implementation is responsible for making request for speech synthesis and requesting capabilities of any Text To Speech provider. The platform should also handle callbacks for each prepareSpeech()
and getCapabilities()
requests.
bool aace::textToSpeech::TextToSpeech::prepareSpeech | ( | const std::string & | speechId, |
const std::string & | text, | ||
const std::string & | provider, | ||
const std::string & | options = "" |
||
) |
Notifies the Engine to prepare a speech asset with speechId
and text
. This is an asynchronous call. The platform is notified about the result of this operation through the prepareSpeechCompleted()
or prepareSpeechFailed()
callbacks.
[in] | speechId | The unique identifier of the speech asset. |
[in] | text | The text in plain or SSML format. |
[in] | provider | The Text To Speech provider to be used to generate the speech asset. This parameter should be "text-to-speech-provider" since there is only one provider in Auto SDK. |
[in] | options | Additional options for the speech synthesis request. Default value is empty string which generates speech in Alexa's voice. This parameter need not be specified if the speech synthesis is expected to be in Alexa's voice |
Sample options payload :
Refer to the Text to Speech provider module documentation for complete details of the requestPayload schema.
bool aace::textToSpeech::TextToSpeech::getCapabilities | ( | const std::string & | requestId, |
const std::string & | provider | ||
) |
Retrieves the capabilities of the provider
.
This is an asynchronous call. The result of the operation is provided by the capabilitiesReceived() callback.
[in] | provider | The unique identifier of the provider. This parameter should be "text-to-speech-provider" since there is only one provider in Auto SDK. |
[in] | requestId | The unique identifier for this request. |
|
pure virtual |
Notifies the platform implementation that the prepareSpeech()
operation of speech asset with speechId
was successful.
[in] | speechId | The unique identifier of the speech asset. |
[in] | preparedAudio | The audio asset. |
[in] | metadata | The metadata of the speech asset. |
Refer to the Text to Speech provider module documentation for complete details of the metadata schema.
|
pure virtual |
Notifies the platform implementation that the prepareSpeech()
operation for the speech asset with speechId
failed.
[in] | id | The unique identifier of the speech asset. |
[in] | reason | The reason for the failure. |
Refer to the Text to Speech provider module documentation for complete details of the error responses.
|
pure virtual |
Notifies the platform implementation of a Text to Speech provider's capabilities. The requestId
corresponds to the ID from the original getCapabilities()
request.
[in] | capabilities | The capabilities corresponding to a Text to Speech provider. |
[in] | requestId | The unique identifier for the original getCapabilities() request. |
Refer to the Text to Speech provider module documentation for complete details of the capabilities payload.
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