Skip to content

Commit

Permalink
2022.10.17
Browse files Browse the repository at this point in the history
1、更新语音指令;
2、修正微软key的配置项;
3、提供q&a模版;
  • Loading branch information
xszyou committed Oct 17, 2022
1 parent fc23976 commit b1c78fd
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 20 deletions.
34 changes: 30 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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">

## 语音指令

- **关闭核心**
关闭
再见
你走吧
- **静音**
静音
闭嘴
我想静静
- **取消静音**
取消静音
你在哪呢?
你可以说话了
- **播放歌曲**
播放歌曲
播放音乐
唱首歌
放首歌
听音乐
你会唱歌吗?
- **暂停播放**
暂停播放
别唱了
我不想听了


## 环境
Expand Down Expand Up @@ -183,4 +208,5 @@ python main.py

技术交流群

![mmqrcode1665648480395](C:\Users\Administrator\Documents\GitHub\Fay\images\mmqrcode1665648480395.png)
<img src="images/4.png" alt="直播">

2 changes: 1 addition & 1 deletion ai_module/ms_tts_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

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)
Expand Down
28 changes: 14 additions & 14 deletions config.json
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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": {
Expand All @@ -45,8 +45,8 @@
"url": "https://live.douyin.com/"
},
"record": {
"device": "",
"enabled": false
"device": "\u9ea6\u514b\u98ce (HD Webcam C525)",
"enabled": true
}
}
}
4 changes: 4 additions & 0 deletions datas/data-20221013162403.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1665649464550,发言,,Hello hello hello hello hello

1665649465854,主播,菲菲,我是你的好朋友

4 changes: 4 additions & 0 deletions datas/data-20221017112610.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1665977183475,发言,,哈喽哈喽哈喽哈喽哈喽

1665977184516,主播,菲菲,我就理解为你在跟我打招呼好了

12 changes: 12 additions & 0 deletions datas/data-20221017112816.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
1665977328657,发言,,今天天气怎么样

1665977329543,主播,菲菲,北京市今天全天晴,气温2℃ ~ 17℃,空气质量优,有北风6-7级,微冷,请注意保暖,预防感冒。

1665977356957,发言,,今天心情好吗

1665977357578,主播,菲菲,好你个鬼啊!

1665977433665,发言,,这个商品的优点是什么

1665977433825,主播,菲菲,没有优点!

File renamed without changes
Binary file added images/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qa_demo.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Binary file added samples/sample-1665977330241.mp3
Binary file not shown.
Binary file added samples/sample-1665977357951.mp3
Binary file not shown.
Binary file added samples/sample-1665977434134.mp3
Binary file not shown.
4 changes: 4 additions & 0 deletions system.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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=
3 changes: 3 additions & 0 deletions utils/config_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
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
Expand All @@ -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
Expand All @@ -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')
Expand Down

0 comments on commit b1c78fd

Please sign in to comment.