Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,8 @@ def synthesize_speech(text, sentence_silence, length_scale, normalize_text=True)
|
|
50 |
buffer.seek(0)
|
51 |
audio_data = np.frombuffer(buffer.read(), dtype=np.int16)
|
52 |
inference_time = time.time() - start
|
53 |
-
|
|
|
54 |
|
55 |
|
56 |
with gr.Blocks(analytics_enabled=False) as demo:
|
@@ -114,4 +115,5 @@ with gr.Blocks(analytics_enabled=False) as demo:
|
|
114 |
outputs=[output_audio, out_text_gr],
|
115 |
)
|
116 |
|
117 |
-
demo.launch()
|
|
|
|
50 |
buffer.seek(0)
|
51 |
audio_data = np.frombuffer(buffer.read(), dtype=np.int16)
|
52 |
inference_time = time.time() - start
|
53 |
+
metric_text = f"Time to generate audio: {round(inference_time*1000)} milliseconds\n"
|
54 |
+
return (voice.config.sample_rate, audio_data), "{}s".format(metric_text)
|
55 |
|
56 |
|
57 |
with gr.Blocks(analytics_enabled=False) as demo:
|
|
|
115 |
outputs=[output_audio, out_text_gr],
|
116 |
)
|
117 |
|
118 |
+
demo.launch()
|
119 |
+
demo.launch(debug=True, show_api=True, share=True)
|