Guide to specifying and generating voices with OCTAVE TTS.

The OCTAVE TTS API enables you to generate expressive voices through simple descriptions or select from your saved voice library. This guide explains how to specify voices for synthesis, generate new ones on demand, and save your favorites for reuse.

Specify a voice, or don’t!

Choose a voice from your library or let OCTAVE generate a new one based on your text. Optionally, add a description to control how the voice performs the text. These descriptions help shape the voice’s characteristics, whether you’re using a saved voice or generating a new one.

Saving generated voices

When you generate a voice you want to use again, you can save it to your voice library. This requires the generation_id from your TTS API response. Call the /v0/tts/voices endpoint with this ID and a name. Once saved, you can use the voice in future requests by specifying either its name or id.

1

Generate a voice and extract the generation_id

Send a text-to-speech request without specifying a voice.

Request
1curl -X POST "https://api.hume.ai/v0/tts" \
2 -H "Content-Type: application/json" \
3 -H "X-Hume-Api-Key: $HUME_API_KEY" \
4 -d '{
5 "utterances": [
6 {
7 "text": "Welcome to my application!"
8 }
9 ]
10 }'

The response will include the generation_id, which you’ll use to save the voice.

Response
1{
2 "generations": [
3 {
4 "audio": "//PExAAspDoWXjDNQgk3HJJJZNbaEPZMmTJk7QIECBA...",
5 "duration": 1.589667,
6 "encoding": {
7 "format": "mp3",
8 "sample_rate": 24000
9 },
10 "file_size": 26496,
11 "generation_id": "41f7c154-fbb2-4372-8ecc-e6b7bf6ace01",
12 "snippets": [
13 {
14 "audio": "//PExAAspDoWXjDNQgk3HJJJZNbaEPZMmTJk7QIECBA...",
15 "id": "37a108c4-5de7-4507-8a54-0521f5cb0383",
16 "text": "Welcome to my application!"
17 }
18 ]
19 }
20 ],
21 "request_id": "7903e4a7-6642-491a-aa96-c6b359dd1042707439"
22}
2

Save the voice for reuse

Use the generation_id from the response to save the voice with a custom name.

Request
1curl -X POST "https://api.hume.ai/v0/tts/voices" \
2 -H "Content-Type: application/json" \
3 -H "X-Hume-Api-Key: $HUME_API_KEY" \
4 -d '{
5 "name": "NewVoice",
6 "generation_id": "41f7c154-fbb2-4372-8ecc-e6b7bf6ace01"
7 }'

The response will provide the voice’s name and id for use in future TTS requests.

Response
1{
2 "name": "NewVoice",
3 "id": "41f7c154-fbb2-4372-8ecc-e6b7bf6ace01"
4}

Built with