Skip to main content
POST
/
api
/
v1
/
bots
/
{object_id}
/
speech
Output Speech
curl --request POST \
  --url https://api.example.com/api/v1/bots/{object_id}/speech \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>",
  "text_to_speech_settings": {},
  "text_to_speech_settings.google.voice_language_code": "<string>",
  "text_to_speech_settings.google.voice_name": "<string>"
}
'
Causes the bot to speak a text message in the meeting using text-to-speech synthesis.

Authentication

Requires API key authentication via the Authorization header.

Path Parameters

object_id
string
required
Bot ID (e.g., bot_xxxxxxxxxxx)

Request Body

text
string
required
The text message for the bot to speak
text_to_speech_settings
object
required
Text-to-speech configuration settings

Google Text-to-Speech Settings

text_to_speech_settings.google.voice_language_code
string
required
Voice language code (e.g., ‘en-US’). See Google TTS voices for available options.
text_to_speech_settings.google.voice_name
string
required
Name of the voice to use (e.g., ‘en-US-Casual-K’)

Response

Returns a 200 status code when the speech request is successfully created.

Example Request

curl -X POST https://app.attendee.dev/api/v1/bots/bot_weIAju4OXNZkDTpZ/speech \
  -H "Authorization: Token YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, this is a bot speaking text.",
    "text_to_speech_settings": {
      "google": {
        "voice_language_code": "en-US",
        "voice_name": "en-US-Casual-K"
      }
    }
  }'

Example with Different Voice

curl -X POST https://app.attendee.dev/api/v1/bots/bot_weIAju4OXNZkDTpZ/speech \
  -H "Authorization: Token YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Welcome to the meeting. I am your virtual assistant.",
    "text_to_speech_settings": {
      "google": {
        "voice_language_code": "en-US",
        "voice_name": "en-US-Neural2-J"
      }
    }
  }'

Error Responses

400 Bad Request

Returned when:
  • Missing required fields
  • Invalid voice configuration
  • Bot is not in a valid state to output speech

404 Not Found

Returned when the bot ID does not exist.
Use the speech endpoint for announcements, greetings, or interactive voice responses. The bot must be in an active meeting state to speak.

Build docs developers (and LLMs) love