Hardware push-to-talk debounced interrupt routing 16kHz audio to Groq Whisper and Linux CLI daemons.
Hardware Push-to-Talk Desktop Dictation
The Story: Typing terminal commands while testing physical hardware breaks focus. I built a physical tactile PTT switch on Pi 4B physical pin 3 connected to an INMP441 I2S mic. Hold to dictate text; double-tap-and-hold to translate voice prompts into executable bash commands directly in the Linux terminal.
| Parameter | Engineering Specification | Design Notes |
|---|---|---|
| Push-to-Talk Switch | SPST Tactile Microswitch + 10kΩ Hardware Pullup | Debounce filter: 35ms software refractory window |
| Acoustic Transducer | INMP441 Omnidirectional MEMS | SNR: 61 dBA, Sensitivity: -26 dBFS, 60Hz to 15kHz |
| Audio Bus Interface | I2S Direct Memory Access (DMA) | 24-bit PCM mono @ 48kHz downsampled to 16kHz |
| Inference Accelerator | Groq LPU (Language Processing Unit) | Whisper-large-v3-turbo in under 180 milliseconds |
| OS Text Injection | Linux X11/Wayland Event Driver via xdotool | Zero-delay keycode synthesis directly into active window |
| Total Turnaround | < 320ms Key-Release-to-Terminal | Hands stay on multimeter probes during testing |
| Signal Name | Wire Color | Source Pin | Target Pin | Protocol / Notes |
|---|---|---|---|---|
| PTT Button Pin | Yellow | Phys Pin 3 | Tactile Switch Leg 1 | GPIO Active-Low push with 10kΩ pull-up to 3.3V |
| PTT Button GND | Black | Phys Pin 6 | Tactile Switch Leg 2 | Ground return for button press contact |
| 3.3V Power Rail | Red | Phys Pin 1 | INMP441 VDD | Clean regulated 3.3V rail with 100nF filter ceramic |
| I2S Bit Clock (SCK) | Orange | GPIO 18 | INMP441 SCK | I2S 1.536MHz clock stream generated by ALSA |
| I2S Word Select (WS) | Green | GPIO 19 | INMP441 WS | I2S 48kHz frame synchronization pulse |
| I2S Serial Data (SD) | Cyan | GPIO 20 | INMP441 SD | I2S Digital microphone audio sample stream |
- Continuous I2S DMA Buffering: INMP441 MEMS microphone streaming raw 24-bit 48kHz audio directly through ALSA soundcard drivers.
- Dual-Gesture State Machine: Software debounce and timing logic cleanly separates plain dictation from automated shell execution.
- Instantaneous Groq Whisper: Cloud LPU transcription engine completing full audio turns in under 200 milliseconds.
INMP441 I2S
Groq Whisper Turbo
xdotool X11
Linux GPIO
Python Asyncio