Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,6 @@ from vietTTS import nat_normalize_text
|
|
| 4 |
import numpy as np
|
| 5 |
import gradio as gr
|
| 6 |
import os
|
| 7 |
-
import librosa
|
| 8 |
|
| 9 |
|
| 10 |
def text_to_speech(text):
|
|
@@ -24,15 +23,13 @@ def text_to_speech(text):
|
|
| 24 |
|
| 25 |
|
| 26 |
def speak(text):
|
| 27 |
-
speed = duration_slider.value
|
| 28 |
y = text_to_speech(text)
|
| 29 |
-
y = librosa.effects.time_stretch(y, speed)
|
| 30 |
return 16_000, y
|
| 31 |
|
| 32 |
|
| 33 |
title = "vietTTS"
|
| 34 |
description = "A vietnamese text-to-speech demo."
|
| 35 |
-
|
| 36 |
gr.Interface(
|
| 37 |
fn=speak,
|
| 38 |
inputs="text",
|
|
|
|
| 4 |
import numpy as np
|
| 5 |
import gradio as gr
|
| 6 |
import os
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
def text_to_speech(text):
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
def speak(text):
|
|
|
|
| 26 |
y = text_to_speech(text)
|
|
|
|
| 27 |
return 16_000, y
|
| 28 |
|
| 29 |
|
| 30 |
title = "vietTTS"
|
| 31 |
description = "A vietnamese text-to-speech demo."
|
| 32 |
+
|
| 33 |
gr.Interface(
|
| 34 |
fn=speak,
|
| 35 |
inputs="text",
|