@acpfx/mic-speaker 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +15 -0
- package/README.md +51 -0
- package/package.json +1 -1
- package/bin/mic-aec-darwin-arm64 +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2026 acpfx contributors
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @acpfx/mic-speaker
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
This package is a pipeline node for [@acpfx/cli](../orchestrator/README.md). See the CLI package for installation and usage.
|
|
8
|
+
|
|
9
|
+
The postinstall script downloads a prebuilt binary for your platform. Supported: macOS (Apple Silicon), Linux (x86_64).
|
|
10
|
+
|
|
11
|
+
## Manifest
|
|
12
|
+
|
|
13
|
+
- **Consumes:** `audio.chunk` (speaker reference for AEC), `control.interrupt`
|
|
14
|
+
- **Emits:** `audio.chunk`, `audio.level`, `lifecycle.ready`, `lifecycle.done`, `control.error`
|
|
15
|
+
|
|
16
|
+
## Settings
|
|
17
|
+
|
|
18
|
+
| Name | Type | Default | Description |
|
|
19
|
+
|------|------|---------|-------------|
|
|
20
|
+
| `sampleRate` | number | `16000` | Target sample rate in Hz |
|
|
21
|
+
| `chunkMs` | number | `100` | Chunk duration in milliseconds |
|
|
22
|
+
| `speaker` | string | `player` | Node name whose audio to use as speaker reference for AEC |
|
|
23
|
+
| `debugDir` | string | | Directory to write debug WAV recordings |
|
|
24
|
+
|
|
25
|
+
## Pipeline Example
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
nodes:
|
|
29
|
+
mic:
|
|
30
|
+
use: "@acpfx/mic-speaker"
|
|
31
|
+
settings: { sampleRate: 16000, speaker: player }
|
|
32
|
+
outputs: [stt]
|
|
33
|
+
player:
|
|
34
|
+
use: "@acpfx/audio-player"
|
|
35
|
+
settings: { speechSource: tts }
|
|
36
|
+
outputs: [mic] # cycle: reference audio for AEC
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Building from Source
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
cargo build --release -p mic-speaker
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Credits
|
|
46
|
+
|
|
47
|
+
Built on [sys-voice](https://github.com/tigy32/sys-voice), a Rust crate for native audio I/O with acoustic echo cancellation.
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
ISC
|
package/package.json
CHANGED
package/bin/mic-aec-darwin-arm64
DELETED
|
Binary file
|