mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
25 lines
470 B
Python
25 lines
470 B
Python
|
#!/usr/bin/python3
|
||
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
import pyaudio
|
||
|
|
||
|
|
||
|
def list_audio_devices():
|
||
|
p = pyaudio.PyAudio()
|
||
|
devices = []
|
||
|
print("--------------------------------------------------------------------")
|
||
|
for x in range(0, p.get_device_count()):
|
||
|
devices.append(f"{x} - {p.get_device_info_by_index(x)['name']}")
|
||
|
|
||
|
for line in devices:
|
||
|
print(line)
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
list_audio_devices()
|