Views
No views yet
tts.pt file.tts.pt contains:tts.pt — packed TTS bundlePackedTTS.py — runtime loader, resolver, and inference scriptrequirements.txt — Python dependencies for the runtimeREADME.md — usage and overviewrequirements.txtpip install -r requirements.txttts.ptPackedTTS.py, or pass the path with --bundle.python PackedTTS.py --bundle tts.pt --list1python PackedTTS.py \
2 --bundle tts.pt \
3 --text "Hello world, this is a test." \
4 --voice "Sarah" \
5 --emotion "Angry" \
6 --output output.wavpython PackedTTS.py --bundle tts.pt --list1python PackedTTS.py \
2 --bundle tts.pt \
3 --text "This is a normal synthesis test." \
4 --voice "Sarah" \
5 --emotion "Disgust" \
6 --output output.wav1python PackedTTS.py \
2 --bundle tts.pt \
3 --text "This is voice-only generation." \
4 --voice "Sarah" \
5 --output output.wav1python PackedTTS.py \
2 --bundle tts.pt \
3 --text "This is emotion-only generation." \
4 --emotion "Happy" \
5 --output output.wav1python PackedTTS.py \
2 --bundle tts.pt \
3 --text "This uses the bundle defaults." \
4 --output output.wav1python PackedTTS.py \
2 --bundle tts.pt \
3 --text "More expressive speech with custom sampling." \
4 --voice "Sarah" \
5 --emotion "Angry" \
6 --cfg-weight 0.7 \
7 --temperature 0.9 \
8 --exaggeration 0.6 \
9 --seed 123 \
10 --output output.wav1python PackedTTS.py \
2 --bundle tts.pt \
3 --text "Saving to a custom file." \
4 --voice "Sarah" \
5 --emotion "Calm" \
6 --output results/custom_output.wav1python PackedTTS.py \
2 --bundle tts.pt \
3 --text "This uses fuzzy matching." \
4 --voice "sara" \
5 --emotion "angr" \
6 --output output.wav1python PackedTTS.py \
2 --bundle tts.pt \
3 --text "This voice comes from reference audio." \
4 --voice-ref path/to/voice_reference.wav \
5 --output output.wav1python PackedTTS.py \
2 --bundle tts.pt \
3 --text "This emotion comes from reference audio." \
4 --emo-ref path/to/emotion_reference.wav \
5 --output output.wav1python PackedTTS.py \
2 --bundle tts.pt \
3 --text "Both voice and emotion are driven by reference audio." \
4 --voice-ref path/to/voice_reference.wav \
5 --emo-ref path/to/emotion_reference.wav \
6 --output output.wav1python PackedTTS.py \
2 --bundle tts.pt \
3 --text "Seeded generation example." \
4 --voice "Sarah" \
5 --emotion "Disgust" \
6 --seed 42 \
7 --output output.wav1from pathlib import Path
2import soundfile as sf
3
4from PackedTTS import PackedTTS
5
6tts = PackedTTS.load(Path("tts.pt"))
7
8sr, audio, meta = tts.generate(
9 text="Hi, this is Sarah speaking with a disgust emotion.",
10 voice="Sarah",
11 emotion="Disgust",
12 cfg_weight=0.5,
13 temperature=0.8,
14 exaggeration=0.5,
15 seed=42,
16)
17
18sf.write("output.wav", audio, sr)
19print(meta)1from pathlib import Path
2import soundfile as sf
3
4from PackedTTS import PackedTTS
5
6tts = PackedTTS.load(Path("tts.pt"))
7
8sr, audio, meta = tts.generate(
9 text="This uses the bundle defaults.",
10 seed=7,
11)
12
13sf.write("default_output.wav", audio, sr)
14print(meta)1from pathlib import Path
2import soundfile as sf
3
4from PackedTTS import PackedTTS
5
6tts = PackedTTS.load(Path("tts.pt"))
7
8sr, audio, meta = tts.generate(
9 text="Voice selected, emotion resolved by the bundle.",
10 voice="Sarah",
11 seed=12,
12)
13
14sf.write("voice_only.wav", audio, sr)
15print(meta)1from pathlib import Path
2import soundfile as sf
3
4from PackedTTS import PackedTTS
5
6tts = PackedTTS.load(Path("tts.pt"))
7
8sr, audio, meta = tts.generate(
9 text="Emotion selected, voice resolved by the bundle.",
10 emotion="Happy",
11 seed=12,
12)
13
14sf.write("emotion_only.wav", audio, sr)
15print(meta)1from pathlib import Path
2import soundfile as sf
3
4from PackedTTS import PackedTTS
5
6tts = PackedTTS.load(Path("tts.pt"))
7
8sr, audio, meta = tts.generate(
9 text="This uses voice reference audio.",
10 voice_ref="path/to/voice_reference.wav",
11 emotion="Calm",
12 seed=42,
13)
14
15sf.write("voice_ref_output.wav", audio, sr)
16print(meta)1from pathlib import Path
2import soundfile as sf
3
4from PackedTTS import PackedTTS
5
6tts = PackedTTS.load(Path("tts.pt"))
7
8sr, audio, meta = tts.generate(
9 text="This uses emotion reference audio.",
10 voice="Sarah",
11 emo_ref="path/to/emotion_reference.wav",
12 seed=42,
13)
14
15sf.write("emo_ref_output.wav", audio, sr)
16print(meta)1from pathlib import Path
2import soundfile as sf
3
4from PackedTTS import PackedTTS
5
6tts = PackedTTS.load(Path("tts.pt"))
7
8sr, audio, meta = tts.generate(
9 text="This uses both reference audio inputs.",
10 voice_ref="path/to/voice_reference.wav",
11 emo_ref="path/to/emotion_reference.wav",
12 seed=42,
13)
14
15sf.write("both_refs_output.wav", audio, sr)
16print(meta)forward aliasforward is an alias for generate, so the model can be used like a callable runtime component:1from pathlib import Path
2import soundfile as sf
3
4from PackedTTS import PackedTTS
5
6tts = PackedTTS.load(Path("tts.pt"))
7
8sr, audio, meta = tts.forward(
9 text="This uses the forward alias.",
10 voice="Sarah",
11 emotion="Disgust",
12 cfg_weight=0.5,
13 temperature=0.8,
14 exaggeration=0.5,
15 seed=42,
16)
17
18sf.write("forward_output.wav", audio, sr)
19print(meta)T3 generates speech tokens from text.S3Gen converts those tokens into waveform audio.models.t3_statemodels.s3gen_statemodels.ve_statemodels.tokenizer_jsonvoicesemotionsdefaultsindexes--bundle — path to tts.pt--text — text to synthesize--voice — packed voice name--emotion — packed emotion name--voice-ref — override voice with reference audio--emo-ref — override emotion with reference audio--cfg-weight — classifier-free guidance weight--temperature — sampling temperature--exaggeration — emotion strength / style strength--seed — random seed--output — output WAV path--list — print packed voices and emotionstts.pt.