Mahiruoshi
commited on
Commit
•
7c30bdd
1
Parent(s):
df0ea01
Update app.py
Browse files
app.py
CHANGED
@@ -95,13 +95,11 @@ def friend_chat(text,key,call_name,tts_input3):
|
|
95 |
identity = tts_input3
|
96 |
start_sequence = '\n'+str(call_name)+':'
|
97 |
restart_sequence = "\nYou: "
|
98 |
-
all_text = identity + restart_sequence
|
99 |
if 1 == 1:
|
100 |
prompt0 = text #当期prompt
|
101 |
if text == 'quit':
|
102 |
return prompt0
|
103 |
prompt = identity + prompt0 + start_sequence
|
104 |
-
|
105 |
response = openai.Completion.create(
|
106 |
model="text-davinci-003",
|
107 |
prompt=prompt,
|
@@ -144,7 +142,7 @@ def infer(language,text,tts_input2,tts_input3,speaker_id,n_scale= 0.667,n_scale_
|
|
144 |
print(spending_time)
|
145 |
return (hps_ms.data.sampling_rate, audio)
|
146 |
lan = ["中文","日文","对话"]
|
147 |
-
idols = ["高咲侑(误)","歩夢","かすみ","しずく","果林","愛","彼方","せつ菜","璃奈","栞子","エマ","ランジュ","ミア","
|
148 |
|
149 |
|
150 |
dev = torch.device("cpu")
|
@@ -167,8 +165,8 @@ with app:
|
|
167 |
with gr.TabItem("Basic"):
|
168 |
|
169 |
tts_input1 = gr.TextArea(label="输入你的文本,支持vits版在另一个仓库", value="一次審査、二次審査、それぞれの欄に記入をお願いします。")
|
170 |
-
tts_input2 = gr.TextArea(label="如需使用openai,输入你的openai-key", value="官网")
|
171 |
-
tts_input3 = gr.TextArea(label="写上你给她的设定", value="
|
172 |
language = gr.Dropdown(label="选择合成方式",choices=lan, value="日文", interactive=True)
|
173 |
para_input1 = gr.Slider(minimum= 0.01,maximum=1.0,label="更改噪声比例", value=0.227)
|
174 |
para_input2 = gr.Slider(minimum= 0.01,maximum=1.0,label="更改噪声偏差", value=0.3)
|
|
|
95 |
identity = tts_input3
|
96 |
start_sequence = '\n'+str(call_name)+':'
|
97 |
restart_sequence = "\nYou: "
|
|
|
98 |
if 1 == 1:
|
99 |
prompt0 = text #当期prompt
|
100 |
if text == 'quit':
|
101 |
return prompt0
|
102 |
prompt = identity + prompt0 + start_sequence
|
|
|
103 |
response = openai.Completion.create(
|
104 |
model="text-davinci-003",
|
105 |
prompt=prompt,
|
|
|
142 |
print(spending_time)
|
143 |
return (hps_ms.data.sampling_rate, audio)
|
144 |
lan = ["中文","日文","对话"]
|
145 |
+
idols = ["高咲侑(误)","歩夢","かすみ","しずく","果林","愛","彼方","せつ菜","璃奈","栞子","エマ","ランジュ","ミア","派蒙"]
|
146 |
|
147 |
|
148 |
dev = torch.device("cpu")
|
|
|
165 |
with gr.TabItem("Basic"):
|
166 |
|
167 |
tts_input1 = gr.TextArea(label="输入你的文本,支持vits版在另一个仓库", value="一次審査、二次審査、それぞれの欄に記入をお願いします。")
|
168 |
+
tts_input2 = gr.TextArea(label="如需使用openai,输入你的openai-key,合成方式选择对话", value="官网")
|
169 |
+
tts_input3 = gr.TextArea(label="写上你给她的设定", value="")
|
170 |
language = gr.Dropdown(label="选择合成方式",choices=lan, value="日文", interactive=True)
|
171 |
para_input1 = gr.Slider(minimum= 0.01,maximum=1.0,label="更改噪声比例", value=0.227)
|
172 |
para_input2 = gr.Slider(minimum= 0.01,maximum=1.0,label="更改噪声偏差", value=0.3)
|