2022.10.17
1、更新语音指令; 2、修正微软key的配置项; 3、提供q&a模版;
This commit is contained in:
parent
fc23976f26
commit
b1c78fd260
34
README.md
34
README.md
@ -11,9 +11,34 @@
|
||||
使用UE、C4D、DAZ、LIVE2D等三维引擎软件开发的数字形象可以与本“数字人控制器”对接,从而实现虚拟主播、数字导游、数字助手等。我们提供UE4对接的demo,但我们更鼓励用户自行实现喜欢的数字形象。
|
||||
|
||||
当然,若不考虑外观形象的话,本“数字人控制器”其实也可以独立使用的,可以充当一个语音助理。
|
||||
<img src="images/1.png" alt="直播">
|
||||
<img src="images/2.png" alt="助理">
|
||||
<img src="images/3.png" alt="QA">
|
||||
|
||||
<img src="images/5.png" alt="QA">
|
||||
|
||||
## 语音指令
|
||||
|
||||
- **关闭核心**
|
||||
关闭
|
||||
再见
|
||||
你走吧
|
||||
- **静音**
|
||||
静音
|
||||
闭嘴
|
||||
我想静静
|
||||
- **取消静音**
|
||||
取消静音
|
||||
你在哪呢?
|
||||
你可以说话了
|
||||
- **播放歌曲**
|
||||
播放歌曲
|
||||
播放音乐
|
||||
唱首歌
|
||||
放首歌
|
||||
听音乐
|
||||
你会唱歌吗?
|
||||
- **暂停播放**
|
||||
暂停播放
|
||||
别唱了
|
||||
我不想听了
|
||||
|
||||
|
||||
## 环境
|
||||
@ -183,4 +208,5 @@ python main.py
|
||||
|
||||
技术交流群
|
||||
|
||||
![mmqrcode1665648480395](C:\Users\Administrator\Documents\GitHub\Fay\images\mmqrcode1665648480395.png)
|
||||
<img src="images/4.png" alt="直播">
|
||||
|
||||
|
@ -10,7 +10,7 @@ from utils import config_util as cfg
|
||||
|
||||
class Speech:
|
||||
def __init__(self):
|
||||
self.__speech_config = speechsdk.SpeechConfig(subscription=cfg.key_ms_tts_key, region="eastasia")
|
||||
self.__speech_config = speechsdk.SpeechConfig(subscription=cfg.key_ms_tts_key, region=cfg.key_ms_tts_region)
|
||||
self.__speech_config.speech_recognition_language = "zh-CN"
|
||||
self.__speech_config.speech_synthesis_voice_name = "zh-CN-XiaoxiaoNeural"
|
||||
self.__speech_config.set_speech_synthesis_output_format(speechsdk.SpeechSynthesisOutputFormat.Audio16Khz32KBitRateMonoMp3)
|
||||
|
28
config.json
28
config.json
@ -1,18 +1,18 @@
|
||||
{
|
||||
"attribute": {
|
||||
"age": "成年",
|
||||
"birth": "中国",
|
||||
"constellation": "水瓶座",
|
||||
"contact": "微信123456789",
|
||||
"gender": "男",
|
||||
"hobby": "发呆",
|
||||
"job": "产品布道者",
|
||||
"name": "陈升",
|
||||
"age": "\u6210\u5e74",
|
||||
"birth": "\u4e2d\u56fd",
|
||||
"constellation": "\u6c34\u74f6\u5ea7",
|
||||
"contact": "qq467665317",
|
||||
"gender": "\u7537",
|
||||
"hobby": "\u53d1\u5446",
|
||||
"job": "\u4ea7\u54c1\u5e03\u9053\u8005",
|
||||
"name": "\u9648\u5347",
|
||||
"voice": "YUN_XI",
|
||||
"zodiac": "蛇"
|
||||
"zodiac": "\u86c7"
|
||||
},
|
||||
"interact": {
|
||||
"QnA": "E:/QnA/全局QnA.xlsx",
|
||||
"QnA": "qa_demo.xlsx",
|
||||
"maxInteractTime": 15,
|
||||
"perception": {
|
||||
"chat": 7,
|
||||
@ -21,11 +21,11 @@
|
||||
"indifferent": 10,
|
||||
"join": 10
|
||||
},
|
||||
"playSound": false
|
||||
"playSound": true
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"QnA": "E:/QnA/商品QnA.xlsx",
|
||||
"QnA": "qa_demo.xlsx",
|
||||
"demoVideo": "C:/Demo.mp4",
|
||||
"enabled": false,
|
||||
"explain": {
|
||||
@ -45,8 +45,8 @@
|
||||
"url": "https://live.douyin.com/"
|
||||
},
|
||||
"record": {
|
||||
"device": "",
|
||||
"enabled": false
|
||||
"device": "\u9ea6\u514b\u98ce (HD Webcam C525)",
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
4
datas/data-20221013162403.csv
Normal file
4
datas/data-20221013162403.csv
Normal file
@ -0,0 +1,4 @@
|
||||
1665649464550,发言,,Hello hello hello hello hello
|
||||
|
||||
1665649465854,主播,菲菲,我是你的好朋友
|
||||
|
|
4
datas/data-20221017112610.csv
Normal file
4
datas/data-20221017112610.csv
Normal file
@ -0,0 +1,4 @@
|
||||
1665977183475,发言,,哈喽哈喽哈喽哈喽哈喽
|
||||
|
||||
1665977184516,主播,菲菲,我就理解为你在跟我打招呼好了
|
||||
|
|
12
datas/data-20221017112816.csv
Normal file
12
datas/data-20221017112816.csv
Normal file
@ -0,0 +1,12 @@
|
||||
1665977328657,发言,,今天天气怎么样
|
||||
|
||||
1665977329543,主播,菲菲,北京市今天全天晴,气温2℃ ~ 17℃,空气质量优,有北风6-7级,微冷,请注意保暖,预防感冒。
|
||||
|
||||
1665977356957,发言,,今天心情好吗
|
||||
|
||||
1665977357578,主播,菲菲,好你个鬼啊!
|
||||
|
||||
1665977433665,发言,,这个商品的优点是什么
|
||||
|
||||
1665977433825,主播,菲菲,没有优点!
|
||||
|
|
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 180 KiB |
BIN
images/5.png
Normal file
BIN
images/5.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 592 KiB |
BIN
qa_demo.xlsx
Normal file
BIN
qa_demo.xlsx
Normal file
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
requests~=2.26.0
|
||||
selenium~=4.1.3
|
||||
numpy~=1.19.5
|
||||
numpy~=1.22.0
|
||||
pyaudio~=0.2.11
|
||||
websockets~=10.2
|
||||
ws4py~=0.5.1
|
||||
|
BIN
samples/sample-1665977330241.mp3
Normal file
BIN
samples/sample-1665977330241.mp3
Normal file
Binary file not shown.
BIN
samples/sample-1665977357951.mp3
Normal file
BIN
samples/sample-1665977357951.mp3
Normal file
Binary file not shown.
BIN
samples/sample-1665977434134.mp3
Normal file
BIN
samples/sample-1665977434134.mp3
Normal file
Binary file not shown.
@ -10,11 +10,15 @@ ali_nls_app_key=
|
||||
|
||||
# 微软 文字转语音 服务密钥
|
||||
ms_tts_key=
|
||||
ms_tts_region=
|
||||
|
||||
# 讯飞 自然语言处理 服务密钥
|
||||
xf_aiui_app_id=
|
||||
xf_aiui_api_key=
|
||||
|
||||
# xf_aiui_app_id=aa00cfa0
|
||||
# xf_aiui_api_key=9a22da6450e950541c39d09ec29b1786
|
||||
|
||||
# 讯飞 情绪分析 服务密钥
|
||||
xf_ltp_app_id=
|
||||
xf_ltp_api_key=
|
||||
|
@ -10,6 +10,7 @@ key_ali_nls_key_id = None
|
||||
key_ali_nls_key_secret = None
|
||||
key_ali_nls_app_key = None
|
||||
key_ms_tts_key = None
|
||||
Key_ms_tts_region = None
|
||||
key_xf_aiui_app_id = None
|
||||
key_xf_aiui_api_key = None
|
||||
key_xf_ltp_app_id = None
|
||||
@ -23,6 +24,7 @@ def load_config():
|
||||
global key_ali_nls_key_secret
|
||||
global key_ali_nls_app_key
|
||||
global key_ms_tts_key
|
||||
global key_ms_tts_region
|
||||
global key_xf_aiui_app_id
|
||||
global key_xf_aiui_api_key
|
||||
global key_xf_ltp_app_id
|
||||
@ -35,6 +37,7 @@ def load_config():
|
||||
key_ali_nls_key_secret = system_config.get('key', 'ali_nls_key_secret')
|
||||
key_ali_nls_app_key = system_config.get('key', 'ali_nls_app_key')
|
||||
key_ms_tts_key = system_config.get('key', 'ms_tts_key')
|
||||
key_ms_tts_region = system_config.get('key', 'ms_tts_region')
|
||||
key_xf_aiui_app_id = system_config.get('key', 'xf_aiui_app_id')
|
||||
key_xf_aiui_api_key = system_config.get('key', 'xf_aiui_api_key')
|
||||
key_xf_ltp_app_id = system_config.get('key', 'xf_ltp_app_id')
|
||||
|
Loading…
Reference in New Issue
Block a user