> ## Documentation Index
> Fetch the complete documentation index at: https://smallestai-ff1e543d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Text to speech

> Get speech for given text using the Waves API



## OpenAPI

````yaml POST /waves/v1/lightning/get_speech
openapi: 3.0.1
info:
  title: Text-to-Speech API (Deprecated)
  description: >
    Deprecated API endpoints for Waves text-to-speech models.

    These lightning large and lightning models are no longer recommended for new
    integrations.


    Please use Lightning v2 or Lightning v3.1 instead.
  version: 1.0.0
servers:
  - url: https://api.smallest.ai
    description: Waves API server
security: []
paths:
  /waves/v1/lightning/get_speech:
    post:
      tags:
        - Lightning (Deprecated)
      summary: Generate speech from text (Lightning)
      description: Converts provided text to speech using the Lightning model.
      operationId: synthesizeLightningSpeech
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LightningRequest'
      responses:
        '200':
          description: Synthesized speech retrieved successfully.
          content:
            audio/wav:
              schema:
                type: string
                format: binary
                description: A PCM int16 WAV file at the specified sample rate.
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: InvalidRequest
                message: The 'text' field is required.
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
                message: Bearer token is missing or invalid.
        '500':
          description: Server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: InternalServerError
                message: An unexpected error occurred.
      deprecated: true
      security:
        - bearerAuth: []
components:
  schemas:
    LightningRequest:
      type: object
      required:
        - text
        - voice_id
      properties:
        text:
          type: string
          description: The text to convert to speech.
        voice_id:
          type: string
          description: The voice identifier to use for speech generation.
        sample_rate:
          type: integer
          description: The sample rate for the generated audio.
          minimum: 8000
          maximum: 24000
          default: 24000
        speed:
          type: number
          description: The speed of the generated speech.
          minimum: 0.5
          maximum: 2
          default: 1
        language:
          type: string
          description: >-
            Language code for text normalization (e.g., how numbers, dates, and
            abbreviations are spelled out). Specify a language code like 'en' or
            'hi' to normalize text according to that language's rules.
          default: en
          enum:
            - en
            - hi
        output_format:
          type: string
          description: The format of the output audio.
          default: pcm
          enum:
            - pcm
            - mp3
            - wav
            - mulaw
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error type.
        message:
          type: string
          description: Error message.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <api_key>`, where
        <api_key> is your api key.

````