uezo / aiavatarkit

🥰 Building AI-based conversational avatars lightning fast ⚡️💬
Apache License 2.0
162 stars 10 forks source link

Support interactive audio device selection #4

Closed uezo closed 1 year ago

uezo commented 1 year ago

Use like below👍

INPUT_DEVICE = -1   # Index of input audio device

if INPUT_DEVICE < 0:
    # Select with prompt
    input_device_info = AudioDevice.get_input_device_with_prompt()
else:
    # Use configured device
    input_device_info = AudioDevice.get_device_info(INPUT_DEVICE)

input_device = input_device_info["index"]

Also terminate PyAudio instances after using them internally.