Spaces:
Runtime error
Runtime error
KashiwaByte
commited on
Commit
•
a2538e6
1
Parent(s):
aa086ad
change tts
Browse files- app.py +4 -2
- ffmpeg-2023-09-07-git-9c9f48e7f2-full_build/bin/wsay.exe +0 -0
- ffmpeg-2023-09-07-git-9c9f48e7f2-full_build/presets/libvpx-1080p.ffpreset +0 -19
- ffmpeg-2023-09-07-git-9c9f48e7f2-full_build/presets/libvpx-1080p50_60.ffpreset +0 -19
- ffmpeg-2023-09-07-git-9c9f48e7f2-full_build/presets/libvpx-360p.ffpreset +0 -18
- ffmpeg-2023-09-07-git-9c9f48e7f2-full_build/presets/libvpx-720p.ffpreset +0 -19
- ffmpeg-2023-09-07-git-9c9f48e7f2-full_build/presets/libvpx-720p50_60.ffpreset +0 -19
- requirements.txt +1 -0
- wsay.exe +0 -0
app.py
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
import gradio as gr
|
3 |
import openai, subprocess
|
4 |
from pathlib import Path
|
|
|
5 |
|
6 |
# 换成你自己的api_key
|
7 |
openai.api_key = "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"
|
@@ -25,7 +26,8 @@ def transcribe(audio):
|
|
25 |
# print(response)
|
26 |
messages.append(system_message)
|
27 |
|
28 |
-
|
|
|
29 |
|
30 |
chat_transcript = ""
|
31 |
for message in messages:
|
@@ -50,7 +52,7 @@ def initway(api_key,style):
|
|
50 |
with gr.Blocks(css="#chatbot{height:300px} .overflow-y-auto{height:500px}") as init:
|
51 |
with gr.Row():
|
52 |
api_key = gr.Textbox(
|
53 |
-
lines=1, placeholder="api_key Here...", label="api_key",value="
|
54 |
style = gr.Textbox(
|
55 |
lines=1, placeholder="style Here...", label="辩风" ,value="你是一名逻辑性很强的资深辩手,你擅长通过数据论据和学理论据来反驳,你的反驳总是一阵见血,而且很有逻辑性。接下来我会提出我的观点,你需要做的就是针锋相对地反驳我,每次回答不超过100个字")
|
56 |
btn = gr.Button(value="初始化")
|
|
|
2 |
import gradio as gr
|
3 |
import openai, subprocess
|
4 |
from pathlib import Path
|
5 |
+
import pyttsx3
|
6 |
|
7 |
# 换成你自己的api_key
|
8 |
openai.api_key = "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"
|
|
|
26 |
# print(response)
|
27 |
messages.append(system_message)
|
28 |
|
29 |
+
pyttsx3.speak(system_message['content'])
|
30 |
+
|
31 |
|
32 |
chat_transcript = ""
|
33 |
for message in messages:
|
|
|
52 |
with gr.Blocks(css="#chatbot{height:300px} .overflow-y-auto{height:500px}") as init:
|
53 |
with gr.Row():
|
54 |
api_key = gr.Textbox(
|
55 |
+
lines=1, placeholder="api_key Here...", label="api_key",value="")
|
56 |
style = gr.Textbox(
|
57 |
lines=1, placeholder="style Here...", label="辩风" ,value="你是一名逻辑性很强的资深辩手,你擅长通过数据论据和学理论据来反驳,你的反驳总是一阵见血,而且很有逻辑性。接下来我会提出我的观点,你需要做的就是针锋相对地反驳我,每次回答不超过100个字")
|
58 |
btn = gr.Button(value="初始化")
|
ffmpeg-2023-09-07-git-9c9f48e7f2-full_build/bin/wsay.exe
DELETED
Binary file (670 kB)
|
|
ffmpeg-2023-09-07-git-9c9f48e7f2-full_build/presets/libvpx-1080p.ffpreset
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
vcodec=libvpx
|
2 |
-
|
3 |
-
g=120
|
4 |
-
lag-in-frames=16
|
5 |
-
deadline=good
|
6 |
-
cpu-used=0
|
7 |
-
vprofile=1
|
8 |
-
qmax=51
|
9 |
-
qmin=11
|
10 |
-
slices=4
|
11 |
-
b=2M
|
12 |
-
|
13 |
-
#ignored unless using -pass 2
|
14 |
-
maxrate=24M
|
15 |
-
minrate=100k
|
16 |
-
auto-alt-ref=1
|
17 |
-
arnr-maxframes=7
|
18 |
-
arnr-strength=5
|
19 |
-
arnr-type=centered
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ffmpeg-2023-09-07-git-9c9f48e7f2-full_build/presets/libvpx-1080p50_60.ffpreset
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
vcodec=libvpx
|
2 |
-
|
3 |
-
g=120
|
4 |
-
lag-in-frames=25
|
5 |
-
deadline=good
|
6 |
-
cpu-used=0
|
7 |
-
vprofile=1
|
8 |
-
qmax=51
|
9 |
-
qmin=11
|
10 |
-
slices=4
|
11 |
-
b=2M
|
12 |
-
|
13 |
-
#ignored unless using -pass 2
|
14 |
-
maxrate=24M
|
15 |
-
minrate=100k
|
16 |
-
auto-alt-ref=1
|
17 |
-
arnr-maxframes=7
|
18 |
-
arnr-strength=5
|
19 |
-
arnr-type=centered
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ffmpeg-2023-09-07-git-9c9f48e7f2-full_build/presets/libvpx-360p.ffpreset
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
vcodec=libvpx
|
2 |
-
|
3 |
-
g=120
|
4 |
-
lag-in-frames=16
|
5 |
-
deadline=good
|
6 |
-
cpu-used=0
|
7 |
-
vprofile=0
|
8 |
-
qmax=63
|
9 |
-
qmin=0
|
10 |
-
b=768k
|
11 |
-
|
12 |
-
#ignored unless using -pass 2
|
13 |
-
maxrate=1.5M
|
14 |
-
minrate=40k
|
15 |
-
auto-alt-ref=1
|
16 |
-
arnr-maxframes=7
|
17 |
-
arnr-strength=5
|
18 |
-
arnr-type=centered
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ffmpeg-2023-09-07-git-9c9f48e7f2-full_build/presets/libvpx-720p.ffpreset
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
vcodec=libvpx
|
2 |
-
|
3 |
-
g=120
|
4 |
-
lag-in-frames=16
|
5 |
-
deadline=good
|
6 |
-
cpu-used=0
|
7 |
-
vprofile=0
|
8 |
-
qmax=51
|
9 |
-
qmin=11
|
10 |
-
slices=4
|
11 |
-
b=2M
|
12 |
-
|
13 |
-
#ignored unless using -pass 2
|
14 |
-
maxrate=24M
|
15 |
-
minrate=100k
|
16 |
-
auto-alt-ref=1
|
17 |
-
arnr-maxframes=7
|
18 |
-
arnr-strength=5
|
19 |
-
arnr-type=centered
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ffmpeg-2023-09-07-git-9c9f48e7f2-full_build/presets/libvpx-720p50_60.ffpreset
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
vcodec=libvpx
|
2 |
-
|
3 |
-
g=120
|
4 |
-
lag-in-frames=25
|
5 |
-
deadline=good
|
6 |
-
cpu-used=0
|
7 |
-
vprofile=0
|
8 |
-
qmax=51
|
9 |
-
qmin=11
|
10 |
-
slices=4
|
11 |
-
b=2M
|
12 |
-
|
13 |
-
#ignored unless using -pass 2
|
14 |
-
maxrate=24M
|
15 |
-
minrate=100k
|
16 |
-
auto-alt-ref=1
|
17 |
-
arnr-maxframes=7
|
18 |
-
arnr-strength=5
|
19 |
-
arnr-type=centered
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
@@ -1,2 +1,3 @@
|
|
1 |
gradio==3.44.0
|
2 |
openai==0.28.0
|
|
|
|
1 |
gradio==3.44.0
|
2 |
openai==0.28.0
|
3 |
+
pyttsx3==2.90
|
wsay.exe
DELETED
Binary file (670 kB)
|
|