---
title: "POST /services/tts/playtext"
method: POST
path: "/services/tts/playtext"
tags: ["TTS"]
---

# POST /services/tts/playtext

`POST /services/tts/playtext`

## Request

- Base URL: `https://api.smartthings.com/v1`
- URL: `https://api.smartthings.com/v1/services/tts/playtext`
- Auth: OAuth 2
  - Implicit: `https://auth-global.api.smartthings.com`
  - Scopes: `x:devices:*`, `mobile`
- TypeScript: <https://skmtc.dev/smartthings/apis/smartthings-api/docs/services/tts/playtext/post.ts> (a function with typed inputs; its response is checked against the schema)

Play text on a device which supports audioNotification

## Headers

- `Authorization` string, string, required

## Request body

- PlaytextBody
  - `deviceId` string, required: Device ID of device on which the audio should be played. Device must support audioNotification capability.
  - `text` string, required: Text to be converted to audio. Cannot exceed 2000 characters for Polly and 425 characters for Bixby
  - `languageCode` string, required: Language used for the text to be converted to speech. Please refer tts/info API to get the options available
  - `voiceId` string, required: VoiceId to be used for the text. Please refer tts/info API to get the options available
  - `audioFormat` 'mp3' | 'pcm': Audio format of the audio file, default to mp3 when ttsProvider is Amazon Polly, default to pcm when ttsProvider is Bixby. Amazon Polly supports mp3 and pcm. Bixby supports only pcm.
  - `ttsProvider` 'polly' | 'bixby': TTS provider to use for converting text to speech, default to polly
  - `engine` 'standard' | 'neural': TTS engine to be used, default to standard, standard - robotic voice, neural - human like and natural voice. This option is available only when ttsProvider is Amazon Polly. Please refer tts/info API to get the options available
  - `speakingStyle` 'news' | 'conversational': Speaking style to be used. This option is available only when ttsProvider is Amazon Polly, engine is neural, and voiceIds are one of the following - Matthew, Joanna, Lupe. Please refer tts/info API to get the options available
  - `volume` integer: Volume of the device at which the audio notification will be played

## Response `200`

Success

- PlayedText
  - `message` string, required: message to indicate success

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `404`: Not found
- `default`: Unexpected error

---

[API](https://skmtc.dev/smartthings/apis/smartthings-api.md) - [All operations](https://skmtc.dev/smartthings/apis/smartthings-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smartthings/apis/smartthings-api/revisions/2788a4236800?raw)
