kennethli319 commited on
Commit
eb3a8c0
·
1 Parent(s): 9383bb1

update tts

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -1,4 +1,6 @@
1
  import gradio as gr
 
 
2
  from nemo.collections.tts.models import FastPitchModel
3
  from nemo.collections.tts.models import HifiGanModel
4
  from nemo.collections.tts.models import MixerTTSModel
@@ -26,11 +28,14 @@ def run():
26
  inputs=[gr.Textbox(value="This is a test.", label="Text to Synthesize"),
27
  gr.Slider(0, 10, step=1, label="Speaker")],
28
  outputs="audio",
29
- examples=[
30
- ["Hello world", 0],
31
- ]
32
  )
33
 
 
 
 
 
 
 
34
  demo.launch(server_name="0.0.0.0", server_port=7860)
35
 
36
 
 
1
  import gradio as gr
2
+ import torch
3
+ import numpy as np
4
  from nemo.collections.tts.models import FastPitchModel
5
  from nemo.collections.tts.models import HifiGanModel
6
  from nemo.collections.tts.models import MixerTTSModel
 
28
  inputs=[gr.Textbox(value="This is a test.", label="Text to Synthesize"),
29
  gr.Slider(0, 10, step=1, label="Speaker")],
30
  outputs="audio",
 
 
 
31
  )
32
 
33
+ gr.Markdown("## Examples")
34
+ gr.Examples(
35
+ examples=[["Hello world", 0]],
36
+ fn=generate_tts,
37
+ )
38
+
39
  demo.launch(server_name="0.0.0.0", server_port=7860)
40
 
41