Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -105,7 +105,7 @@ def greet(product,description):
|
|
105 |
else:
|
106 |
text_str = a_list[0]
|
107 |
samples = tts.synthesize(text_str, speakers[-1])
|
108 |
-
yield gr.Audio(value=(tts.get_sampling_rate(), samples))
|
109 |
else:
|
110 |
output = llm.create_chat_completion(
|
111 |
messages=[
|
@@ -127,7 +127,7 @@ def greet(product,description):
|
|
127 |
delta = chunk['choices'][0]['delta']
|
128 |
if 'content' in delta:
|
129 |
samples = tts.synthesize(delta.get('content', ''), speakers[-1])
|
130 |
-
yield gr.Audio(value=(tts.get_sampling_rate(), samples))
|
131 |
|
132 |
|
133 |
demo = gr.Interface(fn=greet, inputs=["text","text"], outputs=gr.Audio(), concurrency_limit=10)
|
|
|
105 |
else:
|
106 |
text_str = a_list[0]
|
107 |
samples = tts.synthesize(text_str, speakers[-1])
|
108 |
+
yield gr.Audio.update(value=(tts.get_sampling_rate(), samples))
|
109 |
else:
|
110 |
output = llm.create_chat_completion(
|
111 |
messages=[
|
|
|
127 |
delta = chunk['choices'][0]['delta']
|
128 |
if 'content' in delta:
|
129 |
samples = tts.synthesize(delta.get('content', ''), speakers[-1])
|
130 |
+
yield gr.Audio.update(value=(tts.get_sampling_rate(), samples))
|
131 |
|
132 |
|
133 |
demo = gr.Interface(fn=greet, inputs=["text","text"], outputs=gr.Audio(), concurrency_limit=10)
|