Den Pavloff commited on
Commit
5261d4e
·
1 Parent(s): 365e9d8
Files changed (2) hide show
  1. app.py +1 -1
  2. util.py +2 -1
app.py CHANGED
@@ -166,7 +166,7 @@ with gr.Blocks(title="KaniTTS - Text to Speech", theme=gr.themes.Default()) as d
166
  gr.Markdown("## 🎯 Demo Examples")
167
 
168
  def play_demo(text):
169
- return (22050, demo_examples[text]), f"Playing: {text}"
170
 
171
  with gr.Row():
172
  for text in list(demo_examples.keys())[:4]:
 
166
  gr.Markdown("## 🎯 Demo Examples")
167
 
168
  def play_demo(text):
169
+ return (22050, demo_examples[text])
170
 
171
  with gr.Row():
172
  for text in list(demo_examples.keys())[:4]:
util.py CHANGED
@@ -240,7 +240,8 @@ class Demo:
240
  return filepath
241
 
242
  def get_audio(self, filepath: str):
243
- return librosa.load(filepath, sr=22050)
 
244
 
245
  def __call__(self):
246
  examples = {}
 
240
  return filepath
241
 
242
  def get_audio(self, filepath: str):
243
+ arr, _ = librosa.load(filepath, sr=22050)
244
+ return arr
245
 
246
  def __call__(self):
247
  examples = {}