mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 21:45:00 +03:00
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…
Reference in New Issue
Block a user