query device exception handling
This commit is contained in:
parent
ca9bac0942
commit
4d55e19bd0
@ -15,7 +15,11 @@ class ServerAudioDevice:
|
||||
|
||||
|
||||
def list_audio_device():
|
||||
audioDeviceList = sd.query_devices()
|
||||
try:
|
||||
audioDeviceList = sd.query_devices()
|
||||
except Exception as e:
|
||||
print("[Voice Changer] ex:query_devices")
|
||||
print(e)
|
||||
|
||||
inputAudioDeviceList = [d for d in audioDeviceList if d["max_input_channels"] > 0]
|
||||
outputAudioDeviceList = [d for d in audioDeviceList if d["max_output_channels"] > 0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user