Why use an audio interface?
An audio interface gives a cleaner signal than a computer microphone. It can eliminate room noise. Musicians and podcasters use them with external instruments and microphones. Also an audio interface may offer a way to send audio to a Raspberry Pi.
tv_commercial_silencer monitors live audio, detects and automatically mutes commercials It compares live audio input to a database of “acoustic fingerprints” generated from previously recorded commercials.
recording and monitoring television audio
Configure macOS to use audio interface input
Go to System Preferences / Sound / Input. Select the interface.
Configuring Raspberry Pi Raspbian to use audio interface input
I’ve seen online reports of people doing this. I haven’t done it yet.
Digital Audio Workstation (DAW)
In Ableton Live Lite I set the input as 1/2 for stereo. Then I recorded audio, split and trimmed into individual clips, one per commercial.
I exported each clip as a mp3 file. mp3 maintains separate stereo channels. In tv_commercial_silencer I stored the files locally in directory data/commercial_mp3. The project .gitignore ignores the data directory and the recordings aren’t commited to the repository.
Appendix- audio interface configuration
These accept 1/4 inch (6.35 mm) diameter phone plugs. Can use TR (tip ring, 2 contacts) or TRS (tip ring sleeve, 3 contacts)
Ok for short cables < 20 foot long. If you connect TR plug, connection is unbalanced mono.
Good noise rejection over long cable runs. Uses 1/4 inch phono plug TRS (tip ring sleeve 3 contacts) One wire carries -1 * signal in another wire, third wire is ground. If you connect a TRS plug, the interface attempts to process it as a mono “balanced” audio connection.
how to connect line level stereo input
NOTE: 3 wire stereo output from television must be split out to 2 mono TR plugs, then each plugged in to channel 1 and 2. I put TIP (gray) on channel 1 and RING (red) on channel 2.
input gain knob
Turn up as long as ring light is green. If ring light turns red, amp is clipping. Reduce gain. I set both channel 1 and channel 2 to approximately 1 o’clock position.
For recording line input use LINE not INSTRUMENT.
Attenuates input to avoid clipping. Don’t use unless necessary. I didn’t use it.
Direct monitor knob
Mixes between live input with no delay and playback which may have post-processing latency.
Direct monitor switch
For headphones. Can configure DAW so 1-2 monitors live input, 3-4 monitors playback.
Audio interface, Focusrite Scarlett 2i4
Support download files including User Guide scarlett2i42ndgenugenv1.pdf
I bought from Guitar Center in Redmond WA and got excellent in-person advice and technical support from salesperson Alex.
Digital Audio Workstation DAW, Ableton Live Lite
bundled with Focusrite audio interface
Python Data Analysis to Automatically Detect and Mute Television Commercials
Recording multiple microphones in python
Discusses using PyAudio and Scarlett audio interface https://stackoverflow.com/questions/25620285/recording-multiple-microphones-in-python