Skip to content

Commit

Permalink
聊天页 新增 唤醒词和睡眠词,可以通过此功能唤醒ai对话,不需要时使用睡眠词停止回复
Browse files Browse the repository at this point in the history
  • Loading branch information
Ikaros-521 committed Jul 26, 2024
1 parent 01e0d2b commit 51b8839
Show file tree
Hide file tree
Showing 8 changed files with 1,140 additions and 676 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ Miniconda3/
models/mo*
models/iic
models/faster-whisper-small
models/faster-whisper-small2

out/sd/*

Expand All @@ -252,5 +251,3 @@ static/

add_dependencies.py

pyproject.toml
poetry.lock
77 changes: 48 additions & 29 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
]
},
"read_comment": {
"enable": true,
"enable": false,
"read_username_enable": true,
"username_max_len": 10,
"voice_change": false,
Expand Down Expand Up @@ -525,7 +525,7 @@
},
"llm_tpu": {
"api_ip_port": "http://127.0.0.1:8003",
"max_length": 1,
"max_length": 1.0,
"top_p": 0.8,
"temperature": 0.95,
"history_enable": true,
Expand Down Expand Up @@ -951,13 +951,13 @@
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42"
},
"talk": {
"key_listener_enable": false,
"key_listener_enable": true,
"device_index": "1",
"no_recording_during_playback": true,
"no_recording_during_playback_sleep_interval": 1.0,
"username": "主人",
"type": "google",
"continuous_talk": false,
"type": "faster_whisper",
"continuous_talk": true,
"trigger_key": "Q",
"stop_trigger_key": "S",
"volume_threshold": 800.0,
Expand All @@ -974,7 +974,7 @@
"tgt_lang": "zh-CN"
},
"faster_whisper": {
"model_size": "small",
"model_size": "large-v3",
"language": "自动识别",
"device": "cuda",
"compute_type": "float16",
Expand All @@ -990,6 +990,25 @@
"text_norm": "woitn",
"batch_size_s": 0,
"batch_size": 1
},
"wakeup_sleep": {
"enable": true,
"wakeup_word": [
"管家",
"苏醒吧"
],
"sleep_word": [
"休息吧",
"退下吧"
],
"wakeup_copywriting": [
"主人,我在呢",
"主人,有什么吩咐"
],
"sleep_copywriting": [
"好的,主人,我休息了",
"微臣告退"
]
}
},
"image_recognition": {
Expand Down Expand Up @@ -1259,12 +1278,12 @@
"感谢{gift_name}",
"感谢{username}送的{gift_name}"
],
"serial_name": "",
"serial_send_data": [],
"local_audio": [
"data/闲时任务/音频/ikaros/主人,你刚才是不是说我们会永远在一起.wav",
"data/闲时任务/音频/ikaros/好想赶快见到主人.wav"
],
"serial_name": "",
"serial_send_data": []
]
},
{
"keywords": [
Expand All @@ -1282,9 +1301,9 @@
"感谢{gift_name}",
"感谢{username}送的{gift_name}"
],
"local_audio": [],
"serial_name": "",
"serial_send_data": []
"serial_send_data": [],
"local_audio": []
},
{
"keywords": [
Expand Down Expand Up @@ -1318,9 +1337,9 @@
"送我{gift_name},你真是个好人",
"感谢{username}送的{gift_num}个单价{unit_price}元,总价{total_price}元的{gift_name}喵"
],
"local_audio": [],
"serial_name": "",
"serial_send_data": []
"serial_send_data": [],
"local_audio": []
},
{
"keywords": [
Expand All @@ -1346,9 +1365,9 @@
],
"similarity": "1",
"copywriting": [],
"local_audio": [],
"serial_name": "",
"serial_send_data": []
"serial_send_data": [],
"local_audio": []
},
{
"keywords": [
Expand All @@ -1375,9 +1394,9 @@
],
"similarity": "1",
"copywriting": [],
"local_audio": [],
"serial_name": "",
"serial_send_data": []
"serial_send_data": [],
"local_audio": []
},
{
"keywords": [
Expand All @@ -1392,9 +1411,9 @@
],
"similarity": "1",
"copywriting": [],
"local_audio": [],
"serial_name": "",
"serial_send_data": []
"serial_send_data": [],
"local_audio": []
},
{
"keywords": [
Expand All @@ -1410,9 +1429,9 @@
],
"similarity": "1",
"copywriting": [],
"local_audio": [],
"serial_name": "",
"serial_send_data": []
"serial_send_data": [],
"local_audio": []
},
{
"keywords": [
Expand Down Expand Up @@ -1440,9 +1459,9 @@
],
"similarity": "1",
"copywriting": [],
"local_audio": [],
"serial_name": "",
"serial_send_data": []
"serial_send_data": [],
"local_audio": []
},
{
"keywords": [
Expand All @@ -1455,9 +1474,9 @@
],
"similarity": "1",
"copywriting": [],
"local_audio": [],
"serial_name": "",
"serial_send_data": []
"serial_send_data": [],
"local_audio": []
},
{
"keywords": [
Expand All @@ -1470,9 +1489,9 @@
],
"similarity": "1",
"copywriting": [],
"local_audio": [],
"serial_name": "",
"serial_send_data": []
"serial_send_data": [],
"local_audio": []
},
{
"keywords": [
Expand All @@ -1487,9 +1506,9 @@
],
"similarity": "1",
"copywriting": [],
"local_audio": [],
"serial_name": "",
"serial_send_data": []
"serial_send_data": [],
"local_audio": []
}
]
},
Expand Down
19 changes: 19 additions & 0 deletions config.json.bak
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,25 @@
"text_norm": "woitn",
"batch_size_s": 0,
"batch_size": 1
},
"wakeup_sleep": {
"enable": false,
"wakeup_word": [
"管家",
"苏醒吧"
],
"sleep_word": [
"休息吧",
"退下吧"
],
"wakeup_copywriting": [
"主人,我在呢",
"主人,有什么吩咐"
],
"sleep_copywriting": [
"好的,主人,我休息了",
"微臣告退"
]
}
},
"image_recognition": {
Expand Down
Loading

0 comments on commit 51b8839

Please sign in to comment.