Reuse Cloned Voices with VoiceClonePrompt
masterTo avoid re-processing reference audio in every session, encode the reference audio into a prompt and save it to disk.
from omnivoice import OmniVoice, VoiceClonePrompt
# 1. Create and save the prompt
prompt = model.create_voice_clone_prompt(
ref_audio="ref.wav",
ref_text="Transcription of the reference audio."
)
prompt.save("my_voice.pt")
# 2. Later, load and use the prompt
prompt = VoiceClonePrompt.load("my_voice.pt")
audio = model.generate(text="Hello again!", voice_clone_prompt=prompt)