import sounddevice as sd
for info in sd.query_devices():
#windows DirectSound 模式(输出)
if info['max_output_channels']>0 and info['hostapi']==1:
print(info['index'],info['name'])
print('----------')
for info in sd.query_devices():
#windows DirectSound 模式(输入)
if info['max_input_channels']>0 and info['hostapi']==1:
print(info['index'],info['name'])
本站文章除注明转载/出处外,均为博主 spooking 原创或翻译,转载前请务必署名。