impress_voice_input/src/audio
impressionyang ff7318efd6 perf: 预打开音频流,消除按键到录音 3-4s 延迟
根因: 每次按键时 Pa_OpenStream() + Pa_StartStream() 耗时 3-4s,
stop() 时又 Pa_CloseStream() + Pa_Terminate() 销毁流。

优化:
- AudioCapture::start() 复用已打开的流(参数匹配时跳过 OpenStream)
- AudioCapture::stop() 只 Pa_StopStream(),保留流
- 新增 stopAndClose() 彻底关闭流(析构和服务停止时使用)
- VoiceInputService::start() 时预打开音频流再立即 stop()
  → 后续 hotkey start() 只需 Pa_StartStream() (<100ms)

效果: 按键到录音延迟从 3-4s 降至 <100ms

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-11 16:26:20 +08:00
..
audio_capture.cpp perf: 预打开音频流,消除按键到录音 3-4s 延迟 2026-06-11 16:26:20 +08:00
audio_capture.h perf: 预打开音频流,消除按键到录音 3-4s 延迟 2026-06-11 16:26:20 +08:00
audio_decoder.cpp fix: 修复 SenseVoice argmax 偏移 bug + 添加调试音频保存 2026-05-13 11:12:34 +08:00
audio_decoder.h feat: 扩展音频格式支持与推理管线优化 2026-05-12 16:35:48 +08:00
audio_ring_buffer.cpp feat: 初始化 Impress Voice Input 项目 2026-05-12 15:53:05 +08:00
audio_ring_buffer.h feat: 初始化 Impress Voice Input 项目 2026-05-12 15:53:05 +08:00
streaming_audio_writer.cpp fix: 修复 chunkCompleted 信号文件路径为空的 bug 2026-06-11 14:08:16 +08:00
streaming_audio_writer.h feat: 实现基于 VAD 的流式 WAV 录制识别方案 2026-05-13 15:33:03 +08:00