Some more documentation

This commit is contained in:
2022-06-22 17:34:14 +02:00
parent e66f20bb68
commit 4c233abbb9
2 changed files with 20 additions and 7 deletions

View File

@ -22,26 +22,27 @@ conf = json.loads(data)
RATE = conf["SampleRate"] # Sample rate
RECORD_SECONDS = conf["SecondsToRecord"] # Seconds to record (aka. last X seconds)
SourcesToRecord = conf["SourcesToRecord"] # Record all sources which contains these strings
SaveDirectory= conf["SaveDirectory"]
shortcut = conf["Shortcut"]
SaveDirectory= conf["SaveDirectory"] # The directory to save to
shortcut = conf["Shortcut"] # The shortcut to trigger the save
##### CONFIG END (aka. DO NOT FRICKING TOUCHY) #####
##### CONFIG END #####
CHUNKSIZE = 1024*2
print("Searching for audio sources")
Sources = []
AudioChannels = []
Frames = []
p = pyaudio.PyAudio()
p = pyaudio.PyAudio() # An instance of PyAudio
info = p.get_host_api_info_by_index(0)
numdevices = info.get('deviceCount')
numdevices = info.get('deviceCount') # The amount of audio devices
samplesI = 0
saves = 0
cleanUp = False
incomingAudioChan = -1
localAudioChan = -1
## Find the acutal device pointers
## Find the actual device pointers
for i in range(0, numdevices):
if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0:
i2 = 0