Quickstart
Make your first speech request against the local VoiceStudio API.
Local API only
This targets the desktop app's 0.5.0 API. The Cloud API is
coming this fall.
1. Start the app
Open VoiceStudio. Its API listens on port 3900 while the app runs.
export VOICESTUDIO_BASE_URL="http://localhost:3900/v1"
export VOICESTUDIO_API_KEY="local"
curl http://localhost:3900/health{
"status": "ok",
"device": "cuda (NVIDIA GeForce RTX 4090)",
"version": "0.5.0"
}On localhost the key can be any non-empty string. It is only checked if you turn on remote access.
2. Generate speech
curl "$VOICESTUDIO_BASE_URL/audio/speech" \
-H "Authorization: Bearer $VOICESTUDIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "tts-1",
"voice": "alloy",
"input": "VoiceStudio is ready.",
"response_format": "mp3"
}' \
--output speech.mp33. Or use an OpenAI SDK
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["VOICESTUDIO_BASE_URL"],
api_key=os.environ["VOICESTUDIO_API_KEY"],
)
audio = client.audio.speech.create(
model="tts-1",
voice="alloy",
input="The local VoiceStudio API is ready.",
)
audio.stream_to_file("speech.mp3")Next: swap alloy for one of your own voice profile IDs.