User ff6a63147b fix(voice-gateway): S2S idle timeout + upstream send lock + iOS AudioContext suspended + port 3012→3013
- P0: S2S DialogAudioIdleTimeoutError now notifies client instead of force-closing, sets upstreamReady=false and cancels keepalive
- P0: Reduce audioKeepaliveIntervalMs from 20s to 8s to prevent S2S idle timeout
- P1: Add upstreamSendLock to prevent concurrent IllegalStateException: Send pending
- P1: iOS AudioContext suspended handling - buffer audio chunks and try resume after user interaction
- P1: disconnect() clears pendingAudioChunks and _resuming to prevent memory leak
- Fix: Frontend hardcoded port 3012→3013 in videoApi.js and vite.config.js
- Add complete Java backend source code to git tracking
2026-04-16 19:16:11 +08:00
2026-03-12 12:47:56 +08:00
2026-03-12 12:47:56 +08:00
2026-03-12 12:47:56 +08:00
2026-03-12 12:47:56 +08:00
2026-03-12 12:47:56 +08:00
2026-03-12 12:47:56 +08:00
2026-03-12 12:47:56 +08:00
2026-03-12 12:47:56 +08:00
2026-03-12 12:47:56 +08:00
2026-03-12 12:47:56 +08:00

AI 知识库文档智能分块工具

将多种格式文档解析为文本,通过 DeepSeek API 进行语义级智能分块,输出为 Markdown 文件。

支持格式

PDF、Word (.docx)、Excel (.xlsx/.xls)、CSV、HTML、TXT/MD、图片 (PNG/JPG/BMP/GIF/WEBP)

安装

cd ai-knowledge-splitter
pip install -r requirements.txt

使用

python main.py <输入文件> -k <DeepSeek API Key> [-o 输出路径] [-d 分隔符]

示例:

# 基本用法(输出为同名 .md 文件)
python main.py report.pdf -k sk-xxxxxxxx

# 指定输出路径
python main.py data.docx -k sk-xxxxxxxx -o output/result.md

# 自定义分隔符
python main.py notes.txt -k sk-xxxxxxxx -d "==="

参数说明

参数 必需 说明
input_file 输入文件路径
-k, --api-key DeepSeek API Key
-o, --output 输出文件路径(默认:同名 .md
-d, --delimiter 分块分隔符(默认:---

运行测试

cd ai-knowledge-splitter
pytest tests/ -v
Description
No description provided
Readme 41 MiB
Languages
Python 100%