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

# Patch voices

> Set the agent's default voice, or add, change or remove one language voice, from the voice catalog.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json patch /v1/stable/agent/voices
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/agent/voices:
    patch:
      tags:
        - Agent
      summary: Patch voices
      description: Set the agent's default voice, or add, change or remove one
        language voice, from the voice catalog.
      operationId: StableAgentController_patchVoices
      parameters:
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
        - name: environmentAlias
          required: true
          in: query
          schema:
            type: string
            description: The alias of the environment to operate on (e.g. `main`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/StableAgentVoicesPatchRequest"
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableAgentVoicesPatchResponse"
      security:
        - token: []
components:
  schemas:
    StableAgentVoicesPatchRequest:
      type: object
      properties:
        primary:
          description: "The default voice: the one a conversation speaks with unless a
            language voice matches its locale."
          allOf:
            - $ref: "#/components/schemas/StableVoicePick"
        setOverrides:
          description: Language voices to add, or to change when the agent already has one
            for that locale.
          minItems: 1
          maxItems: 50
          type: array
          items:
            $ref: "#/components/schemas/StableVoiceOverridePick"
        removeOverrides:
          description: Locales whose language voice to delete, as stored. They match
            ignoring case and _, as the runtime matches them.
          minItems: 1
          maxItems: 50
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 100
      additionalProperties: false
    StableVoicePick:
      type: object
      properties:
        provider:
          $ref: "#/components/schemas/StableCatalogVoiceProvider"
        voiceID:
          type: string
          minLength: 1
          maxLength: 100
          description: The voiceID a voice search returned. Never a guessed or made-up ID.
        model:
          description: The TTS model. Leave it out to keep the current model, or to use
            the provider's default model when the provider changes.
          type: string
          minLength: 1
          maxLength: 100
      required:
        - provider
        - voiceID
      additionalProperties: false
    StableCatalogVoiceProvider:
      type: string
      enum:
        - elevenlabs
        - cartesia
      description: A TTS provider whose voices are in the voice catalog.
      x-enumNames:
        - ELEVENLABS
        - CARTESIA
    StableVoiceOverridePick:
      type: object
      properties:
        locale:
          type: string
          minLength: 2
          maxLength: 35
          description: A language ("fr") or a language and region ("fr-CA"), as the
            conversation's `locale` variable holds it.
        provider:
          $ref: "#/components/schemas/StableCatalogVoiceProvider"
        voiceID:
          type: string
          minLength: 1
          maxLength: 100
          description: The voiceID a voice search returned. Never a guessed or made-up ID.
        model:
          description: The TTS model. Leave it out to keep the current model, or to use
            the provider's default model when the provider changes.
          type: string
          minLength: 1
          maxLength: 100
      required:
        - locale
        - provider
        - voiceID
      additionalProperties: false
    StableAgentVoicesPatchResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable message confirming the update.
        added:
          type: array
          items:
            type: string
          description: Locales that got a language voice they did not have.
        replaced:
          type: array
          items:
            type: string
          description: Locales whose language voice changed.
        removed:
          type: array
          items:
            type: string
          description: Locales whose language voice was deleted.
        notFound:
          type: array
          items:
            type: string
          description: Locales in removeOverrides the agent had no language voice for.
            Nothing was deleted for them.
      required:
        - message
        - added
        - replaced
        - removed
        - notFound
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
