WaaromZoMoeilijk / rpi-audio

0 stars 0 forks source link

Audio #20

Open WaaromZoMoeilijk opened 2 years ago

WaaromZoMoeilijk commented 2 years ago

Intend to include multi-channel when present, especially since one audio I/O device might not be the one the user intends. I'd prefer to record them all, since space is ample.

Suppose an accidental HDMI connection creates an audio interface to go with it. Or maybe they'd want that. Multi-channel likely implies running more than one example script at the same time, unless there's a known command line application that ingests simultaneous input and turns it into a single multichannel stream.

Audio calibration: definitely take note of working mixer settings in a file. This could be remotely entered by an administrator or could be hard-coded or could be auto-generated. Consider having this setting come with a "weight" of how much to pull settings toward this value compared to a calibrated value. Higher weight means the hard-coded setting is more likely to be right compared to the calibration result, and a lower weight means entrust the calibration more

For calibration, consider taking a sample of generated audio upon original startup (1), during the first eight seconds of recording (2), and then during the first 32 seconds of recording (3) Noting that audio might actually be a little quieter than usual (the person might not yet be talking), the first calibration point can accept that and let its bias include that assumption The calibration points for (2) and (3) can happen while the recording itself is happening. There must be a tool that examines average, max, and weighted maximum volume level during a snippet. This would be very tricky to get exactly right since it might need to discard accidental spikes from the user moving a microphone. In the end a rough 80% might be reasonable but these are some enhancements At point (3) another run through of what's recorded can then consider further adjusting Anyhow feel free to look into what seems approachable and easy here See if there's any advantage of pipewire