Commit Graph

71 Commits

Author SHA1 Message Date
朱潮
0253a06d11 merge qwen-agent 2025-11-04 22:38:42 +08:00
朱潮
644bbbf1ad add voice 2025-09-27 15:16:42 +08:00
朱潮
37223d78b2 add led 2025-09-27 14:46:56 +08:00
朱潮
37c038bcf7 add led 2025-09-27 14:30:19 +08:00
朱潮
88e258611e add clean 2025-09-26 23:43:02 +08:00
朱潮
2d403e2965 add clean 2025-09-26 13:21:15 +08:00
朱潮
a7876fb472 add config 2025-09-26 13:11:14 +08:00
朱潮
0f15b5060b add config 2025-09-26 11:47:28 +08:00
朱潮
91a9043c4a 缓存 2025-09-25 11:25:16 +08:00
朱潮
9cf562e3be 缓存 2025-09-25 10:41:27 +08:00
朱潮
d1193381ac 增加自启动 2025-09-25 09:40:12 +08:00
朱潮
997691cc2b 修复无声音导致的 all_audio_received问题 2025-09-23 14:14:41 +08:00
朱潮
01d55be032 修复无声音导致的 all_audio_received问题 2025-09-23 14:11:22 +08:00
朱潮
26a42452c8 cache audio 2025-09-23 13:40:57 +08:00
朱潮
2dff81ecb7 增NFC呼功能 2025-09-22 02:06:17 +08:00
朱潮
f416ef0036 增NFC呼功能 2025-09-22 02:06:00 +08:00
朱潮
67549566ec ndf 2025-09-22 00:40:12 +08:00
朱潮
137ff6edfd 增加打招呼功能 2025-09-21 20:21:04 +08:00
朱潮
0ee0252c8a 修复tts未生成就判断结束的问题 2025-09-21 20:03:20 +08:00
朱潮
ce1f101ec7 修复结束问题 2025-09-21 18:33:36 +08:00
朱潮
ccbca440a7 修复结束问题 2025-09-21 17:37:46 +08:00
朱潮
a2d827c055 修复结束问题 2025-09-21 16:00:31 +08:00
朱潮
a451fd096d 修复结束问题 2025-09-21 14:23:04 +08:00
朱潮
85a67aa1fa Add debug logging to track audio data flow and TTS processing
Added comprehensive debug logging to identify why audio playback ends without starting:
- TTS text processing and buffer management
- Audio chunk generation and transfer between buffers
- TTS task queue management
- Streaming text processing

This will help identify if the issue is:
1. Empty text being sent to TTS
2. TTS generation failing
3. Audio data not being transferred between buffers
4. Premature completion detection

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 13:58:26 +08:00
朱潮
92c5e0b9e4 Fix audio playback issue by reducing preload buffer size from 3 to 1
The issue was that audio chunks were getting stuck in the preload_buffer
because the system required 3 chunks before starting playback. When TTS
generated fewer than 3 chunks, they would never be transferred to the
playback buffer, causing playback to end without ever starting.

This fix reduces the preload_size requirement from 3 to 1, allowing
even a single audio chunk to start playing.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 13:55:24 +08:00
朱潮
9871b445f0 回声待处理 2025-09-21 12:09:03 +08:00
朱潮
3f70062c2b 回声待处理 2025-09-21 11:40:54 +08:00
朱潮
e1d634af1f 回声待处理 2025-09-21 10:48:51 +08:00
朱潮
9523176d60 回声待处理 2025-09-21 03:00:11 +08:00
朱潮
aed69e9c54 回声待处理 2025-09-20 23:29:47 +08:00
朱潮
0ab8e49ba5 回声待处理 2025-09-20 22:25:25 +08:00
朱潮
d385333e0f 回声待处理 2025-09-20 20:19:02 +08:00
朱潮
5a7e39f5b5 回声待处理 2025-09-20 20:13:55 +08:00
朱潮
8003ca3799 config 2025-09-20 18:21:40 +08:00
朱潮
0eb937f88b config 2025-09-20 18:01:49 +08:00
朱潮
bddaf5f31d config 2025-09-20 17:34:51 +08:00
朱潮
ebeb4e34df config 2025-09-20 17:29:51 +08:00
朱潮
97aecf0c30 config 2025-09-20 17:18:41 +08:00
朱潮
dbdeeeefcb config 2025-09-20 15:44:46 +08:00
朱潮
43879961a2 config 2025-09-20 14:58:49 +08:00
朱潮
9108fd4582 config 2025-09-20 14:35:54 +08:00
朱潮
9f7858a30e config 2025-09-20 13:54:55 +08:00
朱潮
df9616b48a config 2025-09-20 12:53:58 +08:00
朱潮
072bb0e6b0 彻底解决回声问题:实现设备分离播放
- 播放时完全关闭音频输入流
- 使用系统播放器(aplay)避免设备冲突
- 添加安全的播放方式play_audio_safe
- 播放前后增加延迟确保设备状态切换
- 完全解决硬件串扰和声学回声问题
2025-09-20 12:20:30 +08:00
朱潮
e6341b8620 彻底解决播放时回声录制问题
- 播放开始时立即停止当前录音
- 清空预录音缓冲区和录音数据
- 播放期间完全跳过音频处理
- 播放结束后重置状态并恢复监听
- 添加清晰的状态提示信息
2025-09-20 12:15:04 +08:00
朱潮
48b99384b7 修复语音检测算法:解决背景噪音和能量计算问题
- 修复能量历史更新:只在非录音状态更新背景噪音
- 提高ZCR阈值:1000-4000范围更适合语音检测
- 优化动态阈值:背景噪音+50%提高敏感性
- 添加峰值能量计算和调试信息显示
- 解决语音影响背景噪音计算的问题
2025-09-20 12:08:40 +08:00
朱潮
c01e6ad1f6 添加播放状态检测避免回声录制
- 播放时暂停录音处理
- 显示播放状态提示
- 防止播放的音频被重新录制
- 避免产生回声问题
2025-09-20 12:00:01 +08:00
朱潮
918bfb24af 调整静音检测时间为3秒 2025-09-20 11:51:02 +08:00
朱潮
939a1721d6 添加预录音功能:解决录音开头丢失问题
- 实现2秒预录音环形缓冲区
- 检测到声音时自动包含前2秒音频
- 实时显示缓冲区使用状态
- 完美解决录音开头丢失问题
- 显示预录音时长信息
2025-09-20 11:44:34 +08:00
朱潮
12c79a5a53 升级声音检测算法:动态阈值+零交叉率
- 实现动态阈值调整(背景噪音+25%)
- 添加零交叉率检测区分语音和噪音
- 优化灵敏度,适应50-70的能量范围
- 实时显示ZCR和背景能量值
- 大幅提高语音检测准确性
2025-09-20 11:39:56 +08:00