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

# Pronounce Text

> Speaks `text` with a TTS voice and returns the audio, so you can check how dictionary words sound. Returns a WAV file, not JSON.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/voice-agents/voice-dictionaries/pronounce
openapi: 3.0.1
info:
  title: Hamsa API
  description: >-
    The Hamsa API: voice agents and their calls, phone numbers, batch calls and
    knowledge bases; speech to text, text to speech, voices and AI content.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v1/voice-agents/voice-dictionaries/pronounce:
    post:
      summary: Hear a pronunciation
      description: >-
        Speaks `text` with a TTS voice and returns the audio, so you can check
        how dictionary words sound. Returns a WAV file, not JSON.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - text
                - ttsVoiceId
              properties:
                text:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: >-
                    A word or short phrase to speak, 1-200 characters
                    (`TextMaxLength` above that).
                  example: مرحبا بكم في همسة، جربوا الـ API
                ttsVoiceId:
                  type: string
                  format: uuid
                  description: >-
                    ID of the TTS voice to speak with: a Hamsa voice, or one of
                    your project's voices.
                  example: 078338c4-7788-4371-95d4-1bbe45021113
            examples:
              arabic:
                summary: Arabic voice (Amjad)
                value:
                  text: مرحبا بكم في همسة، جربوا الـ API
                  ttsVoiceId: 078338c4-7788-4371-95d4-1bbe45021113
              english:
                summary: English voice (Amanda)
                value:
                  text: Welcome to Hamsa. Try the API.
                  ttsVoiceId: bf1f8b18-bb5d-40b6-a46b-89274ea800a2
      responses:
        '200':
          description: >-
            The spoken text as a WAV file (`Content-Disposition: inline;
            filename="pronunciation.wav"`).
          content:
            audio/wav:
              schema:
                type: string
                format: binary
        '400':
          description: >-
            Invalid body, for example `text` over 200 characters
            (`TextMaxLength`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: 'Unauthorized: missing or invalid API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: >-
            No TTS voice with this ID that your project can use: it doesn't
            exist, was deleted, or belongs to another project
            (`TtsVoiceNotFoundOrDeleted`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
          description: >-
            Service error code: the HTTP status with a service prefix (for
            example `8404`). Missing when the service has no code for that
            status.
          example: 8404
        message:
          type: string
          description: >-
            What went wrong. Some services (calls and recordings) put the error
            key here, for example `CallNotFoundOrUnavailable`, and send no
            `messageKey`.
          example: Policy not found!
        messageKey:
          type: string
          description: >-
            Stable key for the error, safe to match on in code. Not returned by
            every service.
          example: PolicyNotFound
        params:
          type: object
          additionalProperties: true
          description: >-
            Details for some errors (for example `reason`). Not returned by
            every service.
          example:
            reason: NO_DRAFT
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.