- Python
- TypeScript
def voices_delete(client: Cartesia, *args: str) -> None:
"""Delete a voice."""
import sys
if not args:
print("Usage: voices_delete <voice_id>")
sys.exit(1)
client.voices.delete(args[0])
async function voicesDelete(client: Cartesia, args: string[]): Promise<void> {
const [voiceId] = args;
if (!voiceId) {
console.error('Usage: voicesDelete <voiceId>');
process.exit(1);
}
await client.voices.delete(voiceId);
}
Run this example
- Python
- TypeScript
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_delete <voice_id>
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 voicesDelete <voice_id>