mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
2fa9aead44
Implement class-level logging in places.
19 lines
388 B
Python
Executable file
19 lines
388 B
Python
Executable file
#!/usr/bin/python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import pyaudio
|
|
|
|
|
|
def list_audio_devices():
|
|
p = pyaudio.PyAudio()
|
|
print("--------------------------------------------------------------------")
|
|
devices = [
|
|
f"{x} - {p.get_device_info_by_index(x)['name']}"
|
|
for x in range(p.get_device_count())
|
|
]
|
|
|
|
for line in devices:
|
|
print(line)
|
|
|
|
|
|
list_audio_devices()
|