> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Speak in a meeting session

> Sends audio / text-to-speech into a meeting session.



## OpenAPI

````yaml /openapi/source/external/meeting-sessions/meeting-sessions.json post /meeting_sessions/{id}/actions/speak
openapi: 3.1.0
info:
  title: Telnyx Meeting Sessions API
  version: 2.0.0
  description: >-
    Programmatically create, control, and inspect Telnyx Meeting Sessions,
    including real-time actions, events, transcripts, recordings, and artifacts.
  x-latency-category: interactive
  x-endpoint-cost: light
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
tags:
  - name: Meeting Sessions
    description: Create, list, retrieve, update, and stop meeting sessions.
  - name: Meeting Session Actions
    description: Send real-time speech and chat actions to an active meeting session.
  - name: Meeting Session Data
    description: >-
      Read lifecycle events, transcript segments, and recordings for a meeting
      session.
  - name: Meeting Session Artifacts
    description: Create and retrieve asynchronous summaries and action-item artifacts.
  - name: Meeting Session Webhooks
    description: Outbound webhook deliveries for meeting session events.
paths:
  /meeting_sessions/{id}/actions/speak:
    post:
      tags:
        - Meeting Session Actions
      summary: Speak in a meeting session
      description: Sends audio / text-to-speech into a meeting session.
      operationId: speakMeetingSession
      parameters:
        - $ref: '#/components/parameters/MeetingSessionId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpeakMeetingSessionRequest'
            example:
              text: Here are the three decisions from this call.
              interrupt: false
      responses:
        '202':
          description: The speak action was accepted and is being processed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionAcceptedResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/MeetingSpeakUpstreamError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.meetingSessions.actions.speak('id', {
              text: 'text',
            });

            console.log(response.data);
        - lang: Python
          source: |
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.meeting_sessions.actions.speak(
                id="id",
                text="text",
            )
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.MeetingSessions.Actions.Speak(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\ttelnyx.MeetingSessionActionSpeakParams{\n\t\t\tText: \"text\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.meetingSessions.actions.ActionSpeakParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    ActionSpeakParams params = ActionSpeakParams.builder()
                        .text("text")
                        .build();
                    var response = client.meetingSessions().actions().speak("id", params);
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            response = telnyx.meeting_sessions.actions.speak("id", text: "text")

            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $response = $client->meetingSessions->actions->speak(
                'id',
                text: 'text',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx meeting-sessions:actions speak \
              --api-key 'My API Key' \
              --id id \
              --text text
components:
  parameters:
    MeetingSessionId:
      name: id
      in: path
      required: true
      description: Unique identifier for the meeting session.
      schema:
        type: string
        examples:
          - mtgsess_a1b2c3d4-e5f6-7890-abcd-ef1234567890
  schemas:
    SpeakMeetingSessionRequest:
      title: SpeakMeetingSessionRequest
      type: object
      additionalProperties: false
      required:
        - text
      properties:
        text:
          type: string
          minLength: 1
          maxLength: 4000
          description: Text for the bot to speak.
        voice:
          type: string
          minLength: 1
          maxLength: 100
          description: >-
            Voice identifier to use for this utterance. When supplied, it
            overrides the session-default voice configured at creation;
            otherwise the speak action uses that session default.
        interrupt:
          type: boolean
          description: >-
            If true, interrupt any currently playing audio to speak this text
            immediately.
    ActionAcceptedResponse:
      type: object
      additionalProperties: false
      required:
        - data
      properties:
        data:
          type: object
          additionalProperties: false
          required:
            - accepted
          properties:
            accepted:
              type: boolean
              const: true
      example:
        data:
          accepted: true
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
      examples:
        - error:
            code: invalid_request
            message: webhook_url is disabled
        - error:
            code: not_found
            message: meeting session not found
        - error:
            code: unsupported_capability
            message: avatar video is not supported on platform 'unknown'
        - error:
            code: internal_error
            message: internal server error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: invalid_request
              message: request is invalid
    Unauthorized:
      description: >-
        Unauthorized. On api.telnyx.com, authentication is enforced by the API
        gateway before the request reaches the Meeting service, so a missing or
        invalid API key returns the standard Telnyx error envelope (`{"errors":
        [{"code": "10009", ...}]}`) rather than the single-`error` shape below.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthorized
              message: invalid or missing credentials
    Forbidden:
      description: The authenticated credential is not permitted to perform this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: forbidden
              message: credential is not permitted
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: not_found
              message: meeting session not found
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: invalid_state
              message: only scheduled sessions can be updated
    PayloadTooLarge:
      description: Payload Too Large
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: invalid_request
              message: request body too large
    UnprocessableEntity:
      description: Unprocessable Entity, including an unsupported capability
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unsupported_capability
              message: avatar video is not supported on platform 'unknown'
    TooManyRequests:
      description: >-
        Authentication is temporarily overloaded. Retry after the number of
        seconds in `Retry-After`.
      headers:
        Retry-After:
          required: true
          description: Seconds to wait before retrying.
          schema:
            type: integer
            minimum: 1
            maximum: 5
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: auth_overloaded
              message: authentication temporarily overloaded
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: internal_error
              message: internal server error
    MeetingSpeakUpstreamError:
      description: Text-to-speech generation or meeting audio delivery failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: tts_error
              message: tts synthesis failed
    ServiceUnavailable:
      description: >-
        A required feature or dependency is not configured or authentication is
        unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: not_configured
              message: required feature is not configured
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````