Update README.md
Browse files
README.md
CHANGED
@@ -116,7 +116,9 @@ pip install outetts --upgrade
|
|
116 |
import outetts
|
117 |
|
118 |
# Configure the model
|
119 |
-
model_config = outetts.HFModelConfig_v2(
|
|
|
|
|
120 |
# Initialize the interface
|
121 |
interface = outetts.InterfaceHF(model_version="0.3", cfg=model_config)
|
122 |
|
@@ -136,13 +138,14 @@ interface.print_default_speakers()
|
|
136 |
speaker = interface.load_default_speaker(name="en_male_1")
|
137 |
|
138 |
# Generate speech
|
139 |
-
|
140 |
text="Speech synthesis is the artificial production of human speech.",
|
141 |
-
temperature=0.
|
142 |
repetition_penalty=1.1,
|
143 |
max_length=4096,
|
144 |
-
speaker=speaker
|
145 |
)
|
|
|
146 |
|
147 |
# Save the generated speech to a file
|
148 |
output.save("output.wav")
|
|
|
116 |
import outetts
|
117 |
|
118 |
# Configure the model
|
119 |
+
model_config = outetts.HFModelConfig_v2(
|
120 |
+
model_path="OuteAI/OuteTTS-0.3-1B",
|
121 |
+
)
|
122 |
# Initialize the interface
|
123 |
interface = outetts.InterfaceHF(model_version="0.3", cfg=model_config)
|
124 |
|
|
|
138 |
speaker = interface.load_default_speaker(name="en_male_1")
|
139 |
|
140 |
# Generate speech
|
141 |
+
gen_cfg = outetts.GenerationConfig(
|
142 |
text="Speech synthesis is the artificial production of human speech.",
|
143 |
+
temperature=0.4,
|
144 |
repetition_penalty=1.1,
|
145 |
max_length=4096,
|
146 |
+
speaker=speaker,
|
147 |
)
|
148 |
+
output = interface.generate(config=gen_cfg)
|
149 |
|
150 |
# Save the generated speech to a file
|
151 |
output.save("output.wav")
|