rutsam commited on
Commit
155ba90
1 Parent(s): 99a10fe

deploy app

Browse files
Files changed (1) hide show
  1. app.py +2 -17
app.py CHANGED
@@ -14,21 +14,6 @@ def generate_audio(text):
14
  if len(text) > MAX_TXT_LEN:
15
  text = text[:MAX_TXT_LEN]
16
  print(f"Input text was cutoff since it went over the {MAX_TXT_LEN} character limit.")
17
- # model_path, config_path, model_item = manager.download_model(model_name)
18
- # vocoder_name: Optional[str] = model_item["default_vocoder"]
19
- # vocoder_path = None
20
- # vocoder_config_path = None
21
- # if vocoder_name is not None:
22
- # vocoder_path, vocoder_config_path, _ = manager.download_model(vocoder_name)
23
- # synthesizer = Synthesizer(
24
- # model_path, config_path, None, None, vocoder_path, vocoder_config_path,
25
- # )
26
- # if synthesizer is None:
27
- # raise NameError("model not found")
28
- #tts_engine= TextToSpeech()
29
- # text1 = subprocess.check_output("pwd", shell=True)+ subprocess.check_output("ls Kinyarwanda_YourTTS", shell=True)
30
- # text2 = text1.decode("utf-8")
31
- # return text2
32
  synthesizer = Synthesizer("./Kinyarwanda_YourTTS/model.pth",
33
  "Kinyarwanda_YourTTS/config.json",
34
  tts_speakers_file="Kinyarwanda_YourTTS/speakers.pth",
@@ -45,13 +30,13 @@ iface = gr.Interface(
45
  inputs=[
46
  gr.inputs.Textbox(
47
  label="Input Text",
48
- default="This sentence has been generated by a speech synthesis system.",
49
  ),
50
  ],
51
  outputs=gr.outputs.Audio(type="filepath",label="Output"),
52
  #outputs=gr.outputs.Textbox(label="Recognized speech from speechbrain model"),
53
  title="Kinyarwanda tts Demo",
54
- description="Kinyarwanda tts build with ",
55
  allow_flagging=False,
56
  flagging_options=['error', 'bad-quality', 'wrong-pronounciation'],
57
  layout="vertical",
 
14
  if len(text) > MAX_TXT_LEN:
15
  text = text[:MAX_TXT_LEN]
16
  print(f"Input text was cutoff since it went over the {MAX_TXT_LEN} character limit.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  synthesizer = Synthesizer("./Kinyarwanda_YourTTS/model.pth",
18
  "Kinyarwanda_YourTTS/config.json",
19
  tts_speakers_file="Kinyarwanda_YourTTS/speakers.pth",
 
30
  inputs=[
31
  gr.inputs.Textbox(
32
  label="Input Text",
33
+ default="Muraho neza! nizere ko umunsi uri kugenda neza.",
34
  ),
35
  ],
36
  outputs=gr.outputs.Audio(type="filepath",label="Output"),
37
  #outputs=gr.outputs.Textbox(label="Recognized speech from speechbrain model"),
38
  title="Kinyarwanda tts Demo",
39
+ description="Kinyarwanda tts build By Digital Umuganda, using the Bible dataset, and trained on YourTTS model.",
40
  allow_flagging=False,
41
  flagging_options=['error', 'bad-quality', 'wrong-pronounciation'],
42
  layout="vertical",