Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def guessanAge(model, image):
|
|
27 |
return description
|
28 |
|
29 |
@spaces.GPU(duration=120)
|
30 |
-
def text2speech(text, no0,
|
31 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
32 |
os.environ["COQUI_TOS_AGREED"] = "1"
|
33 |
if sample is None:
|
@@ -85,12 +85,12 @@ sampletext = gr.HTML("""
|
|
85 |
Your browser does not support the audio element.
|
86 |
</audio>
|
87 |
""")
|
88 |
-
|
89 |
-
micinput = gr.Audio(sources=['microphone'], type="filepath", format="wav")
|
90 |
outaudio = gr.Audio(show_download_button=True, show_share_button=True)
|
91 |
tab3 = gr.Interface(
|
92 |
fn=text2speech,
|
93 |
-
inputs=[textbox, sampletext,
|
94 |
outputs=[outaudio],
|
95 |
)
|
96 |
|
|
|
27 |
return description
|
28 |
|
29 |
@spaces.GPU(duration=120)
|
30 |
+
def text2speech(text, no0, sample):
|
31 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
32 |
os.environ["COQUI_TOS_AGREED"] = "1"
|
33 |
if sample is None:
|
|
|
85 |
Your browser does not support the audio element.
|
86 |
</audio>
|
87 |
""")
|
88 |
+
|
89 |
+
micinput = gr.Audio(sources=['microphone'], type="filepath", format="wav", label="Please Provide a Sample Voice for the Model to Mimic")
|
90 |
outaudio = gr.Audio(show_download_button=True, show_share_button=True)
|
91 |
tab3 = gr.Interface(
|
92 |
fn=text2speech,
|
93 |
+
inputs=[textbox, sampletext, micinput],
|
94 |
outputs=[outaudio],
|
95 |
)
|
96 |
|