Voice

Voice cloning

Generate speech from caller-provided reference audio with Perigee-1-tts.

from pathlib import Path
import os
import orbitalsai
 
client = orbitalsai.Client(api_key=os.environ["ORBITALSAI_API_KEY"])
 
audio = client.clone_voice(
    text="Welcome to OrbitalsAI.",
    reference_audio="reference.wav",
    language="English",
    reference_text="The words spoken in the reference recording.",
)
 
Path("cloned-voice.wav").write_bytes(audio)

reference_audio is required and must be no larger than 25 MB. reference_text is optional. language controls pronunciation for the generated text.

Parameters

ParameterRequiredDescription
textYesText to generate, up to 10,000 characters.
reference_audioYesPath to a caller-provided audio file, up to 25 MB.
languageYesLanguage of the generated speech.
reference_textNoTranscript of the reference recording.

The method returns 24 kHz, 16-bit, mono WAV bytes. The API does not create or return a persistent voice_id.

Stream a cloned voice

with open("cloned-voice.wav", "wb") as output:
    for chunk in client.stream_cloned_voice(
        text="Welcome to OrbitalsAI.",
        reference_audio="reference.wav",
        language="English",
    ):
        output.write(chunk)

Only use reference audio that you are authorized to use. OrbitalsAI does not currently expose speaker verification or a consent workflow through this API.

Next steps

On this page