TTS
POST /services/tts
Convert text to speech and return an audio URL. This audio file will be available for 7 days after creation.
Request
- Base URLhttps://api.smartthings.com/v1
- AuthOAuth 2Implicithttps://auth-global.api.smartthings.comScopesx:rules:*, x:devices:*, mobile
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Authorizationstring string required
OAuth token
Request body
Example request
{
"text": "Hi Samsung SmartThings! This is the text to speech service",
"languageCode": "en-US",
"voiceId": "Matthew",
"audioFormat": "mp3",
"ttsProvider": "polly",
"engine": "neural",
"speakingStyle": "conversational"
}Response
Success
Example response
{
"message": "Successfully created an audio file",
"audioURL": "https://generic-tts-prod.s3.amazonaws.com/polly/6f546dd37587382fdafd7eb8a68d15e833efc8ed7278b17bc8ceece20ce70876.mp3"
}Changes
No recorded changes to this operation across all 8 revisions of this API.