Say Text-To-Speech (TTS)
Use this request in order to say a text message during a call, this API uses our Text-To-Speech service to convert the provided text into an audio, you can configure the text, language, voice nature and if you want the message to repeat.
POST
/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/say
Say TTS into a channel call
请求载荷
text
string
必填
locale
string
Curated set of BCP47 locale identifiers supported by AWS Polly text-to-speech in Bird voice products
Possible values: arb, ar-AE, bg-BG, bn-IN, ca-ES, cs-CZ, cy-GB, cmn-CN, da-DK, de-CH, de-DE, de-AT, el-GR, en-AU, en-GB, en-IN, en-NZ, en-ZA, en-US, en-GB-WLS, es-ES, es-MX, es-US, eu-ES, fi-FI, fil-PH, fr-FR, fr-BE, fr-CA, gl-ES, gu-IN, he-IL, hi-IN, hu-HU, id-ID, is-IS, it-IT, ja-JP, ko-KR, lt-LT, lv-LV, ms-MY, nl-BE, nl-NL, nb-NO, pa-IN, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sr-RS, sv-SE, ta-IN, te-IN, tr-TR, th-TH, uk-UA, vi-VN, yue-CN
voice
string
loop
integer
timeout
integer
响应载荷
id
string
callId
string
callFlowId
string
status
string
command
string
conditions
array of object
显示子属性
conditions.variable
string
Possible values: keys, speech
conditions.operator
string
Possible values: eq, ne, ==, !=, contains
conditions.value
string
代码示例
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/say' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'Example 1: Play an announcement when an outbound call is running
代码示例
curl -X POST "https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/say" \
-H "Authorization: AccessKey YOUR_SECRET_TOKEN"
代码示例
{
"text": "Hi there my name is earl",
"locale": "en-US",
"voice": "female"
}
代码示例
{
"id": "9ec389c1-a37c-44b8-b09d-2fec18b5c7c6",
"callId": "0374a740-390d-4395-a007-8ca87ce9f9c9",
"command": "say",
"status": "accepted"
}