朱潮
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
朱潮
b526328fe6
降低能量阈值到200以提高灵敏度
2025-09-20 11:38:19 +08:00
朱潮
2612ef5b46
修复Python缩进错误
2025-09-20 11:25:32 +08:00
朱潮
b87be1494d
基于能量检测的极简录音系统:彻底解决树莓派3B延迟问题
...
- 完全移除Vosk识别依赖,改用能量检测
- 基于RMS能量值判断声音开始/结束
- 自动调整能量阈值适应环境噪音
- 实时性能监控,极低CPU占用
- 预期延迟:<0.1秒(原10秒)
- 支持自动播放录制的音频
优化特点:
- 8kHz采样率,1024块大小
- 自动阈值调整算法
- 静音检测1.5秒结束录音
- 最小录音2秒,最大30秒
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 11:19:08 +08:00
朱潮
70c42eca15
激进性能优化:大幅降低树莓派3B延迟
...
- 音频参数:8kHz采样率,4096块大小(4倍)
- 激进模式:直接处理,跳过部分识别结果
- 缓冲优化:5个块缓冲区,0.2秒处理间隔
- 禁用词级识别:提升Vosk处理速度
- 实时延迟监控:显示音频处理延迟
- 预期效果:从10秒延迟降低到<1秒
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 11:07:54 +08:00
朱潮
eb099d827d
config
2025-09-20 10:53:56 +08:00
朱潮
ef39e31a4b
config
2025-09-20 01:06:14 +08:00
朱潮
fe102e924c
config
2025-09-20 00:39:42 +08:00
朱潮
e432417299
doubao
2025-09-19 19:44:17 +08:00
朱潮
53d53e4555
doubao
2025-09-18 23:34:55 +08:00
朱潮
e6aa7f7be8
config
2025-09-18 21:34:36 +08:00
朱潮
d4ff3fd774
config
2025-09-18 21:21:34 +08:00
朱潮
711df77d38
config
2025-09-18 20:20:36 +08:00
朱潮
313e555589
fix
2025-09-18 20:13:08 +08:00
朱潮
20fbd07675
fix
2025-09-18 20:08:55 +08:00
朱潮
52ad9f559b
bigmodel
2025-09-18 19:10:26 +08:00
m15-ai
e70dbf5f86
Add files via upload
2025-05-13 18:52:35 -05:00
m15-ai
ac7cdb6410
Create requirements.txt
2025-05-13 18:22:47 -05:00
m15-ai
136d0ee82a
Add files via upload
2025-05-13 18:17:47 -05:00
m15-ai
ec7f2786ba
Add files via upload
2025-05-13 18:15:47 -05:00
m15-ai
adef09c069
Add files via upload
2025-05-13 18:14:00 -05:00
m15-ai
b8ce4dac61
Initial commit
2025-05-13 18:09:46 -05:00