seed (an integer from 0 to 2^63 − 1): the same seed, text and voice give exactly the same audio
on the same instance. Our instances run on different GPU types, so two requests can still sound slightly different.
Long texts
Texts longer than about 30 seconds of speech are split at sentence boundaries into parts of about 15 seconds,
which are joined again. Later parts keep the voice of the first part. We tested about 400 words (2 minutes of audio).
Change the sizes per request with extra_params: {"audio_chunk_duration": 15, "audio_chunk_threshold": 30} (seconds).
Endpoint
/v1/audio/speech
Usage
from openai import OpenAI
client = OpenAI(base_url="https://llm.scads.ai/v1", api_key="<your API key>")
audio = client.audio.speech.create(
model="OmniVoice",
voice="nova",
input="Guten Tag aus Dresden!",
response_format="wav",
extra_body={"language": "de", "seed": 42},
)
with open("hello.wav", "wb") as f:
f.write(audio.content)