mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-26 04:39:53 +01:00
parent
55981ec764
commit
174ab7fdb7
8 changed files with 78 additions and 79 deletions
|
|
@ -172,21 +172,12 @@ class PrivateConfig:
|
||||||
# 判断存在私有配置,并且self.device_id在私有配置中
|
# 判断存在私有配置,并且self.device_id在私有配置中
|
||||||
if not self.private_config:
|
if not self.private_config:
|
||||||
self.logger.bind(tag=TAG).error("Private config not found for device_id: {}", self.device_id)
|
self.logger.bind(tag=TAG).error("Private config not found for device_id: {}", self.device_id)
|
||||||
return None, None, None, None
|
return None, None
|
||||||
|
|
||||||
"""创建私有处理模块实例"""
|
"""创建私有处理模块实例"""
|
||||||
config = self.private_config
|
config = self.private_config
|
||||||
selected_modules = config['selected_module']
|
selected_modules = config['selected_module']
|
||||||
return (
|
return (
|
||||||
vad.create_instance(
|
|
||||||
selected_modules["VAD"],
|
|
||||||
config["VAD"][selected_modules["VAD"]]
|
|
||||||
),
|
|
||||||
asr.create_instance(
|
|
||||||
selected_modules["ASR"],
|
|
||||||
config["ASR"][selected_modules["ASR"]],
|
|
||||||
self.default_config.get("delete_audio", True) # Using default_config for global settings
|
|
||||||
),
|
|
||||||
llm.create_instance(
|
llm.create_instance(
|
||||||
selected_modules["LLM"]
|
selected_modules["LLM"]
|
||||||
if not 'type' in config["LLM"][selected_modules["LLM"]]
|
if not 'type' in config["LLM"][selected_modules["LLM"]]
|
||||||
|
|
|
||||||
|
|
@ -108,10 +108,8 @@ class ConnectionHandler:
|
||||||
if self.is_device_verified:
|
if self.is_device_verified:
|
||||||
await self.private_config.update_last_chat_time()
|
await self.private_config.update_last_chat_time()
|
||||||
|
|
||||||
vad, asr, llm, tts = self.private_config.create_private_instances()
|
llm, tts = self.private_config.create_private_instances()
|
||||||
if all([vad, asr, llm, tts]):
|
if all([llm, tts]):
|
||||||
self.vad = vad
|
|
||||||
self.asr = asr
|
|
||||||
self.llm = llm
|
self.llm = llm
|
||||||
self.tts = tts
|
self.tts = tts
|
||||||
self.logger.bind(tag=TAG).info(f"Loaded private config and instances for device {device_id}")
|
self.logger.bind(tag=TAG).info(f"Loaded private config and instances for device {device_id}")
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
47
manager/static/webui/assets/index-DF7ROAy9.js
Normal file
47
manager/static/webui/assets/index-DF7ROAy9.js
Normal file
File diff suppressed because one or more lines are too long
1
manager/static/webui/assets/index-D_oCZVZF.css
Normal file
1
manager/static/webui/assets/index-D_oCZVZF.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
manager/static/webui/favicon.ico
Normal file
BIN
manager/static/webui/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
|
|
@ -1,27 +1,28 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en" style="height: 100%;">
|
<html lang="en" style="height: 100%;">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8"/>
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" href="/favicon.ico"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<title>智控台</title>
|
<title>智控台</title>
|
||||||
<style>
|
<style>
|
||||||
html, body {
|
html, body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
#app {
|
|
||||||
height: 100%;
|
#app {
|
||||||
width: 100%;
|
height: 100%;
|
||||||
}
|
width: 100%;
|
||||||
</style>
|
}
|
||||||
<script type="module" crossorigin src="/assets/index-CvO82KVk.js"></script>
|
</style>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-_IjUUKjO.css">
|
<script type="module" crossorigin src="/assets/index-DF7ROAy9.js"></script>
|
||||||
</head>
|
<link rel="stylesheet" crossorigin href="/assets/index-D_oCZVZF.css">
|
||||||
<body>
|
</head>
|
||||||
<div id="app"></div>
|
<body>
|
||||||
</body>
|
<div id="app"></div>
|
||||||
</html>
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue