#1659 sounddevice.PortAudioError: Error opening InputStream: Invalid number of channels [PaErrorCode -9998]

2409:8a70* Posted at: 10 days ago 👁40

Traceback (most recent call last):
File "videotrans\component\realtime_stt.py", line 213, in run
File "sounddevice.py", line 1452, in init
File "sounddevice.py", line 909, in init
File "sounddevice.py", line 2823, in _check
sounddevice.PortAudioError: Error opening InputStream: Invalid number of channels [PaErrorCode -9998]


=
system:Windows-10-10.0.19045-SP0
version:v3.86
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v3.86

1 Replies

此错误是由于系统音频输入设备配置问题导致的。错误代码 Invalid number of channels [PaErrorCode -9998] 表示软件无法正确获取麦克风的声道配置。

请按以下步骤解决:

  1. 检查默认录音设备

    • 右键点击系统右下角的声音图标,选择"声音设置"
    • 在"输入"部分,确保已选择正确的麦克风设备
    • 点击所选设备,确保设备状态显示为"正在工作"
  2. 调整音频设置

    • 在声音设置中,找到"高级声音选项"
    • 确保"应用音量和设备首选项"中,pyVideoTrans 被设置为使用正确的输入设备
  3. 重启软件:完成上述设置后,完全关闭并重新启动 pyVideoTrans
  4. 测试麦克风

    • 可以使用系统自带的"录音机"应用测试麦克风是否正常工作

如果问题依旧,请尝试连接一个外置USB麦克风,或者在软件启动时确保没有其他程序占用麦克风设备。

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Donate: https://ko-fi.com/jianchang512

Trending Questions