Voice cloning

Generate or stream speech from reference audio with the Python SDK.

from pathlib import Path
 
audio = client.clone_voice(
    text="Welcome to OrbitalsAI.",
    reference_audio="reference.wav",
    language="English",
    reference_text="Reference recording transcript",
)
 
Path("voice.wav").write_bytes(audio)

The reference file is required and must be no larger than 25 MB. reference_text is optional. The method returns complete WAV bytes.

Stream cloned speech

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

See the Voice cloning guide and Voice cloning API.

On this page