Spaces:
Paused
Paused
Turn off ZeroGPU for now until I fix it later
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def get_mimi_path():
|
|
47 |
|
48 |
dir = snapshot_download("jkeisling/smoltts_v0")
|
49 |
mimi_path = get_mimi_path()
|
50 |
-
|
51 |
codec = Tokenizer(mimi_path)
|
52 |
|
53 |
|
@@ -60,7 +60,6 @@ def split_sentences(text):
|
|
60 |
@spaces.GPU
|
61 |
def synthesize_speech(text, temperature, top_p, voice):
|
62 |
"""Generate speech from text using Fish Speech, processing each sentence separately."""
|
63 |
-
lm = LM(dir, dtype="bf16", device="cuda", version="dual_ar")
|
64 |
sysprompt = voice_mapping.get(voice, "<|speaker:0|>")
|
65 |
sentences = split_sentences(text)
|
66 |
pcm_list = []
|
@@ -100,7 +99,7 @@ with gr.Blocks(
|
|
100 |
voice_dropdown = gr.Dropdown(
|
101 |
label="Voice",
|
102 |
choices=list(voice_mapping.keys()),
|
103 |
-
value="
|
104 |
info="Select a voice (sysprompt mapping)",
|
105 |
)
|
106 |
with gr.Row():
|
|
|
47 |
|
48 |
dir = snapshot_download("jkeisling/smoltts_v0")
|
49 |
mimi_path = get_mimi_path()
|
50 |
+
lm = LM(dir, dtype="bf16", device="cuda", version="dual_ar")
|
51 |
codec = Tokenizer(mimi_path)
|
52 |
|
53 |
|
|
|
60 |
@spaces.GPU
|
61 |
def synthesize_speech(text, temperature, top_p, voice):
|
62 |
"""Generate speech from text using Fish Speech, processing each sentence separately."""
|
|
|
63 |
sysprompt = voice_mapping.get(voice, "<|speaker:0|>")
|
64 |
sentences = split_sentences(text)
|
65 |
pcm_list = []
|
|
|
99 |
voice_dropdown = gr.Dropdown(
|
100 |
label="Voice",
|
101 |
choices=list(voice_mapping.keys()),
|
102 |
+
value="Heart (US)",
|
103 |
info="Select a voice (sysprompt mapping)",
|
104 |
)
|
105 |
with gr.Row():
|