Spaces:
Build error
Build error
Commit
·
c20e286
1
Parent(s):
8cbdd7d
update
Browse files
inference/gradio/gradio_settings.yaml
CHANGED
@@ -5,7 +5,7 @@ article: |
|
|
5 |
Link to <a href='https://github.com/Rongjiehuang/GenerSpeech' style='color:blue;' target='_blank\'>Github REPO</a>
|
6 |
example_inputs:
|
7 |
- |-
|
8 |
-
the invention of movable metal letters in the middle of the fifteenth century may justly be considered as the invention of the art of printing.
|
9 |
- |-
|
10 |
produced the block books, which were the immediate predecessors of the true printed book,
|
11 |
inference_cls: inference.GenerSpeech.GenerSpeechInfer
|
|
|
5 |
Link to <a href='https://github.com/Rongjiehuang/GenerSpeech' style='color:blue;' target='_blank\'>Github REPO</a>
|
6 |
example_inputs:
|
7 |
- |-
|
8 |
+
the invention of movable metal letters in the middle of the fifteenth century may justly be considered as the invention of the art of printing. | assets/0011_001570.wav
|
9 |
- |-
|
10 |
produced the block books, which were the immediate predecessors of the true printed book,
|
11 |
inference_cls: inference.GenerSpeech.GenerSpeechInfer
|
inference/gradio/infer.py
CHANGED
@@ -51,10 +51,16 @@ class GradioInfer:
|
|
51 |
infer_cls = self.inference_cls
|
52 |
self.infer_ins: BaseTTSInfer = infer_cls(hp)
|
53 |
example_inputs = self.example_inputs
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
iface = gr.Interface(fn=self.greet,
|
55 |
inputs=[
|
56 |
-
Textbox(lines=10, placeholder=None, default=example_inputs[0], label="input text"),
|
57 |
-
|
58 |
],
|
59 |
outputs="audio",
|
60 |
allow_flagging="never",
|
|
|
51 |
infer_cls = self.inference_cls
|
52 |
self.infer_ins: BaseTTSInfer = infer_cls(hp)
|
53 |
example_inputs = self.example_inputs
|
54 |
+
|
55 |
+
for i in range(len(example_inputs)):
|
56 |
+
text, ref_audio = example_inputs[i].split('|')
|
57 |
+
print('text: ', text, 'ref_audio:', ref_audio)
|
58 |
+
example_inputs[i] = [text, reference_audio]
|
59 |
+
|
60 |
iface = gr.Interface(fn=self.greet,
|
61 |
inputs=[
|
62 |
+
Textbox(lines=10, placeholder=None, default=example_inputs[0][0], label="input text"),
|
63 |
+
Textbox(lines=10, placeholder=None, default=example_inputs[0][1], label="reference audio"),
|
64 |
],
|
65 |
outputs="audio",
|
66 |
allow_flagging="never",
|