@acpfx/mic-speaker
v0.4.6
Published
acpfx microphone with acoustic echo cancellation
Readme
@acpfx/mic-speaker
Native microphone capture with acoustic echo cancellation (AEC). Uses OS-level audio APIs via Rust for low-latency capture and speaker reference for echo cancellation.
Usage
This package is a pipeline node for @acpfx/cli. See the CLI package for installation and usage.
The postinstall script downloads a prebuilt binary for your platform. Supported: macOS (Apple Silicon), Linux (x86_64).
Manifest
- Consumes:
audio.chunk(speaker reference for AEC),control.interrupt - Emits:
audio.chunk,audio.level,lifecycle.ready,lifecycle.done,control.error
Settings
| Name | Type | Default | Description |
|------|------|---------|-------------|
| sampleRate | number | 16000 | Target sample rate in Hz |
| chunkMs | number | 100 | Chunk duration in milliseconds |
| speaker | string | player | Node name whose audio to use as speaker reference for AEC |
| debugDir | string | | Directory to write debug WAV recordings |
Pipeline Example
nodes:
mic:
use: "@acpfx/mic-speaker"
settings: { sampleRate: 16000, speaker: player }
outputs: [stt]
player:
use: "@acpfx/audio-player"
settings: { speechSource: tts }
outputs: [mic] # cycle: reference audio for AECBuilding from Source
cargo build --release -p mic-speakerCredits
Built on sys-voice, a Rust crate for native audio I/O with acoustic echo cancellation.
License
ISC
