-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelper_functions.py
36 lines (31 loc) · 1.08 KB
/
helper_functions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import sounddevice as sd
# UI Helper Functions
def print_ascii_art(msg: str):
# Print ASCII art of 'EVI' and app purpose statement
print("=" * 60)
print(
rf"""
███████ ██ ██ ██
██ ██ ██ ██
█████ ██ ██ ██
██ ██ ██ ██
███████ ████ ██
{msg}
"""
)
print("=" * 60)
def list_capture_devices():
# Log available capture audio devices (devices with input channels) and their indices
print("-" * 60)
print("Available CAPTURE (input) devices:")
devices = sd.query_devices()
for idx, device in enumerate(devices):
if device['max_input_channels'] > 0:
print(f"{idx}: {device['name']}")
print("-" * 60)
def list_audio_devices():
# Log available input and output audio devices
print("-" * 60)
print("ALL available audio devices:")
print(sd.query_devices())
print("-" * 60)