Thanks to visit codestin.com
Credit goes to Github.com

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 arecordsox (stereo remix) → aplay
  • ✔️ Log files with rotation and compression
  • ✔️ Keyboard-controlled TUI via textual (coming soon)

🛠️ Installation

git clone [email protected]: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

No packages published

Languages