alysa commited on
Commit
e576d9f
1 Parent(s): 9fba25a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
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
- duration_slider = gr.Slider(minimum=0.1, maximum=5, value=1, step=0.1, label='速度 Speed')
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",