micring
A unified, cross-platform (Windows + Linux/Raspberry Pi) command-line toolkit
for the ReSpeaker Mic Array v2.0 / USB 4-Mic Array. It consolidates the
recording, direction-of-arrival, VAD, DSP-tuning, LED-ring and spectrogram
scripts that used to live as separate files into a single micring command.
Hardware: ReSpeaker Mic Array v2.0 (XVF3000, 4 microphones, 12 RGB LEDs, on-board AEC / VAD / DOA / beamforming / NS).
Install
pip install -e . # core: record, devices, doa, vad, tuning
pip install -e ".[analysis]" # + spectrogram plotting (librosa, matplotlib, scipy)
pip install -e ".[led]" # + LED ring control (pixel-ring)
pip install -e ".[all]" # everything
After install you get a micring command (equivalently python -m micring).
Platform notes
- Audio capture works out of the box on Windows, macOS and Linux via PyAudio/PortAudio.
- DOA / VAD / tuning / LED use USB control transfers. On Linux/macOS they
just work; on Windows install the
libusb-win32driver for the SEEED Control interface using Zadig (select libusb-win32, not WinUSB/libusbK).
Commands
micring devices # list input devices; marks the auto-detected ReSpeaker
micring record -d 5 -o out.wav # record 5 s (auto-detects the device)
micring record -d 5 --split # one mono WAV per channel: out_ch0.wav ...
micring record -d 5 --keep 0 # keep only the processed ASR channel
micring record -d 5 --meter # live level meter while recording
micring doa --csv angles.csv # stream DOA angle, log to CSV
micring vad # stream the on-chip voice-activity flag
micring tuning --list # list all DSP parameters (no hardware needed)
micring tuning AGCONOFF 0 # turn Automatic Gain Control off
micring tuning DOAANGLE # read one parameter
micring led trace # LED patterns: trace/listen/think/spin/speak/wakeup/off
micring led --color 0xFF0000 # solid colour
micring led --track # DOA -> LED linkage: ring colour follows the sound source
micring plot out.wav --save fig.png # waveform + STFT + mel + MFCC
Run micring <command> --help for the full options of each subcommand.
Channels & firmware
The 6-channel firmware exposes: ch0 = processed audio (for ASR),
ch1-4 = the four raw microphones, ch5 = playback. Use --channels 1
with the 1-channel firmware. Firmware images and the DFU tool are in
UpdateFirmware/.
What's included beyond the original scripts
- Auto device detection — no more hand-editing
RESPEAKER_INDEX; the device is matched by name (override with--index). - Live level meter (
--meter) and DOA CSV logging (doa --csv). - Software DOA → LED linkage (
led --track) in addition to the firmware's nativetracemode. - Fixed deprecated APIs —
np.frombuffer/tobytes(replacing removednp.fromstring/tostring) andlibrosa.display.waveshow.
Package layout
micring/
cli.py # argparse entry point (micring …)
device.py # PortAudio + USB discovery, auto-detection
recorder.py # unified capture, split / combined WAV writing
tuning.py # on-chip DSP parameter table + read/write
doa.py # DOA streaming + CSV logging
meter.py # RMS / dBFS level metering
led.py # pixel-ring control + DOA linkage
plot.py # waveform / spectrogram / MFCC
The original standalone scripts (record_*.py, DOA.py, get_index.py,
wave_record/, LightControl/) are superseded by this package and can be
removed once you've confirmed the CLI works on your device.
PyCharm sudo on Linux
On Raspberry Pi, USB access may need root. See the wrapper-script tip for
running the interpreter under sudo in
docs/linux-sudo.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file micring-0.1.0.tar.gz.
File metadata
- Download URL: micring-0.1.0.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
525c3b2c235612531a8b74c8bdd9917d95899f634d3896de0c92fa69080aff5f
|
|
| MD5 |
5403b3e94f4387bf2a2d4729101d0d85
|
|
| BLAKE2b-256 |
1f06fa57ddf10c2a02cc0a955bf7590ab926dee057bc6ecc10319bff676b8fe8
|
File details
Details for the file micring-0.1.0-py3-none-any.whl.
File metadata
- Download URL: micring-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86557a47b04c01faa9e826be336277bd6648eb5cbe5e290962326a1c66a52992
|
|
| MD5 |
dc59a1548324f6bfc7371e0b785f992f
|
|
| BLAKE2b-256 |
f3cae5216f059e0f9d86319a74b3150f8c8e003bb4a59eb460c6534f43e734e6
|