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

# Stream Speech

> Streams the audio bytes with our ultra-fast text-in, audio-out API.



## OpenAPI

````yaml openapi POST /api/v1/tts/stream
openapi: 3.0.3
info:
  title: PlayAI Dialog Turbo API
  version: 1.0.0
  description: |
    API documentation for PlayAI's Dialog Turbo model
servers:
  - url: https://api.play.ai
security:
  - ApiKeyAuth: []
    XUserIdAuth: []
paths:
  /api/v1/tts/stream:
    post:
      description: >
        Streams the audio bytes with our ultra-fast text-in, audio-out API. 

        Our HTTP streaming endpoint allows you to send text and receive audio
        bytes in real-time.
      requestBody:
        content:
          application/json:
            schema:
              title: Generate speech with the PlayAI's Dialog Turbo model
              type: object
              properties:
                model:
                  type: string
                  enum:
                    - PlayDialog-turbo
                  example: PlayDialog-turbo
                  nullable: false
                  description: >-
                    > **ℹ️ NOTE:** This endpoint only supports **Dialog 1.0
                    Turbo**: Our fastest model with best quality and multi-turn
                    dialogue capabilities, but with a narrower feature set than
                    **Dialog 1.0** and **Play 3.0 Mini**.


                    > **💡 Tip:** For more information, see
                    [Models](/documentation/text-to-speech/tts-models).
                text:
                  type: string
                  description: >-
                    The text to be converted to speech. Limited to 20,000
                    characters.
                  example: Hello, this is a test of the PlayDialog-turbo model.
                voice:
                  $ref: '#/components/schemas/PlayDialogTurboVoiceId'
                outputFormat:
                  type: string
                  enum:
                    - wav
                    - mp3
                    - ogg
                    - mulaw
                    - flac
                  default: wav
                  nullable: true
                  description: The format for the output audio.
                language:
                  type: string
                  enum:
                    - arabic
                    - english
                  nullable: true
                  description: The language of the voice. More will be available soon.
                  default: english
                  example: english
              required:
                - model
                - text
                - voice
      responses:
        '200':
          description: A stream of audio bytes.
          x-responseType: stream
          content:
            audio/mpeg:
              schema:
                type: string
                format: binary
        '400':
          $ref: '#/components/responses/400-InvalidParametersError'
        '401':
          $ref: '#/components/responses/401-UnauthorizedError'
        '403':
          $ref: '#/components/responses/403-ForbiddenError'
        '429':
          $ref: '#/components/responses/429-RateLimitedError'
        '500':
          $ref: '#/components/responses/500-UnexpectedError'
components:
  schemas:
    PlayDialogTurboVoiceId:
      description: >-
        The unique ID for a PlayAI `PlayDialog-turbo` Voice.

        Available voices depend on the selected language:

        - For Arabic: `Nasser-PlayAI`, `Khalid-PlayAI`, `Amira-PlayAI`,
        `Ahmad-PlayAI`

        - For English: `Aaliyah-PlayAI`, `Adelaide-PlayAI`, `Angelo-PlayAI`,
        `Arista-PlayAI`, `Atlas-PlayAI`, `Basil-PlayAI`, `Briggs-PlayAI`,
        `Calum-PlayAI`, `Celeste-PlayAI`, `Cheyenne-PlayAI`, `Chip-PlayAI`,
        `Cillian-PlayAI`, `Deedee-PlayAI`, `Eleanor-PlayAI`, `Fritz-PlayAI`,
        `Gail-PlayAI`, `Indigo-PlayAI`, `Jennifer-PlayAI`, `Judy-PlayAI`,
        `Mamaw-PlayAI`, `Mason-PlayAI`, `Mikail-PlayAI`, `Mitch-PlayAI`,
        `Nia-PlayAI`, `Quinn-PlayAI`, `Ruby-PlayAI`, `Thunder-PlayAI`


        More voices will be available soon.
      type: string
      enum:
        - Aaliyah-PlayAI
        - Adelaide-PlayAI
        - Angelo-PlayAI
        - Arista-PlayAI
        - Atlas-PlayAI
        - Basil-PlayAI
        - Chip-PlayAI
        - Cillian-PlayAI
        - Deedee-PlayAI
        - Eleanor-PlayAI
        - Fritz-PlayAI
        - Gail-PlayAI
        - Indigo-PlayAI
        - Jennifer-PlayAI
        - Judy-PlayAI
        - Mamaw-PlayAI
        - Mason-PlayAI
        - Mikail-PlayAI
        - Mitch-PlayAI
        - Nia-PlayAI
        - Quinn-PlayAI
        - Ruby-PlayAI
        - Thunder-PlayAI
        - Nasser-PlayAI
        - Khalid-PlayAI
      example: Atlas-PlayAI
    ErrorResponseObject:
      type: object
      properties:
        errorMessage:
          type: string
        errorId:
          type: string
  responses:
    400-InvalidParametersError:
      description: The provided payload contains one or more invalid parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseObject'
          example:
            error_message: The 'text' parameter must be provided.
            error_id: INVALID_PARAMETERS
    401-UnauthorizedError:
      description: >-
        The request was not authorized. Please verify your authorization
        headers.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseObject'
          example:
            error_message: >-
              The authorization header must be provided in the format 'Bearer
              <YOUR-API-KEY>'
            error_id: UNAUTHORIZED
    403-ForbiddenError:
      description: >-
        The provided API key's plan does not have access to the requested
        resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseObject'
          example:
            error_message: API access is not available on your current plan.
            error_id: UNSUPPORTED_PLAN
    429-RateLimitedError:
      description: >-
        The server has received too many requests from your IP address within a
        certain time frame and has temporarily blocked your access to this
        resource. This error is used to prevent abuse of the server. Please
        refer to the [Rate-Limits](/documentation/guides/rate-limits) section
        for more information.
      content:
        application/json:
          schema:
            type: string
          example: Rate limit exceeded. Please wait a few moments and try again.
    500-UnexpectedError:
      description: An unexpected error occurred.
      content:
        application/json:
          schema:
            type: object
            properties:
              errorMessage:
                type: string
              errorId:
                type: string
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret API key from [PlayAI](https://play.ai/api/keys), formatted
        as `Bearer YOUR_SECRET_API_KEY`.
    XUserIdAuth:
      type: apiKey
      in: header
      name: X-USER-ID
      description: Your unique user ID from [PlayAI](https://play.ai/api/keys).

````