Spaces:
Sleeping
Sleeping
Commit
·
978cac7
1
Parent(s):
b4e6550
Add code
Browse files
app.py
CHANGED
@@ -106,7 +106,7 @@ def stream_audio(hidden_story, speech_output):
|
|
106 |
|
107 |
for new_audio in speech_output:
|
108 |
print(f"Sample of length: {round(new_audio.shape[0] / sampling_rate, 2)} seconds")
|
109 |
-
yield hidden_story,
|
110 |
|
111 |
|
112 |
with gr.Blocks() as block:
|
@@ -124,7 +124,7 @@ with gr.Blocks() as block:
|
|
124 |
run_button = gr.Button("Generate Story", variant="primary")
|
125 |
with gr.Row():
|
126 |
with gr.Group():
|
127 |
-
audio_out = gr.Audio(label="Bed time story", streaming=True, autoplay=True
|
128 |
story = gr.Textbox(label="Story")
|
129 |
|
130 |
inputs = [subject, setting]
|
|
|
106 |
|
107 |
for new_audio in speech_output:
|
108 |
print(f"Sample of length: {round(new_audio.shape[0] / sampling_rate, 2)} seconds")
|
109 |
+
yield hidden_story, numpy_to_mp3(new_audio, sampling_rate=sampling_rate)
|
110 |
|
111 |
|
112 |
with gr.Blocks() as block:
|
|
|
124 |
run_button = gr.Button("Generate Story", variant="primary")
|
125 |
with gr.Row():
|
126 |
with gr.Group():
|
127 |
+
audio_out = gr.Audio(label="Bed time story", streaming=True, autoplay=True)
|
128 |
story = gr.Textbox(label="Story")
|
129 |
|
130 |
inputs = [subject, setting]
|