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

# Text-to-speech synthesis

> Convert text to natural-sounding audio using ElevenLabs voices. Ideal for creating audio summaries of legal documents, client presentations, or accessibility features. Supports multiple languages and voice customization.



## OpenAPI

````yaml /openapi.json post /voice/v1/speak
openapi: 3.1.0
info:
  title: Case.dev API
  description: >-
    The AI-native platform for legal technology. Build smarter legal
    applications with our suite of AI-powered APIs.
  version: 1.0.0
  contact:
    name: Case.dev Support
    email: support@casemark.com
    url: https://case.dev
  license:
    name: Proprietary
    url: https://case.dev/terms
servers:
  - url: https://api.case.dev
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Vaults
    description: Secure document storage with semantic search and GraphRAG
  - name: Memory
    description: >-
      Persistent memory for AI agents with semantic search and 12 generic
      indexed tag fields
  - name: OCR
    description: Extract text from PDFs, images, and scanned documents
  - name: Voice
    description: Audio transcription and text-to-speech
  - name: LLMs
    description: Access 40+ language models through a unified API
  - name: Search
    description: Web search, AI answers, and deep research
  - name: Mail
    description: Managed inboxes for agent email workflows
  - name: Media
    description: Transcript retrieval and captioned media clip generation
  - name: Legal
    description: Legal research tools including citation verification
  - name: Privilege
    description: Privilege detection for e-discovery and litigation workflows
  - name: Compute
    description: Serverless GPU and CPU infrastructure
  - name: Format
    description: Document formatting and template rendering (MD/JSON to PDF/DOCX)
  - name: SuperDoc
    description: Document conversion and template automation
  - name: Webhooks
    description: Webhook endpoint management
  - name: System
    description: Public system metadata and discovery endpoints
  - name: Usage
    description: Usage reporting and webhook subscriptions
  - name: Database
    description: Serverless PostgreSQL databases with instant branching
  - name: Translation
    description: Language detection and translation for multilingual legal workflows
  - name: Skills
    description: Search and read legal AI skills for agents
  - name: Agents
    description: >-
      Create, manage, and execute AI agents with tool access, sandbox
      environments, and async run workflows
  - name: Matters
    description: Matter-native legal workspaces and orchestration primitives
  - name: Applications Projects
    description: Web application project management
  - name: Applications Deployments
    description: Web application deployment management
  - name: Applications Domains
    description: Custom domain configuration for applications
  - name: Applications Env Vars
    description: Environment variable management for applications
paths:
  /voice/v1/speak:
    post:
      tags:
        - Voice
      summary: Text-to-speech synthesis
      description: >-
        Convert text to natural-sounding audio using ElevenLabs voices. Ideal
        for creating audio summaries of legal documents, client presentations,
        or accessibility features. Supports multiple languages and voice
        customization.
      operationId: synthesizeSpeech
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - text
              properties:
                text:
                  type: string
                  description: Text to convert to speech
                  maxLength: 5000
                voice_id:
                  type: string
                  description: >-
                    ElevenLabs voice ID (defaults to Rachel - professional,
                    clear)
                  default: EXAVITQu4vr4xnSDxMaL
                model_id:
                  type: string
                  description: ElevenLabs model ID
                  default: eleven_multilingual_v2
                  enum:
                    - eleven_multilingual_v2
                    - eleven_turbo_v2
                    - eleven_monolingual_v1
                output_format:
                  type: string
                  description: Audio output format
                  default: mp3_44100_128
                  enum:
                    - mp3_44100_128
                    - mp3_44100_192
                    - pcm_16000
                    - pcm_22050
                    - pcm_24000
                    - pcm_44100
                voice_settings:
                  type: object
                  description: Voice customization settings
                  properties:
                    stability:
                      type: number
                      minimum: 0
                      maximum: 1
                      description: Voice stability (0-1)
                    similarity_boost:
                      type: number
                      minimum: 0
                      maximum: 1
                      description: Similarity boost (0-1)
                    style:
                      type: number
                      minimum: 0
                      maximum: 1
                      description: Style exaggeration (0-1)
                    use_speaker_boost:
                      type: boolean
                      description: Enable speaker boost
                language_code:
                  type: string
                  description: Language code for multilingual models
                  example: en
                optimize_streaming_latency:
                  type: integer
                  description: Optimize for streaming latency (0-4)
                  minimum: 0
                  maximum: 4
                enable_logging:
                  type: boolean
                  description: Enable request logging
                  default: true
                seed:
                  type: integer
                  description: Seed for reproducible generation
                previous_text:
                  type: string
                  description: Previous context for better pronunciation
                next_text:
                  type: string
                  description: Next context for better pronunciation
                apply_text_normalization:
                  type: boolean
                  description: Apply automatic text normalization
                  default: true
      responses:
        '200':
          description: Audio file generated successfully
          content:
            audio/mpeg:
              schema:
                type: string
                format: binary
            audio/wav:
              schema:
                type: string
                format: binary
          headers:
            Content-Type:
              description: Audio MIME type
              schema:
                type: string
                example: audio/mpeg
            Content-Length:
              description: Audio file size in bytes
              schema:
                type: string
        '400':
          description: Invalid request - missing or invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                    example: text is required
        '401':
          description: Authentication failed - invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                    example: Invalid API key
                  data:
                    type: object
                    properties:
                      code:
                        type: string
                        example: AUTH_INVALID
        '403':
          description: Permission denied - API key lacks voice/TTS access
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 403
                  message:
                    type: string
                    example: API key does not have access to voice/TTS service
                  data:
                    type: object
                    properties:
                      code:
                        type: string
                        example: PERMISSION_DENIED
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key starting with `sk_case_`

````