mirror of
https://github.com/HiMeditator/auto-caption.git
synced 2026-02-15 12:24:48 +08:00
feat(sysaudio): 支持 macOS 系统音频流采集
- 新增 darwin.py 文件实现 macOS 音频流采集功能 - 修改 main-gummy.py 以支持 macOS 平台 - 更新 AllConfig 和 CaptionEngine 以适配新平台
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""获取 Windows 系统音频输出流"""
|
||||
"""获取 Windows 系统音频输入/输出流"""
|
||||
|
||||
import pyaudiowpatch as pyaudio
|
||||
|
||||
@@ -101,7 +101,7 @@ class AudioStream:
|
||||
读取音频数据
|
||||
"""
|
||||
if not self.stream: return None
|
||||
return self.stream.read(self.CHUNK)
|
||||
return self.stream.read(self.CHUNK, exception_on_overflow=False)
|
||||
|
||||
def closeStream(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user