Nymbo commited on
Commit
f4d0b51
·
verified ·
1 Parent(s): 48629c9

Update Modules/Generate_Speech.py

Browse files
Files changed (1) hide show
  1. Modules/Generate_Speech.py +3 -3
Modules/Generate_Speech.py CHANGED
@@ -68,8 +68,8 @@ def _init_kokoro() -> None:
68
  device = "cuda"
69
  except Exception:
70
  device = "cpu"
71
- model = KModel().to(device).eval()
72
- pipelines = {"a": KPipeline(lang_code="a", model=False)}
73
  try:
74
  pipelines["a"].g2p.lexicon.golds["kokoro"] = "kˈOkəɹO"
75
  except Exception:
@@ -169,7 +169,7 @@ def build_interface() -> gr.Interface:
169
  info="Select from 54 available voices across multiple languages and accents",
170
  ),
171
  ],
172
- outputs=gr.Audio(label="Audio", type="numpy", format="wav", show_download_button=True),
173
  title="Generate Speech",
174
  description=(
175
  "<div style=\"text-align:center\">Generate speech with Kokoro-82M. Supports multiple languages and accents. Runs on CPU or CUDA if available.</div>"
 
68
  device = "cuda"
69
  except Exception:
70
  device = "cpu"
71
+ model = KModel(repo_id="hexgrad/Kokoro-82M").to(device).eval()
72
+ pipelines = {"a": KPipeline(lang_code="a", model=False, repo_id="hexgrad/Kokoro-82M")}
73
  try:
74
  pipelines["a"].g2p.lexicon.golds["kokoro"] = "kˈOkəɹO"
75
  except Exception:
 
169
  info="Select from 54 available voices across multiple languages and accents",
170
  ),
171
  ],
172
+ outputs=gr.Audio(label="Audio", type="numpy", format="wav", buttons=["download"]),
173
  title="Generate Speech",
174
  description=(
175
  "<div style=\"text-align:center\">Generate speech with Kokoro-82M. Supports multiple languages and accents. Runs on CPU or CUDA if available.</div>"