diff --git a/README.md b/README.md
index 3869b9d..6371df3 100644
--- a/README.md
+++ b/README.md
@@ -11,9 +11,34 @@
使用UE、C4D、DAZ、LIVE2D等三维引擎软件开发的数字形象可以与本“数字人控制器”对接,从而实现虚拟主播、数字导游、数字助手等。我们提供UE4对接的demo,但我们更鼓励用户自行实现喜欢的数字形象。
当然,若不考虑外观形象的话,本“数字人控制器”其实也可以独立使用的,可以充当一个语音助理。
-
-
-
+
+
+
+## 语音指令
+
+- **关闭核心**
+ 关闭
+ 再见
+ 你走吧
+- **静音**
+ 静音
+ 闭嘴
+ 我想静静
+- **取消静音**
+ 取消静音
+ 你在哪呢?
+ 你可以说话了
+- **播放歌曲**
+ 播放歌曲
+ 播放音乐
+ 唱首歌
+ 放首歌
+ 听音乐
+ 你会唱歌吗?
+- **暂停播放**
+ 暂停播放
+ 别唱了
+ 我不想听了
## 环境
@@ -183,4 +208,5 @@ python main.py
技术交流群
-![mmqrcode1665648480395](C:\Users\Administrator\Documents\GitHub\Fay\images\mmqrcode1665648480395.png)
\ No newline at end of file
+
+
diff --git a/ai_module/ms_tts_sdk.py b/ai_module/ms_tts_sdk.py
index fade465..056876d 100644
--- a/ai_module/ms_tts_sdk.py
+++ b/ai_module/ms_tts_sdk.py
@@ -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)
diff --git a/config.json b/config.json
index 39f3c37..b84d6e3 100644
--- a/config.json
+++ b/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
}
}
}
\ No newline at end of file
diff --git a/datas/data-20221013162403.csv b/datas/data-20221013162403.csv
new file mode 100644
index 0000000..30ddb3f
--- /dev/null
+++ b/datas/data-20221013162403.csv
@@ -0,0 +1,4 @@
+1665649464550,发言,,Hello hello hello hello hello
+
+1665649465854,主播,菲菲,我是你的好朋友
+
diff --git a/datas/data-20221017112610.csv b/datas/data-20221017112610.csv
new file mode 100644
index 0000000..738831f
--- /dev/null
+++ b/datas/data-20221017112610.csv
@@ -0,0 +1,4 @@
+1665977183475,发言,,哈喽哈喽哈喽哈喽哈喽
+
+1665977184516,主播,菲菲,我就理解为你在跟我打招呼好了
+
diff --git a/datas/data-20221017112816.csv b/datas/data-20221017112816.csv
new file mode 100644
index 0000000..5b400a9
--- /dev/null
+++ b/datas/data-20221017112816.csv
@@ -0,0 +1,12 @@
+1665977328657,发言,,今天天气怎么样
+
+1665977329543,主播,菲菲,北京市今天全天晴,气温2℃ ~ 17℃,空气质量优,有北风6-7级,微冷,请注意保暖,预防感冒。
+
+1665977356957,发言,,今天心情好吗
+
+1665977357578,主播,菲菲,好你个鬼啊!
+
+1665977433665,发言,,这个商品的优点是什么
+
+1665977433825,主播,菲菲,没有优点!
+
diff --git a/images/mmqrcode1665648480395.png b/images/4.png
similarity index 100%
rename from images/mmqrcode1665648480395.png
rename to images/4.png
diff --git a/images/5.png b/images/5.png
new file mode 100644
index 0000000..79759c7
Binary files /dev/null and b/images/5.png differ
diff --git a/qa_demo.xlsx b/qa_demo.xlsx
new file mode 100644
index 0000000..ee3aaf3
Binary files /dev/null and b/qa_demo.xlsx differ
diff --git a/requirements.txt b/requirements.txt
index af3cb72..210673d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -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
diff --git a/samples/sample-1665977330241.mp3 b/samples/sample-1665977330241.mp3
new file mode 100644
index 0000000..be5333c
Binary files /dev/null and b/samples/sample-1665977330241.mp3 differ
diff --git a/samples/sample-1665977357951.mp3 b/samples/sample-1665977357951.mp3
new file mode 100644
index 0000000..54c1975
Binary files /dev/null and b/samples/sample-1665977357951.mp3 differ
diff --git a/samples/sample-1665977434134.mp3 b/samples/sample-1665977434134.mp3
new file mode 100644
index 0000000..374c0c0
Binary files /dev/null and b/samples/sample-1665977434134.mp3 differ
diff --git a/system.conf b/system.conf
index 2b9927b..dd9a62b 100644
--- a/system.conf
+++ b/system.conf
@@ -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=
diff --git a/utils/config_util.py b/utils/config_util.py
index ad717f9..f059c3e 100644
--- a/utils/config_util.py
+++ b/utils/config_util.py
@@ -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
@@ -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')