Repository Analysis

xinnan-tech/xiaozhi-esp32-server

本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.

3.4 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of xinnan-tech/xiaozhi-esp32-server, a JavaScript project with 10,047 GitHub stars. SynthScan v2.0 examined 248,474 lines of code across 978 source files, recording 764 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 3.4 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

3.4
Adjusted Score
3.4
Raw Score
100%
Time Factor
2026-07-14
Last Push
10.0K
Stars
JavaScript
Language
248.5K
Lines of Code
978
Files
764
Pattern Hits
2026-07-14
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 2HIGH 9MEDIUM 21LOW 732

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 764 distinct pattern matches across 16 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Excessive Try-Catch Wrapping357 hits · 370 pts
SeverityFileLineSnippetContext
LOWdocs/index-stream-integration.md100 except Exception as ex:CODE
LOWmain/digital-human/start.py41 except Exception as e:CODE
LOWmain/digital-human/wakeword_runtime/core/detector.py81 except Exception as exc:CODE
LOWmain/digital-human/wakeword_runtime/core/detector.py146 except Exception as exc:CODE
LOWmain/digital-human/wakeword_runtime/core/detector.py152 except Exception:CODE
LOWmain/digital-human/wakeword_runtime/core/microphone.py90 except Exception:CODE
LOW…/digital-human/wakeword_runtime/runtime/http_server.py160 except Exception as exc:CODE
LOW…/digital-human/wakeword_runtime/runtime/http_server.py188 except Exception as exc:CODE
MEDIUM…/digital-human/wakeword_runtime/runtime/http_server.py75def handle(self) -> None:CODE
LOWmain/xiaozhi-server/core/auth.py71 except Exception:CODE
LOWmain/xiaozhi-server/core/websocket_server.py128 except Exception as e:CODE
LOWmain/xiaozhi-server/core/websocket_server.py141 except Exception as close_error:CODE
LOWmain/xiaozhi-server/core/websocket_server.py202 except Exception as e:CODE
LOWmain/xiaozhi-server/core/http_server.py87 except Exception as e:CODE
MEDIUMmain/xiaozhi-server/core/http_server.py35def start(self):CODE
MEDIUMmain/xiaozhi-server/core/connection.py283def generate_title_task():CODE
MEDIUMmain/xiaozhi-server/core/connection.py303def save_memory_task():CODE
MEDIUMmain/xiaozhi-server/core/connection.py603def _initialize_components(self):CODE
LOWmain/xiaozhi-server/core/connection.py261 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py268 except Exception as final_error:CODE
LOWmain/xiaozhi-server/core/connection.py273 except Exception as close_error:CODE
LOWmain/xiaozhi-server/core/connection.py313 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py318 except Exception:CODE
LOWmain/xiaozhi-server/core/connection.py323 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py329 except Exception as close_error:CODE
LOWmain/xiaozhi-server/core/connection.py784 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py794 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py1498 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py1502 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py1512 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py290 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py295 except Exception:CODE
LOWmain/xiaozhi-server/core/connection.py408 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py525 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py546 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py590 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py653 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py823 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py922 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py1124 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py1200 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py1238 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py1337 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py1537 except Exception:CODE
LOWmain/xiaozhi-server/core/connection.py1571 except Exception as cleanup_error:CODE
LOWmain/xiaozhi-server/core/connection.py1595 except Exception:CODE
LOWmain/xiaozhi-server/core/connection.py1613 except Exception:CODE
LOWmain/xiaozhi-server/core/connection.py1616 except Exception as ws_error:CODE
LOWmain/xiaozhi-server/core/connection.py1628 except Exception as executor_error:CODE
LOWmain/xiaozhi-server/core/connection.py1634 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py1696 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py1718 except Exception as close_error:CODE
LOWmain/xiaozhi-server/core/connection.py1725 except Exception as e:CODE
LOWmain/xiaozhi-server/core/connection.py1747 except Exception as e:CODE
LOWmain/xiaozhi-server/core/handle/intentHandler.py77 except Exception as e:CODE
LOWmain/xiaozhi-server/core/handle/intentHandler.py170 except Exception as e:CODE
LOWmain/xiaozhi-server/core/handle/reportHandle.py49 except Exception as e:CODE
LOWmain/xiaozhi-server/core/handle/reportHandle.py94 except Exception as e:CODE
LOWmain/xiaozhi-server/core/handle/reportHandle.py123 except Exception as e:CODE
LOWmain/xiaozhi-server/core/handle/reportHandle.py162 except Exception as e:CODE
297 more matches not shown…
Unused Imports123 hits · 123 pts
SeverityFileLineSnippetContext
LOWmain/digital-human/wakeword_runtime/core/__init__.py1CODE
LOWmain/digital-human/wakeword_runtime/core/__init__.py1CODE
LOWmain/digital-human/wakeword_runtime/core/__init__.py2CODE
LOWmain/digital-human/wakeword_runtime/core/__init__.py3CODE
LOWmain/digital-human/wakeword_runtime/config/__init__.py1CODE
LOWmain/digital-human/wakeword_runtime/config/__init__.py1CODE
LOWmain/digital-human/wakeword_runtime/config/__init__.py2CODE
LOWmain/digital-human/wakeword_runtime/plugins/__init__.py1CODE
LOWmain/digital-human/wakeword_runtime/plugins/__init__.py2CODE
LOWmain/digital-human/wakeword_runtime/plugins/__init__.py3CODE
LOWmain/digital-human/wakeword_runtime/plugins/__init__.py4CODE
LOWmain/digital-human/wakeword_runtime/bridge/__init__.py1CODE
LOWmain/digital-human/wakeword_runtime/runtime/__init__.py1CODE
LOWmain/digital-human/wakeword_runtime/runtime/__init__.py2CODE
LOWmain/xiaozhi-server/core/handle/helloHandle.py9CODE
LOWmain/xiaozhi-server/core/handle/intentHandler.py7CODE
LOWmain/xiaozhi-server/core/handle/sendAudioHandle.py8CODE
LOWmain/xiaozhi-server/core/handle/abortHandle.py5CODE
LOWmain/xiaozhi-server/core/handle/textHandle.py4CODE
LOWmain/xiaozhi-server/core/handle/reportHandle.py14CODE
LOWmain/xiaozhi-server/core/handle/reportHandle.py18CODE
LOWmain/xiaozhi-server/core/handle/receiveAudioHandle.py7CODE
LOWmain/xiaozhi-server/core/handle/textMessageProcessor.py5CODE
LOW…hi-server/core/handle/textHandler/mcpMessageHandler.py5CODE
LOW…server/core/handle/textHandler/listenMessageHandler.py7CODE
LOW…hi-server/core/handle/textHandler/iotMessageHandler.py5CODE
LOW…-server/core/handle/textHandler/helloMessageHandler.py4CODE
LOW…server/core/handle/textHandler/serverMessageHandler.py1CODE
LOW…server/core/handle/textHandler/serverMessageHandler.py7CODE
LOW…i-server/core/providers/tools/mcp_endpoint/__init__.py3CODE
LOW…i-server/core/providers/tools/mcp_endpoint/__init__.py4CODE
LOW…i-server/core/providers/tools/mcp_endpoint/__init__.py5CODE
LOW…i-server/core/providers/tools/mcp_endpoint/__init__.py5CODE
LOW…i-server/core/providers/tools/mcp_endpoint/__init__.py5CODE
LOW…i-server/core/providers/tools/mcp_endpoint/__init__.py5CODE
LOW…i-server/core/providers/tools/mcp_endpoint/__init__.py5CODE
LOW…-server/core/providers/tools/device_iot/iot_handler.py9CODE
LOW…zhi-server/core/providers/tools/device_iot/__init__.py3CODE
LOW…zhi-server/core/providers/tools/device_iot/__init__.py4CODE
LOW…zhi-server/core/providers/tools/device_iot/__init__.py4CODE
LOW…zhi-server/core/providers/tools/device_iot/__init__.py5CODE
LOW…-server/core/providers/tools/device_mcp/mcp_handler.py13CODE
LOW…zhi-server/core/providers/tools/device_mcp/__init__.py3CODE
LOW…zhi-server/core/providers/tools/device_mcp/__init__.py4CODE
LOW…zhi-server/core/providers/tools/device_mcp/__init__.py4CODE
LOW…zhi-server/core/providers/tools/device_mcp/__init__.py4CODE
LOW…zhi-server/core/providers/tools/device_mcp/__init__.py4CODE
LOW…zhi-server/core/providers/tools/device_mcp/__init__.py4CODE
LOW…zhi-server/core/providers/tools/device_mcp/__init__.py11CODE
LOW…server/core/providers/tools/device_mcp/mcp_executor.py6CODE
LOW…zhi-server/core/providers/tools/server_mcp/__init__.py3CODE
LOW…zhi-server/core/providers/tools/server_mcp/__init__.py4CODE
LOW…zhi-server/core/providers/tools/server_mcp/__init__.py5CODE
LOW…i-server/core/providers/tools/server_mcp/mcp_client.py3CODE
LOW…server/core/providers/tools/server_plugins/__init__.py3CODE
LOW…core/providers/tools/server_plugins/plugin_executor.py7CODE
LOW…n/xiaozhi-server/core/providers/tools/base/__init__.py3CODE
LOW…n/xiaozhi-server/core/providers/tools/base/__init__.py3CODE
LOW…n/xiaozhi-server/core/providers/tools/base/__init__.py4CODE
LOW…xiaozhi-server/core/providers/tools/base/tool_types.py7CODE
63 more matches not shown…
Deep Nesting126 hits · 117 pts
SeverityFileLineSnippetContext
LOWmain/digital-human/wakeword_runtime/core/detector.py129CODE
LOW…/digital-human/wakeword_runtime/bridge/event_bridge.py36CODE
LOW…/digital-human/wakeword_runtime/runtime/http_server.py64CODE
LOW…/digital-human/wakeword_runtime/runtime/http_server.py101CODE
LOWmain/xiaozhi-server/core/websocket_server.py81CODE
LOWmain/xiaozhi-server/core/connection.py278CODE
LOWmain/xiaozhi-server/core/connection.py345CODE
LOWmain/xiaozhi-server/core/connection.py1034CODE
LOWmain/xiaozhi-server/core/connection.py1376CODE
LOWmain/xiaozhi-server/core/connection.py1484CODE
LOWmain/xiaozhi-server/core/connection.py1522CODE
LOWmain/xiaozhi-server/core/connection.py1641CODE
LOWmain/xiaozhi-server/core/connection.py1699CODE
LOWmain/xiaozhi-server/core/connection.py1730CODE
LOWmain/xiaozhi-server/core/handle/intentHandler.py83CODE
LOWmain/xiaozhi-server/core/handle/intentHandler.py157CODE
LOWmain/xiaozhi-server/core/handle/sendAudioHandle.py315CODE
LOWmain/xiaozhi-server/core/handle/receiveAudioHandle.py43CODE
LOW…server/core/handle/textHandler/listenMessageHandler.py29CODE
LOW…hi-server/core/providers/tools/unified_tool_manager.py30CODE
LOW…e/providers/tools/mcp_endpoint/mcp_endpoint_handler.py58CODE
LOW…e/providers/tools/mcp_endpoint/mcp_endpoint_handler.py286CODE
LOW…-server/core/providers/tools/device_iot/iot_handler.py15CODE
LOW…-server/core/providers/tools/device_iot/iot_handler.py68CODE
LOW…server/core/providers/tools/device_iot/iot_executor.py17CODE
LOW…server/core/providers/tools/device_iot/iot_executor.py102CODE
LOW…server/core/providers/tools/device_iot/iot_executor.py111CODE
LOW…server/core/providers/tools/device_iot/iot_executor.py135CODE
LOW…rver/core/providers/tools/device_iot/iot_descriptor.py12CODE
LOW…-server/core/providers/tools/device_mcp/mcp_handler.py118CODE
LOW…-server/core/providers/tools/device_mcp/mcp_handler.py296CODE
LOW…i-server/core/providers/tools/server_mcp/mcp_client.py165CODE
LOW…-server/core/providers/tools/server_mcp/mcp_manager.py115CODE
LOW…core/providers/tools/server_plugins/plugin_executor.py19CODE
LOW…core/providers/tools/server_plugins/plugin_executor.py57CODE
LOW…n/xiaozhi-server/core/providers/llm/fastgpt/fastgpt.py21CODE
LOWmain/xiaozhi-server/core/providers/llm/gemini/gemini.py128CODE
LOW…zhi-server/core/providers/llm/xinference/xinference.py33CODE
LOW…zhi-server/core/providers/llm/xinference/xinference.py61CODE
LOWmain/xiaozhi-server/core/providers/llm/AliBL/AliBL.py23CODE
LOWmain/xiaozhi-server/core/providers/llm/ollama/ollama.py27CODE
LOWmain/xiaozhi-server/core/providers/llm/ollama/ollama.py94CODE
LOWmain/xiaozhi-server/core/providers/llm/dify/dify.py22CODE
LOWmain/xiaozhi-server/core/providers/llm/openai/openai.py91CODE
LOWmain/xiaozhi-server/core/providers/llm/openai/openai.py137CODE
LOW…re/providers/memory/mem_local_short/mem_local_short.py135CODE
LOW…ozhi-server/core/providers/memory/powermem/powermem.py40CODE
LOW…ozhi-server/core/providers/memory/powermem/powermem.py150CODE
LOW…ozhi-server/core/providers/memory/powermem/powermem.py218CODE
LOW…/xiaozhi-server/core/providers/memory/mem0ai/mem0ai.py33CODE
LOW…/xiaozhi-server/core/providers/memory/mem0ai/mem0ai.py72CODE
LOW…-server/core/providers/intent/intent_llm/intent_llm.py135CODE
LOW…xiaozhi-server/core/providers/asr/sherpa_onnx_local.py38CODE
LOWmain/xiaozhi-server/core/providers/asr/doubao_stream.py69CODE
LOWmain/xiaozhi-server/core/providers/asr/doubao_stream.py159CODE
LOW…n/xiaozhi-server/core/providers/asr/aliyunbl_stream.py157CODE
LOWmain/xiaozhi-server/core/providers/asr/aliyun_stream.py196CODE
LOWmain/xiaozhi-server/core/providers/asr/xunfei_stream.py122CODE
LOWmain/xiaozhi-server/core/providers/asr/xunfei_stream.py188CODE
LOWmain/xiaozhi-server/core/providers/asr/vosk.py46CODE
66 more matches not shown…
Hyper-Verbose Identifiers90 hits · 92 pts
SeverityFileLineSnippetContext
LOWdocs/context-provider-integration.md130class MockRequestHandler(http.server.SimpleHTTPRequestHandler):CODE
LOWmain/digital-human/js/core/network/wakeword-bridge.js13export function startWakewordBridgeListener() {CODE
LOWmain/digital-human/js/core/network/wakeword-bridge.js122export function stopWakewordBridgeListener() {CODE
LOWmain/digital-human/js/core/network/wakeword-bridge.js139export function sendWakewordBridgeMessage(type, payload = {}, requestId = null) {CODE
LOWmain/digital-human/js/core/network/wakeword-bridge.js191function parseWakewordBridgeMessage(rawData) {CODE
LOWmain/digital-human/js/core/network/wakeword-bridge.js219function rejectAllWakewordRequests(errorMessage) {CODE
LOWmain/digital-human/js/core/mcp/tools.js211function updatePropertyRangeVisibility() {CODE
LOWmain/digital-human/js/core/audio/recorder.js344export async function checkMicrophoneAvailability() {CODE
LOW…digital-human/wakeword_runtime/config/config_loader.py138def _load_wake_words_from_keywords_file(model_dir: Path) -> list[str]:CODE
LOW…/digital-human/wakeword_runtime/runtime/http_server.py151 def _build_wakeword_config_message(self, bridge: WakewordEventBridge) -> str:CODE
LOW…/digital-human/wakeword_runtime/runtime/http_server.py275 def _receive_websocket_message(self) -> str | None:CODE
LOWmain/digital-human/wakeword_runtime/runtime/app.py67 def handle_wake_word_detected(self, wake_word: str, full_text: str) -> None:CODE
LOWmain/manager-mobile/src/utils/index.ts18export function clearServerBaseUrlOverride() {CODE
LOWmain/manager-mobile/src/pages/settings/index.vue207function clearAllCacheAfterUrlChange() {CODE
LOWmain/manager-mobile/src/pages/agent/edit.vue173function buildCurrentEditableState() {CODE
LOWmain/manager-mobile/src/pages/agent/edit.vue190function buildOriginalEditableState() {CODE
LOWmain/manager-mobile/src/pages/agent/edit.vue302function openContextProviderDialog() {CODE
LOWmain/manager-mobile/src/pages/agent/edit.vue345function applyPersistedAgentDetail(detail: AgentDetail, targetAgentId: string) {CODE
LOWmain/manager-mobile/src/pages/agent/edit.vue370async function enhanceAgentDetailMetadata(detail: AgentDetail, targetAgentId: string, requestId: number) {CODE
LOWmain/manager-mobile/src/pages/agent/edit.vue396function isActiveAgentDetailRequest(targetAgentId: string, requestId: number) {CODE
LOWmain/manager-mobile/src/pages/agent/edit.vue400function invalidateTtsMetadataRequest() {CODE
LOWmain/manager-mobile/src/pages/agent/edit.vue1081async function reloadAgentAfterSnapshotRestore(targetAgentId = agentId.value) {CODE
LOW…bile/src/pages/agent/components/AgentSnapshotPanel.vue335function invalidateSnapshotRequest() {CODE
LOW…bile/src/pages/agent/components/AgentSnapshotPanel.vue628async function requestRestoreConfirmation(options: Parameters<typeof message.confirm>[0]) {CODE
LOW…bile/src/pages/agent/components/AgentSnapshotPanel.vue919async function ensureCorrectWordMetadata(...snapshots: AgentSnapshotData[]) {CODE
LOWmain/xiaozhi-server/performance_tester.py8def list_performance_tester_modules():CODE
LOWmain/xiaozhi-server/core/connection.py334 async def _discard_message_with_bind_prompt(self):CODE
LOWmain/xiaozhi-server/core/connection.py797 async def _initialize_private_config_async(self):CODE
LOWmain/xiaozhi-server/core/connection.py382 async def _process_mqtt_audio_message(self, message):CODE
LOWmain/xiaozhi-server/core/connection.py670 def _inject_tool_call_fewshot(self):CODE
LOWmain/xiaozhi-server/core/connection.py1751 def _extract_direct_answer_response(arguments_str):CODE
LOW…aozhi-server/core/handle/textMessageHandlerRegistry.py22 def _register_default_handlers(self) -> None:CODE
LOWmain/xiaozhi-server/core/handle/sendAudioHandle.py58async def _wait_for_audio_completion(conn: "ConnectionHandler"):CODE
LOWmain/xiaozhi-server/core/handle/sendAudioHandle.py147def _get_or_create_rate_controller(CODE
LOWmain/xiaozhi-server/core/handle/sendAudioHandle.py227async def _send_audio_with_rate_control(CODE
LOW…hi-server/core/providers/tools/unified_tool_handler.py109 def _initialize_home_assistant(self):CODE
LOW…hi-server/core/providers/tools/unified_tool_handler.py124 def current_support_functions(self) -> List[str]:CODE
LOW…hi-server/core/providers/tools/unified_tool_manager.py49 def get_function_descriptions(self) -> List[Dict[str, Any]]:CODE
LOW…e/providers/tools/mcp_endpoint/mcp_endpoint_handler.py58async def handle_mcp_endpoint_message(mcp_client: MCPEndpointClient, message: str):CODE
LOW…e/providers/tools/mcp_endpoint/mcp_endpoint_handler.py224async def send_mcp_endpoint_initialize(mcp_client: MCPEndpointClient):CODE
LOW…e/providers/tools/mcp_endpoint/mcp_endpoint_handler.py247async def send_mcp_endpoint_notification(mcp_client: MCPEndpointClient, method: str):CODE
LOW…e/providers/tools/mcp_endpoint/mcp_endpoint_handler.py259async def send_mcp_endpoint_tools_list(mcp_client: MCPEndpointClient):CODE
LOW…e/providers/tools/mcp_endpoint/mcp_endpoint_handler.py271async def send_mcp_endpoint_tools_list_continue(CODE
LOW…re/providers/tools/mcp_endpoint/mcp_endpoint_client.py74 async def register_call_result_future(self, id: int, future: Future):CODE
LOW…-server/core/providers/tools/device_mcp/mcp_handler.py79 async def register_call_result_future(self, id: int, future: Future):CODE
LOW…-server/core/providers/tools/device_mcp/mcp_handler.py238async def send_mcp_initialize_message(conn: "ConnectionHandler"):CODE
LOW…-server/core/providers/tools/device_mcp/mcp_handler.py273async def send_mcp_tools_list_request(conn: "ConnectionHandler"):CODE
LOW…-server/core/providers/tools/device_mcp/mcp_handler.py284async def send_mcp_tools_list_continue_request(conn: "ConnectionHandler", cursor: str):CODE
LOW…i-server/core/providers/tools/device_mcp/mcp_client.py72 async def register_call_result_future(self, id: int, future: Future):CODE
LOW…core/providers/tools/server_plugins/plugin_executor.py112 def _init_news_source_description(self, func_item, func_name):CODE
LOWmain/xiaozhi-server/core/providers/llm/system_prompt.py1def get_system_prompt_for_function(functions: str) -> str:CODE
LOWmain/xiaozhi-server/core/providers/asr/doubao_stream.py349 def generate_audio_default_header(self):CODE
LOWmain/xiaozhi-server/core/providers/asr/doubao_stream.py358 def generate_last_audio_default_header(self):CODE
LOWmain/xiaozhi-server/core/providers/tts/index_stream.py75 def _process_remaining_text_stream(self, is_last=False):CODE
LOWmain/xiaozhi-server/core/providers/tts/index_stream.py187 def audio_to_opus_data_stream(CODE
LOW…zhi-server/core/providers/tts/huoshan_double_stream.py488 async def _start_monitor_tts_response(self):CODE
LOW…zhi-server/core/providers/tts/huoshan_double_stream.py712 def audio_to_opus_data_stream(CODE
LOW…zhi-server/core/providers/tts/huoshan_double_stream.py726 def wav_to_opus_data_audio_raw_stream(self, raw_data_var, is_end=False, callback: Callable[[Any], Any]=None):CODE
LOWmain/xiaozhi-server/core/providers/tts/aliyun_stream.py417 async def _start_monitor_tts_response(self):CODE
LOWmain/xiaozhi-server/core/providers/tts/aliyun_stream.py484 def audio_to_opus_data_stream(CODE
30 more matches not shown…
Hallucination Indicators2 hits · 25 pts
SeverityFileLineSnippetContext
CRITICAL…/manager-web/public/generator/assets/index-Guo1hQ-y.js69 Check: https://github.com/renzhezhilu/gifsicle-wasm-browser`},testType(A){return A instanceof Element?"element":Object.CODE
CRITICAL…modules/model/service/impl/ModelConfigServiceImpl.java260 // com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator(UUID.replace("-",""))COMMENT
Over-Commented Block24 hits · 24 pts
SeverityFileLineSnippetContext
LOWmain/manager-mobile/vite.config.ts21import AutoImport from 'unplugin-auto-import/vite'COMMENT
LOWmain/xiaozhi-server/config.yaml1# 在开发中,请在项目根目录创建data目录,然后在data目录创建名称为【.config.yaml】的空文件COMMENT
LOWmain/xiaozhi-server/config.yaml21 # 视觉分析接口地址COMMENT
LOWmain/xiaozhi-server/config.yaml241 # TTS将根据配置名称对应的type调用实际的TTS适配器COMMENT
LOWmain/xiaozhi-server/config.yaml301 # 费用说明:PowerMem本身免费,实际费用取决于所选LLM和数据库COMMENT
LOWmain/xiaozhi-server/config.yaml341 # port: 2881COMMENT
LOWmain/xiaozhi-server/config.yaml461 # 平台地址:https://nls-portal.console.aliyun.com/COMMENT
LOWmain/xiaozhi-server/config.yaml501 # 语言参数,1537为普通话,具体参考:https://ai.baidu.com/ai-doc/SPEECH/0lbxfnc9bCOMMENT
LOWmain/xiaozhi-server/config.yaml521 # 2.创建api-key https://console.groq.com/keysCOMMENT
LOWmain/xiaozhi-server/config.yaml561 # 讯飞流式语音识别服务COMMENT
LOWmain/xiaozhi-server/config.yaml801 # 在页面底部获取appid和access_tokenCOMMENT
LOWmain/xiaozhi-server/config.yaml821 # 高级文本处理配置(additions)- 用户可自定义添加火山引擎支持的任何高级参数COMMENT
LOWmain/xiaozhi-server/config.yaml881 # language: "中文" # 指定输出语种,如:中文、英语、日语、韩语等,请根据所选音色支持的语言进行设置,不填则默认为中文COMMENT
LOWmain/xiaozhi-server/config.yaml981 # pitch: 0COMMENT
LOWmain/xiaozhi-server/config.yaml1001 # 阿里云智能语音交互服务,需要先在阿里云平台开通服务,然后获取验证信息COMMENT
LOWmain/xiaozhi-server/config.yaml1021 # 阿里云CosyVoice大模型流式文本语音合成COMMENT
LOWmain/xiaozhi-server/config.yaml1041 # speech_rate: 0 # 语速:-500到500COMMENT
LOWmain/xiaozhi-server/config.yaml1061 # 302AI语音合成服务,需要先在302平台创建账户充值,并获取密钥信息COMMENT
LOWmain/xiaozhi-server/config.yaml1161 api_key: 你的api_keyCOMMENT
LOWmain/xiaozhi-server/config_from_api.yaml1# 如果你只想轻量化安装xiaozhi-server,只使用本地的配置文件,不需要理会这个文件,不需要改动本文件任何东西COMMENT
LOWmain/xiaozhi-server/config_from_api.yaml21 # 你的manager-api的地址,最好使用局域网ipCOMMENT
LOWmain/manager-web/src/views/ModelConfig.vue741 // padding: 16px 0;COMMENT
LOWmain/manager-web/src/views/ModelConfig.vue761// border: none;COMMENT
LOWmain/manager-web/src/views/ModelConfig.vue781// .batch-actions .el-button--danger {COMMENT
Cross-File Repetition4 hits · 20 pts
SeverityFileLineSnippetContext
HIGH…zhi-server/core/providers/tts/huoshan_double_stream.py0重写父类方法:使用独立的临时编码器处理音频文件,避免与tts流式编码器并发冲突。 双流式tts中,monitor任务在event loop线程接收tts音频并使用self.opus_encoder编码, 同时tts_text_prioritSTRING
HIGHmain/xiaozhi-server/core/providers/tts/aliyun_stream.py0重写父类方法:使用独立的临时编码器处理音频文件,避免与tts流式编码器并发冲突。 双流式tts中,monitor任务在event loop线程接收tts音频并使用self.opus_encoder编码, 同时tts_text_prioritSTRING
HIGHmain/xiaozhi-server/core/providers/tts/xunfei_stream.py0重写父类方法:使用独立的临时编码器处理音频文件,避免与tts流式编码器并发冲突。 双流式tts中,monitor任务在event loop线程接收tts音频并使用self.opus_encoder编码, 同时tts_text_prioritSTRING
HIGHmain/xiaozhi-server/core/providers/tts/alibl_stream.py0重写父类方法:使用独立的临时编码器处理音频文件,避免与tts流式编码器并发冲突。 双流式tts中,monitor任务在event loop线程接收tts音频并使用self.opus_encoder编码, 同时tts_text_prioritSTRING
Modern Structural Boilerplate13 hits · 13 pts
SeverityFileLineSnippetContext
LOWmain/digital-human/wakeword_runtime/core/detector.py12logger = logging.getLogger(__name__)CODE
LOWmain/digital-human/wakeword_runtime/core/microphone.py8logger = logging.getLogger(__name__)CODE
LOW…in/digital-human/wakeword_runtime/plugins/wake_word.py7logger = logging.getLogger(__name__)CODE
LOWmain/digital-human/wakeword_runtime/plugins/audio.py7logger = logging.getLogger(__name__)CODE
LOW…/digital-human/wakeword_runtime/bridge/event_bridge.py8logger = logging.getLogger(__name__)CODE
LOW…/digital-human/wakeword_runtime/runtime/http_server.py42 def set_restart_handler(self, handler: Callable[[], None]) -> None:CODE
LOWmain/digital-human/wakeword_runtime/runtime/app.py7logger = logging.getLogger(__name__)CODE
LOW…i-server/core/providers/tools/mcp_endpoint/__init__.py13__all__ = [CODE
LOW…zhi-server/core/providers/tools/device_iot/__init__.py7__all__ = [CODE
LOW…zhi-server/core/providers/tools/device_mcp/__init__.py13__all__ = [CODE
LOW…zhi-server/core/providers/tools/server_mcp/__init__.py7__all__ = ["ServerMCPManager", "ServerMCPExecutor", "ServerMCPClient"]CODE
LOW…server/core/providers/tools/server_plugins/__init__.py5__all__ = ["ServerPluginExecutor"]CODE
LOW…n/xiaozhi-server/core/providers/tools/base/__init__.py6__all__ = ["ToolType", "ToolDefinition", "ToolExecutor"]CODE
Modern AI Meta-Vocabulary4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMdocs/readme/README_pt_BR.md333### RAG Geração Aumentada por RecuperaçãoCOMMENT
MEDIUMmain/xiaozhi-server/core/connection.py687 # === few-shot 示例(is_temporary)===COMMENT
MEDIUMmain/xiaozhi-server/core/utils/dialogue.py150 # 第二段:few-shot 示例(会话内不变)COMMENT
MEDIUMmain/xiaozhi-server/core/utils/dialogue.py157 # 第三段:实际对话历史(不含 few-shot)COMMENT
Synthetic Comment Markers2 hits · 10 pts
SeverityFileLineSnippetContext
HIGH…n/manager-mobile/src/pages/login/user-agreement-en.vue374 8.1 AI-Generated Content: The Service relies on third-party AI models to provide intelligent interaction capCODE
HIGHmain/manager-web/public/user-agreement-en.html233 interaction capabilities. The content generated by AI may be inaccurate, incomplete, or inappropriate. TheCODE
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGH…i-server/core/providers/tools/server_mcp/mcp_client.py116调用指定工具 Args: name: 工具名称 arguments: 工具参数 read_timeout_seconds: pSTRING
HIGHmain/xiaozhi-server/core/providers/asr/utils.py29 解析 FunASR 识别结果,按顺序提取标签和纯文本内容 Args: text: ASR 识别的原始文本,可能包含多种标签 Returns: dict: {"language":STRING
Fake / Example Data8 hits · 8 pts
SeverityFileLineSnippetContext
LOW…hi-server/performance_tester/performance_tester_asr.py97 and str(config[field]).lower() in ["你的", "placeholder", "none", "null", ""]CODE
LOW…hi-server/performance_tester/performance_tester_asr.py322 and str(config[field]).lower() in ["你的", "placeholder", "none", "null", ""]CODE
LOW…hi-server/performance_tester/performance_tester_tts.py39 and any(x in config[field] for x in ["你的", "placeholder"])CODE
LOW…hi-server/performance_tester/performance_tester_llm.py254 x in config["api_key"] for x in ["你的", "placeholder", "sk-xxx"]CODE
LOW…hi-server/performance_tester/performance_tester_llm.py471 x in config["api_key"] for x in ["你的", "placeholder", "sk-xxx"]CODE
LOW…i-server/performance_tester/performance_tester_vllm.py38 x in config["api_key"] for x in ["你的", "placeholder", "sk-xxx"]CODE
LOW…i-server/performance_tester/performance_tester_vllm.py161 x in config["api_key"] for x in ["你的", "placeholder", "sk-xxx"]CODE
LOW…/manager-web/public/generator/assets/index-Guo1hQ-y.js55Vui lòng tải lại hình ảnh biểu tượng cảm xúc tùy chỉnh.`,incompatibleEmojiData:"Phát hiện dữ liệu biểu tượng cảm xúc khôCODE
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOW…re/providers/tools/mcp_endpoint/mcp_endpoint_client.py30 # Check if the cache is validCOMMENT
LOW…-server/core/providers/tools/device_mcp/mcp_handler.py35 # Check if the cache is validCOMMENT
LOW…i-server/core/providers/tools/device_mcp/mcp_client.py28 # Check if the cache is validCOMMENT
LOWmain/xiaozhi-server/core/providers/tts/fishspeech.py25 ): # Check if audio is a string (Base64)CODE
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHmain/xiaozhi-server/core/providers/tts/fishspeech.py95 self.api_key = config.get("api_key", "YOUR_API_KEY")CODE
AI Structural Patterns3 hits · 2 pts
SeverityFileLineSnippetContext
LOWmain/xiaozhi-server/core/connection.py1803CODE
LOW…models/snakers4_silero-vad/src/silero_vad/utils_vad.py191CODE
LOW…models/snakers4_silero-vad/src/silero_vad/utils_vad.py91CODE
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
LOWmain/xiaozhi-server/core/providers/llm/base.py31 # For providers that don't support functions, just return regular responseCOMMENT