Starboard Module Reference: speech_synthesis.h
Stay organized with collections
Save and categorize content based on your preferences.
A basic text-to-speech API intended to be used for audio accessibility.
Implementations of this API should audibly play back text to assist users in
non-visual navigation of the application.
Note that these functions do not have to be thread-safe. They must only be
called from a single application thread.
Functions
SbSpeechSynthesisCancel
Cancels all speaking and queued speech synthesis audio. Must return immediately.
Declaration
void SbSpeechSynthesisCancel()
SbSpeechSynthesisIsSupported
Returns whether the platform supports speech synthesis
Declaration
bool SbSpeechSynthesisIsSupported()
SbSpeechSynthesisSpeak
Enqueues text
, a UTF-8 string, to be spoken. Returns immediately.
Spoken language for the text should be the same as the locale returned by
SbSystemGetLocaleId().
If audio from previous SbSpeechSynthesisSpeak() invocations is still processing,
the current speaking should continue and this new text should be queued to play
when the previous utterances are complete.
Declaration
void SbSpeechSynthesisSpeak(const char *text)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-19 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-19 UTC."],[[["This API provides text-to-speech functionality for audio accessibility, enabling non-visual application navigation."],["The API includes functions to cancel all speech, check for platform support, and enqueue text for speaking."],["The `SbSpeechSynthesisSpeak` function queues text to be spoken in the system's locale, playing it after any previous audio is complete."],["API functions do not need to be thread-safe and are designed for use within a single application thread."]]],["The provided API facilitates text-to-speech functionality for audio accessibility. Key actions include: `SbSpeechSynthesisCancel`, which immediately stops all current and queued speech; `SbSpeechSynthesisIsSupported`, which checks if the platform has speech synthesis capabilities; and `SbSpeechSynthesisSpeak`, which queues a UTF-8 string (`text`) for speech output in the system's locale. The API is designed for single-threaded use, and new text is queued to play after the prior text has been spoken.\n"]]