support for voice cloning is done (+2 squashed commit)

Squashed commit:

[e7301628] support for voice cloning is done

[1653c576] wip adding voice cloning
This commit is contained in:
Concedo 2025-03-20 23:14:10 +08:00
parent a66d0f7743
commit c1e58419c7
27 changed files with 7031 additions and 8 deletions

View file

@ -0,0 +1,22 @@
import outetts
print("Speaker JSON creation for Voice Cloning for OuteTTS...")
model_config = outetts.HFModelConfig_v1(
model_path="OuteAI/OuteTTS-0.2-500M",
language="en", # Supported languages in v0.2: en, zh, ja, ko
)
interface = outetts.InterfaceHF(model_version="0.2", cfg=model_config)
speaker = interface.create_speaker(
audio_path="/path/to/audio.wav",
# If transcript is not provided, it will be automatically transcribed using Whisper
transcript=None, # Set to None to use Whisper for transcription
whisper_model="turbo", # Optional: specify Whisper model (default: "turbo")
whisper_device=None, # Optional: specify device for Whisper (default: None)
)
interface.save_speaker(speaker, "speaker_output.json")
print("Speaker JSON saved!")