Commit graph

985 commits

Author SHA1 Message Date
Sakura-RanChen
9c30b5e035 文件直接写入wav,无需经过二次编解码 2026-10-20 10:45:31 +08:00
TXyy2023
d531d04281
fix(tts): handle retained audio files in wakeup cache (#3451) 2026-10-20 10:00:20 +08:00
hrz
eb9dc8ca0f
把 pydub 探针绑到当前解释器同目录的完整版 ffmpeg (#3444)
edge_tts 升 7.3.1;edge.py 撤 WSS_URL patch 改默认
(4.36 跑默认 URL 稳定)。util.py 加 PATH 临时注入,
绕开 Mac 上 Trae CN 注入的精简版 ffmpeg/ffprobe,
让 pydub 拿 conda env 完整版。引用计数加锁防多线
程串。
2026-10-15 15:43:39 +08:00
wengzh
27399a2fb6
Merge pull request #3430 from xinnan-tech/py-text-test
Py text test
2026-10-14 14:11:53 +08:00
korexil
0be634c627
fix: SenseVoice 日语识别结果按词带空格 (#3412)
SenseVoice 识别日语时偶尔按词输出空格(如「今日 の こと を 少し 長め に」),
这些空格会原样进入对话历史并交给 LLM。lang_tag_filter 现在去掉两个
中日文字符之间的空格,韩文、英文的词间空格保持不变。
2026-10-14 10:32:56 +08:00
Sakura-RanChen
932962e8d3 补充注释说明,调整测试样例 2026-10-14 10:10:28 +08:00
Sakura-RanChen
a01f0aa29b 去除没必要的测试,上游为str不需要防御性增加 2026-10-13 16:54:42 +08:00
korexil
4445aa7510
fix: FunASR 识别结果以 JSON 原样进入对话历史 (#3411)
FunASR 返回 {"content","language","emotion"} 时,startToChat 只在含 speaker
字段时才解包,否则整段 JSON 字符串会作为用户消息交给 LLM 并写入对话历史。
现在没有 speaker 时只取 content。
2026-10-13 16:44:13 +08:00
Sakura-RanChen
a5e47f2c4e 补充字符,调整字符判断 2026-10-13 15:29:28 +08:00
hrz
741ec299c0
fix(tts): edge-tts 失声改走 msedgeservices (#3420)
* fix(tts): edge-tts 失声改走 msedgeservices

微软 2026-10 起对 legacy 消费者接口返回 403,
edge-tts 7.2.8 仍走 speech.platform.bing.com 走不通。
上游 PR rany2/edge-tts#491 切到 api.msedgeservices.com 修好,
但 7.2.8 仍是 PyPI 最新版本。

仓库在 edge.py 顶部临时把 WSS_URL 顶住,等 7.2.9 出了删掉。

* fix(tts): patch 还要写 communicate.WSS_URL

edge-tts 7.2.8 仍指 legacy bing 接口,10 月起微软 403。
上游 PR #491 已切到 msedgeservices.com,7.2.9 才进 PyPI,先顶住。
上次只改 constants.WSS_URL 不够,communicate 用 from import 是模块局部名,
LEGB 找不到新值。这次同时改 communicate.WSS_URL 才生效。
2026-10-13 09:58:30 +08:00
korexil
70ab19d23f
fix: TTS 分句在引号内切开句子 (#3413)
_get_segment_text 会在引号内的标点处切分(如「わぁ!」って、“好!”然后),
把引号拆到两段里,或留下只有「。」的片段。新增 _quote_safe_cut:切分点后的
右引号与句末标点一并带走;位于未闭合引号内或右引号后句子仍在继续时,顺延到
下一个标点。不含引号的文本切分结果不变。
2026-10-12 16:26:40 +08:00
wengzh
6afc54a17d
Merge pull request #3366 from xinnan-tech/feat-tts-alibl
Feat tts alibl
2026-09-11 17:35:08 +08:00
Sakura-RanChen
1846d3e935 调整相关逻辑 2026-09-09 16:17:13 +08:00
Sakura-RanChen
b1a7607dd5
Merge pull request #3345 from apexlsai/feature/alibl-workspace-streaming
feat(tts): 完善阿里百炼 Workspace 流式语音合成
2026-09-09 14:22:59 +08:00
Sakura-RanChen
d6d2da3d76 fix: 记忆模式为nomem时错误生成标题 2026-09-09 10:33:37 +08:00
Sakura-RanChen
79a95af399 fix: 修复固定延迟不生效,调整相关逻辑 2026-09-07 11:38:06 +08:00
hrz
8a3c2c51a0
Merge pull request #3351 from taiwan-dog/pm/disable-default-websocket-keepalive
fix: disable library WebSocket keepalive for device server
2026-09-05 00:37:23 +08:00
hrz
046fdc8aa4
Merge pull request #3350 from taiwan-dog/pm/hello-before-mcp-initialize
fix: send server hello before MCP initialize
2026-09-05 00:26:15 +08:00
yillkid
eda3c23d51 fix: disable library WebSocket keepalive for device server
websockets.serve() defaults to ping_interval=20 and ping_timeout=20.
ESP32 clients that do not answer those pings are dropped with
1011 keepalive ping timeout roughly 40 seconds into a healthy session.
The application-level ping is configured separately via
enable_websocket_ping.

Refs #3348
2026-09-04 19:00:24 +08:00
yillkid
a03a0a73db fix: send server hello before MCP initialize
The MCP initialize task was scheduled before the server hello was sent,
so the MCP frame could reach the device first. ESP32 firmware waits for
the server hello before it treats the channel as ready, so the device
never answered the initialize request.

Refs #3347
2026-09-04 19:00:24 +08:00
yillkid
323c2248b4 [pm] fix: normalize FunASR result type 2026-09-04 13:10:58 +08:00
Jacob
a31ba7ef6d fix(tts): synchronize Bailian streaming subtitles 2026-09-04 12:05:34 +08:00
Jacob
935184b1d0 feat(tts): support Bailian workspace endpoints 2026-09-04 12:05:09 +08:00
Tyke Chen
04b3ad5aae fix(tts): validate timeout range 2026-08-13 15:59:41 +08:00
Tyke Chen
2c43a13d6e fix(tts): unify configurable request timeouts 2026-08-13 15:02:17 +08:00
henson957
db7db3de67 fix(tts): reuse base tts_timeout config instead of hardcoded 15 2026-08-13 13:28:17 +08:00
henson957
d03d0d0982 fix(tts): add HTTP timeout and error handling to SiliconFlow provider
- requests.request() had no timeout: when the SiliconFlow API slows down,
  the request hangs forever and the device produces no audio intermittently
- non-200 responses (rate limit, error page) were written to disk as audio;
  now the status code is checked and an exception is raised with the body
2026-08-12 17:37:04 +08:00
3030332422
88eed86dc2 update:关闭deepseek的思考模式 2026-08-06 13:07:04 +08:00
3030332422
7a22b61969 fix:修复与函数同名时遗漏其他函数的问题 2026-07-28 17:05:18 +08:00
CGD
477f85b97c
Merge pull request #3304 from MsThink/main
fix(plugins): 展开模块级别插件名为具体函数名
2026-07-28 15:22:58 +08:00
Sakura-RanChen
5e0d853256
Merge pull request #3309 from xinnan-tech/py-fix-reportHandle
refactor(reportHandle): 重构上报处理逻辑,适配多格式音频转换
2026-07-27 15:24:15 +08:00
wengzh
2a9f809700 refactor(reportHandle): 重构上报处理逻辑,适配多格式音频转换
1.  重命名参数与变量,明确上报类型与音频格式
2.  拆分PCM和Opus转WAV逻辑,分别处理不同输入格式
3.  移动校验逻辑到上报队列函数开头,提前拦截无效上报
4.  完善Opus转WAV的解码与资源释放流程
2026-07-27 09:59:32 +08:00
colorful
523915f9fe fix(plugins): 展开模块级别插件名为具体函数名
在一个 function 文件中可能注册多个 @register_function,当配置下发或
本地配置使用模块名(文件名)时,需要自动展开为具体的函数名列表。

改动内容:
- register.py: 新增 module_func_map 全局映射,在 register_function
  装饰器中自动记录模块名 → 函数名列表的映射关系
- connection.py: 处理服务端下发的插件配置时,将模块级的 plugins 配置
  复制到各具体函数名 key 下,并将模块名展开写入 Intent functions 列表
- plugin_executor.py: 新增 _expand_plugin_names() 兜底展开逻辑和
  _get_plugin_description() 双层查找方法,确保本地配置场景也能正确展开
2026-07-24 10:47:00 +08:00
Sakura-RanChen
ed89c05245 fix: intent阻塞主线程 2026-07-20 14:48:26 +08:00
Sakura-RanChen
55c0495661 perf: 优化相关逻辑减少重复计算 2026-07-14 15:52:30 +08:00
hrz
bc1aa1a089
Merge pull request #3267 from xinnan-tech/fix-agent-idor
fix: prevent agent IDOR access
2026-07-10 17:36:00 +08:00
DaGou12138
2aa6c5ee49 fix:
1.优化context注入方式,合并为一个system,解决qwen本地部署模型多system异常400问题
2026-07-10 15:05:02 +08:00
wengzh
14e57a1add fix(powermem): 修复用户配置启用状态的类型判断问题
将配置的启用值统一转为小写字符串后判断是否为true,避免非布尔类型配置导致的判断失效
2026-07-10 10:06:07 +08:00
Tyke Chen
d11cfc6923 Merge remote-tracking branch 'origin/main' into fix-agent-idor
# Conflicts:
#	main/manager-api/src/main/java/xiaozhi/modules/agent/controller/AgentController.java
#	main/manager-api/src/main/java/xiaozhi/modules/agent/service/AgentService.java
#	main/manager-api/src/main/java/xiaozhi/modules/agent/service/impl/AgentServiceImpl.java
2026-07-09 20:21:37 +08:00
DaGou12138
32fbbf92fe Merge branch 'refs/heads/main' into fix-voiceprint-dialogue-bug 2026-07-09 16:56:22 +08:00
Sakura-RanChen
adee070bb0
Merge branch 'main' into py-audio-aec 2026-07-09 15:51:01 +08:00
wengzh
03ec3bac3f
Merge pull request #3271 from xinnan-tech/py-fix-bug
Py fix bug
2026-07-09 15:36:59 +08:00
hrz
ef2ed07c1c
Merge pull request #3266 from xinnan-tech/agent-snapshot-history
Add agent configuration history
2026-07-09 14:54:27 +08:00
Sakura-RanChen
a32500a6a4 fix: 消除死锁隐患 2026-07-09 10:29:41 +08:00
DaGou12138
3b6e8f0e4b fix:
1.优化声纹称呼人提示词和注入逻辑,减少次次都称呼的频率
2026-07-08 16:14:10 +08:00
Tyke Chen
c82b351457 Fix agent snapshot history issues 2026-07-08 15:15:26 +08:00
DaGou12138
04c10ef225 fix:
1.修改提示词与说话人注入,减少模型每次回答都带着说话人信息
2026-07-08 14:12:16 +08:00
Sakura-RanChen
0b8bb728e2 同步方法进行包装避免阻塞 2026-07-08 11:47:04 +08:00
Sakura-RanChen
fc573a72ea fix: 修复设备时间戳上报逻辑 2026-07-07 15:50:27 +08:00
Sakura-RanChen
59f6566cfb 同步工具异步化处理 2026-07-07 14:45:50 +08:00