Spaces:
Runtime error
Runtime error
Commit
·
2903326
1
Parent(s):
88c0a73
Update app.py
Browse files
app.py
CHANGED
@@ -6,12 +6,13 @@ pipe = pipeline("text-to-speech", model="suno/bark-small")
|
|
6 |
|
7 |
def text_to_speech(text):
|
8 |
output = pipe(text)
|
|
|
9 |
if len(output) > 0 and "audio" in output[0] and "sampling_rate" in output[0]:
|
10 |
audio = Audio(output[0]["audio"], rate=output[0]["sampling_rate"])
|
11 |
return audio
|
12 |
else:
|
13 |
return None
|
14 |
-
|
15 |
iface = gr.Interface(
|
16 |
fn=text_to_speech,
|
17 |
inputs="text",
|
|
|
6 |
|
7 |
def text_to_speech(text):
|
8 |
output = pipe(text)
|
9 |
+
print(output) # Debug print
|
10 |
if len(output) > 0 and "audio" in output[0] and "sampling_rate" in output[0]:
|
11 |
audio = Audio(output[0]["audio"], rate=output[0]["sampling_rate"])
|
12 |
return audio
|
13 |
else:
|
14 |
return None
|
15 |
+
|
16 |
iface = gr.Interface(
|
17 |
fn=text_to_speech,
|
18 |
inputs="text",
|