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

# Voice Changer (Bytes)

> Takes an audio file of speech, and returns an audio file of speech spoken with the same intonation, but with a different voice.



## OpenAPI

````yaml 2024-06-10/api.yml POST /voice-changer/bytes
openapi: 3.0.1
info:
  title: Cartesia API
  version: '2024-06-10'
servers:
  - url: https://api.cartesia.ai
    description: Production
security: []
paths:
  /voice-changer/bytes:
    post:
      tags:
        - VoiceChanger
      summary: Voice Changer (Bytes)
      description: >-
        Takes an audio file of speech, and returns an audio file of speech
        spoken with the same intonation, but with a different voice.
      operationId: voiceChanger_bytes
      parameters:
        - $ref: '#/components/parameters/CartesiaVersionHeader'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                clip:
                  $ref: '#/components/schemas/VoiceAudioFileInput'
                voice[id]:
                  type: string
                output_format[container]:
                  $ref: '#/components/schemas/OutputFormatContainer'
                output_format[sample_rate]:
                  description: >-
                    The sample rate of the output audio in Hz. Supported sample
                    rates are 8000, 16000, 22050, 24000, 44100, 48000.
                  type: integer
                output_format[encoding]:
                  $ref: '#/components/schemas/RawEncoding'
                  description: Required for `raw` and `wav` containers.
                  nullable: true
                output_format[bit_rate]:
                  description: Required for `mp3` containers.
                  type: integer
                  nullable: true
      responses:
        '200':
          description: Audio bytes
          content:
            audio/*:
              schema:
                type: string
                format: binary
      security:
        - ApiKeyAuth: []
components:
  parameters:
    CartesiaVersionHeader:
      name: Cartesia-Version
      in: header
      description: API version header.
      required: true
      schema:
        type: string
        format: date
        example: '2024-06-10'
        enum:
          - '2024-06-10'
  schemas:
    VoiceAudioFileInput:
      title: VoiceAudioFileInput
      type: string
      format: binary
      description: >-
        Supported audio formats: `flac`, `mp3`, `mpeg`, `mpga`, `oga`, `ogg`,
        `wav`, `webm`
    OutputFormatContainer:
      title: OutputFormatContainer
      type: string
      enum:
        - raw
        - wav
        - mp3
    RawEncoding:
      title: RawEncoding
      type: string
      description: >-
        The encoding format for output audio. See [TTS Output Audio
        Format](/build-with-cartesia/capability-guides/tts-output-audio-format)
        if you're unsure what to use.
      enum:
        - pcm_f32le
        - pcm_s16le
        - pcm_mulaw
        - pcm_alaw
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````