Let the phone speak out the provided text using the built in text to speech engine.
The language parameter is ignored for now and the system language is used.
Typescript Javascript
Copy const onTextToSpeechCallback = (response : TextToSpeechContent , timestamp ?: Date ) => {
console .log (response , timestamp);
};
const request : TextToSpeechContent = {
content : 'Hello World' ,
language : 'en-US'
};
COBI . app . textToSpeech .write (request , onTextToSpeechCallback);
page TextToSpeechContent
Copy const onTextToSpeechCallback = (response , timestamp) => {
console .log (response , timestamp);
};
const request = {
content : 'Hello World' ,
language : 'en-US'
};
COBI . app . textToSpeech .write (request , onTextToSpeechCallback);
Example Response
Copy {
"content" : "Hello World" ,
"language" : "en-US"
}