Skip to content

Real-time USB-C lavalier mic tester for Linux β€” loopback audio from mic to headphones using arecord + sox + aplay, with logging, half baked device detection that probably works only for me and a bunch of hardcoded stuff for now. Built on Ubuntu 24.04 with PipeWire in mind...

License

Notifications You must be signed in to change notification settings

ndjuric/audioclast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

πŸŽ™οΈ Audioclast β€” Real-time USB-C Lavalier Mic Tester for Linux

mics

"What I ordered: iPhone-compatible lavalier microphones. What I received: USB-C. What I built: a sonic loopback test suite that could have been a simple bash script but hey why stay there"


🧩 Story

Somehow, I ended up winning a free gear promo on one of the Chinese B2C platforms β€” you know the ones, the digital souks of strange treasures, weird english and incorrect spec sheets.

I picked two USB "L'avalier" mic sets β€” one single mic, one dual β€” explicitly asking for Lightning (iPhone) versions. What arrived was... USB-C. Not a problem for an Android user β€” which I am not, not yet at least.

Thankfully, my old Fujitsu Esprimo PC has one single USB-C port on the front panel. Plugging the mic base, the one that should otherwise be plugged into a phone, in frontapanel usb-c, I noticed something nice: Ubuntu 24.04 + PipeWire recognized the device as a USB Audio input.

And so β€” "Audioclast" was born. Well, actually there was a shell script first but I wanted to have some more options which I'll probably add at some point.


πŸš€ What It Does

Audioclast creates a loopback audio pipeline from a USB-C mic input to your speakers or headphones, in real time.

  • βœ”οΈ Detects your USB lavalier mic (like Jieli, KTS, etc.) - half done, WIP
  • βœ”οΈ Routes sound via arecord β†’ sox (stereo remix) β†’ aplay
  • βœ”οΈ Log files with rotation and compression
  • βœ”οΈ Keyboard-controlled TUI via textual (coming soon)

πŸ› οΈ Installation

git clone git@github.com:ndjuric/audioclast.git
cd audioclast

python -m venv src/.venv
source src/.venv/bin/activate

pip install -r requirements.txt

cd src
python main.py on

You should now hear your own voice in your headphones. If you have a dual-mic receiver (e.g., stereo input), one mic might be left, the other right.

To stop the loopback:

python main.py off

πŸ§ͺ Tested On

  • βœ… Ubuntu 24.04
  • βœ… PipeWire + WirePlumber
  • βœ… arecord, sox, aplay
  • βœ… USB-C lavalier mics (Jieli-based)

πŸ—‚οΈ Project Structure

audioclast/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ audioclast.py         # main logic
β”‚   β”œβ”€β”€ main.py               # CLI entrypoint
β”‚   β”œβ”€β”€ ui/tui/tui.py         # upcoming TUI
β”‚   β”œβ”€β”€ vfs/fs.py             # virtual filesystem and log paths
β”‚   β”œβ”€β”€ logger_setup.py       # rotating log handler
β”‚   └── ...
β”œβ”€β”€ storage/
β”‚   β”œβ”€β”€ logs/                 # log output (.gz rotated)
β”‚   └── photos/mics.jpg       # visual proof of "what I got"

πŸ“¦ Features (in progress)

  • USB mic detection, but seriously, WIP, needs to be expanded
  • Loopback with stereo remixing
  • Logging with gzip rotation
  • πŸ”œ TUI interface with device selection
  • πŸ”œ Real-time waveform viewer
  • πŸ”œ Recording to .wav

πŸ’¬ Contributions

Built by @ndjuric,
who just wanted his mics to work.
Now they do. If someone actually wants to contribute I mean.. sure thing, just open an issue.


About

Real-time USB-C lavalier mic tester for Linux β€” loopback audio from mic to headphones using arecord + sox + aplay, with logging, half baked device detection that probably works only for me and a bunch of hardcoded stuff for now. Built on Ubuntu 24.04 with PipeWire in mind...

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages