- Python
- TypeScript
Run this example
- Python
- TypeScript
List voices with pagination.
def voices_list(client: Cartesia) -> None:
"""List voices with pagination."""
voices = client.voices.list(limit=10)
for voice in voices:
print(voice.name)
async function voicesList(client: Cartesia): Promise<void> {
/** List voices with pagination. */
for await (const voice of client.voices.list({ limit: 10 })) {
console.log(voice.name);
}
}
cd cartesia-python
CARTESIA_API_KEY=YOUR_KEY python3 examples/examples.py voices_list
cd cartesia-js
CARTESIA_API_KEY=YOUR_KEY npx ts-node examples/node_examples.ts voicesList
Was this page helpful?