Delete _bu.md
Browse files
_bu.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
| 1 |
-
import outetts
|
| 2 |
-
import os
|
| 3 |
-
|
| 4 |
-
# Initialize the interface
|
| 5 |
-
interface = outetts.Interface(
|
| 6 |
-
config=outetts.ModelConfig.auto_config(
|
| 7 |
-
model=outetts.Models.VERSION_1_0_SIZE_1B,
|
| 8 |
-
# For llama.cpp backend
|
| 9 |
-
#backend=outetts.Backend.LLAMACPP,
|
| 10 |
-
#quantization=outetts.LlamaCppQuantization.FP16
|
| 11 |
-
# For transformers backend
|
| 12 |
-
backend=outetts.Backend.HF,
|
| 13 |
-
)
|
| 14 |
-
)
|
| 15 |
-
|
| 16 |
-
# Load the default speaker profile
|
| 17 |
-
speaker = interface.load_default_speaker("EN-FEMALE-1-NEUTRAL")
|
| 18 |
-
|
| 19 |
-
# Or create your own speaker profiles in seconds and reuse them instantly
|
| 20 |
-
# speaker = interface.create_speaker("path/to/audio.wav")
|
| 21 |
-
# interface.save_speaker(speaker, "speaker.json")
|
| 22 |
-
# speaker = interface.load_speaker("speaker.json")
|
| 23 |
-
|
| 24 |
-
# Generate speech
|
| 25 |
-
output = interface.generate(
|
| 26 |
-
config=outetts.GenerationConfig(
|
| 27 |
-
text="Hello, how are you doing?",
|
| 28 |
-
generation_type=outetts.GenerationType.CHUNKED,
|
| 29 |
-
speaker=speaker,
|
| 30 |
-
sampler_config=outetts.SamplerConfig(
|
| 31 |
-
temperature=0.4
|
| 32 |
-
),
|
| 33 |
-
)
|
| 34 |
-
)
|
| 35 |
-
|
| 36 |
-
# Save to file
|
| 37 |
-
output_path = os.path.join(os.getcwd(),"output.wav")
|
| 38 |
-
output.save(output_path)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|