> ## 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.

# Update a Voice

> Update a voice.

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    def voices_update(client: Cartesia, *args: str) -> None:
        """Update a voice."""
        import sys

        if len(args) < 2:
            print("Usage: voices_update <voice_id> <name>")
            sys.exit(1)
        voice_id, *name_parts = args
        voice = client.voices.update(voice_id, name=" ".join(name_parts))
        print(voice)
    ```

    From [cartesia-python/examples/examples.py:551](https://github.com/cartesia-ai/cartesia-python/blob/v3.2.0/examples/examples.py#L551)
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    async function voicesUpdate(client: Cartesia, args: string[]): Promise<void> {
      const [voiceId, ...nameParts] = args;
      if (!voiceId || nameParts.length === 0) {
        console.error('Usage: voicesUpdate <voiceId> <name>');
        process.exit(1);
      }
      const voice = await client.voices.update(voiceId, { name: nameParts.join(' ') });

      if ('embedding' in voice) {
        console.log({ ...voice, embedding: '[...]' });
      } else {
        console.log(voice);
      }
    }
    ```

    From [cartesia-js/examples/node\_examples.ts:590](https://github.com/cartesia-ai/cartesia-js/blob/v3.2.0/examples/node_examples.ts#L590)
  </Tab>
</Tabs>

## Run this example

<Tabs>
  <Tab title="Python">
    ```sh theme={null}
    git clone --branch v3.2.0 https://github.com/cartesia-ai/cartesia-python
    cd cartesia-python
    uv sync
    CARTESIA_API_KEY=YOUR_KEY uv run examples/examples.py voices_update <voice_id> "Updated Name"
    ```
  </Tab>

  <Tab title="TypeScript">
    ```sh theme={null}
    git clone --branch v3.2.0 https://github.com/cartesia-ai/cartesia-js
    cd cartesia-js
    pnpm i
    CARTESIA_API_KEY=YOUR_KEY pnpm tsn examples/node_examples.ts voicesUpdate <voice_id> "Updated Name"
    ```
  </Tab>
</Tabs>
