Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import gradio as gr
|
|
3 |
import random
|
4 |
import prompts
|
5 |
from pypipertts import PyPiper
|
|
|
6 |
pp=PyPiper()
|
7 |
|
8 |
#client = InferenceClient("Qwen/QwQ-32B-Preview")
|
@@ -50,7 +51,9 @@ def tts(inp,names,length,noise,width,sen_pause):
|
|
50 |
print(inp)
|
51 |
print(inp[-1][-1])
|
52 |
txt = inp[-1][-1].strip("</s>")
|
53 |
-
|
|
|
|
|
54 |
|
55 |
with gr.Blocks() as iface:
|
56 |
chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, layout="panel")
|
|
|
3 |
import random
|
4 |
import prompts
|
5 |
from pypipertts import PyPiper
|
6 |
+
import codecs
|
7 |
pp=PyPiper()
|
8 |
|
9 |
#client = InferenceClient("Qwen/QwQ-32B-Preview")
|
|
|
51 |
print(inp)
|
52 |
print(inp[-1][-1])
|
53 |
txt = inp[-1][-1].strip("</s>")
|
54 |
+
decoded_text = codecs.decode(txt, "unicode_escape")
|
55 |
+
|
56 |
+
yield from pp.stream_tts(decode_text,names,length,noise,width,sen_pause)
|
57 |
|
58 |
with gr.Blocks() as iface:
|
59 |
chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, layout="panel")
|