Spaces:
Valdis35
/
Runtime error

TeraSpace commited on
Commit
9fd1e6b
1 Parent(s): f62ab37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -2,11 +2,13 @@ import gradio as gr
2
  from infer_onnx import TTS
3
  from ruaccent import RUAccent # https://huggingface.co/TeraTTS/accentuator
4
 
 
 
5
  models = ["TeraTTS/natasha-g2p-vits", "TeraTTS/glados2-g2p-vits"]
6
 
7
  models = {k:TTS(k) for k in models}
8
 
9
- accentizer = RUAccent(workdir="./model/ruaccent")
10
  accentizer.load(omograph_model_size='medium', dict_load_startup=True)
11
 
12
 
@@ -29,5 +31,7 @@ prep_text = gr.Checkbox(label="Предобработать", info="Хотите
29
  output_audio = gr.Audio(label="Аудио", type="numpy")
30
  output_text = gr.Textbox(label="Обработанный текст")
31
 
32
- iface = gr.Interface(fn=text_to_speech, inputs=[model_choice, input_text, prep_text], outputs=[output_audio, output_text])
33
- iface.launch()
 
 
 
2
  from infer_onnx import TTS
3
  from ruaccent import RUAccent # https://huggingface.co/TeraTTS/accentuator
4
 
5
+ title = "GitHub with models: https://github.com/Tera2Space/RUTTS"
6
+
7
  models = ["TeraTTS/natasha-g2p-vits", "TeraTTS/glados2-g2p-vits"]
8
 
9
  models = {k:TTS(k) for k in models}
10
 
11
+ accentizer = RUAccent(workdir="./model/ruaccent", allow_cuda=False)
12
  accentizer.load(omograph_model_size='medium', dict_load_startup=True)
13
 
14
 
 
31
  output_audio = gr.Audio(label="Аудио", type="numpy")
32
  output_text = gr.Textbox(label="Обработанный текст")
33
 
34
+ iface = gr.Interface(fn=text_to_speech, inputs=[model_choice, input_text, prep_text], outputs=[output_audio, output_text], title=title)
35
+ iface.launch()
36
+
37
+