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.

Command for say text to call

type: object
title: Say text to Call
additionalProperties: false
properties:
  text:
    type: string
  locale:
    type: string
    format: locale-bcp47
    default: en-US
    example:
      - en-US
    enum:
      - arb
      - ar-AE
      - ca-ES
      - yue-CN
      - cmn-CN
      - da-DK
      - nl-BE
      - nl-NL
      - en-AU
      - en-GB
      - en-IN
      - en-NZ
      - en-ZA
      - en-US
      - en-GB-WLS
      - fi-FI
      - fr-FR
      - fr-CA
      - hi-IN
      - de-DE
      - de-AT
      - is-IS
      - it-IT
      - ja-JP
      - ko-KR
      - nb-NO
      - pl-PL
      - pt-BR
      - pt-PT
      - ro-RO
      - ru-RU
      - es-ES
      - es-MX
      - es-US
      - sv-SE
      - tr-TR
      - cy-GB
  voice:
    type: string
    enum:
      - male
      - female
  loop:
    type: integer
  timeout:
    type: integer
required:
  - text

Say TTS

post

Say TTS into a channel call

Authorizations
Path parameters
workspaceIdstring · uuidRequired

The ID of the workspace

callIdstring · uuidRequired

The ID for a call

channelIdstring · uuidRequired

The ID for a channel

Body
textstringRequired
localestring · enumOptionalDefault: en-USExample: en-USPossible values:
voicestringOptional
loopintegerOptional
timeoutintegerOptional
Responses
202
Call Command Say was accepted for processing
application/json
post
POST /workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/say HTTP/1.1
Host: 
Authorization: Bearer jwt
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "text": "text",
  "locale": "en-US",
  "voice": "text",
  "loop": 1,
  "timeout": 1
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "callId": "123e4567-e89b-12d3-a456-426614174000",
  "callFlowId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "text",
  "command": "text",
  "conditions": [
    {
      "variable": "keys",
      "operator": "eq",
      "value": "text"
    }
  ]
}

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-access-key}"

Last updated

Was this helpful?