@lumiastream/wakeword 1.0.2 → 1.1.1
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/Readme.md +155 -2
- package/binaries/sox.exe +0 -0
- package/binaries/soxlinux +0 -0
- package/binaries/soxmac +0 -0
- package/lib/index.js +75 -0
- package/lib/list-devices.js +120 -0
- package/lib/test-devices.js +87 -0
- package/lib/voice.js +20 -4
- package/package.json +6 -3
package/Readme.md
CHANGED
|
@@ -1,3 +1,156 @@
|
|
|
1
|
-
|
|
1
|
+
# LumiaWakeWord
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A wake word detection library using Vosk and SoX for real-time voice recognition.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
- Real-time wake word detection
|
|
7
|
+
- Multi-platform support (Windows, macOS, Linux)
|
|
8
|
+
- Audio device selection (especially useful for Windows)
|
|
9
|
+
- Confidence threshold filtering
|
|
10
|
+
- Dynamic grammar updates
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @lumiastream/wakeword
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
```javascript
|
|
21
|
+
import { startWakeWord, listAudioDevices } from "@lumiastream/wakeword";
|
|
22
|
+
|
|
23
|
+
// List available audio devices
|
|
24
|
+
const devices = await listAudioDevices();
|
|
25
|
+
console.log("Available devices:", devices);
|
|
26
|
+
|
|
27
|
+
// Start wake word detection
|
|
28
|
+
const wakeWord = startWakeWord({
|
|
29
|
+
grammar: ["hello", "lumia", "computer"],
|
|
30
|
+
confidence: 0.7,
|
|
31
|
+
device: "0" // Optional: specify audio device
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// Handle detections
|
|
35
|
+
wakeWord.stdout.on("data", (data) => {
|
|
36
|
+
const lines = data.toString().split("\n");
|
|
37
|
+
for (const line of lines) {
|
|
38
|
+
if (line.startsWith("voice|")) {
|
|
39
|
+
const word = line.split("|")[1];
|
|
40
|
+
console.log(`Wake word detected: ${word}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Audio Device Selection
|
|
47
|
+
|
|
48
|
+
### Windows Users
|
|
49
|
+
Windows users often need to select the correct audio input device. Use these commands to find and test devices:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# List all available audio devices
|
|
53
|
+
npm run list-devices
|
|
54
|
+
|
|
55
|
+
# Interactive device testing
|
|
56
|
+
npm run test-devices
|
|
57
|
+
|
|
58
|
+
# Use a specific device
|
|
59
|
+
AUDIO_DEVICE=1 npm start
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Setting the Audio Device
|
|
63
|
+
|
|
64
|
+
**Method 1: Environment Variable**
|
|
65
|
+
```bash
|
|
66
|
+
set AUDIO_DEVICE=1
|
|
67
|
+
npm start
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Method 2: Programmatically**
|
|
71
|
+
```javascript
|
|
72
|
+
startWakeWord({
|
|
73
|
+
device: "1",
|
|
74
|
+
grammar: ["hello", "lumia"]
|
|
75
|
+
});
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
See [AUDIO_DEVICES.md](AUDIO_DEVICES.md) for detailed device configuration guide.
|
|
79
|
+
|
|
80
|
+
## API Reference
|
|
81
|
+
|
|
82
|
+
### `listAudioDevices()`
|
|
83
|
+
Returns a Promise that resolves to an array of available audio devices.
|
|
84
|
+
|
|
85
|
+
```javascript
|
|
86
|
+
const devices = await listAudioDevices();
|
|
87
|
+
// Returns: [{ id: "0", name: "Microphone (Realtek)" }, ...]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### `startWakeWord(options)`
|
|
91
|
+
Starts the wake word detection process.
|
|
92
|
+
|
|
93
|
+
**Options:**
|
|
94
|
+
- `device` (string): Audio device ID to use
|
|
95
|
+
- `soxPath` (string): Path to SoX binary (optional)
|
|
96
|
+
- `sampleRate` (number): Sample rate, default 16000
|
|
97
|
+
- `grammar` (string[]): Array of wake words to detect
|
|
98
|
+
- `confidence` (number): Confidence threshold (0-1), default 0.7
|
|
99
|
+
|
|
100
|
+
**Returns:** ChildProcess instance
|
|
101
|
+
|
|
102
|
+
## Scripts
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npm run list-devices # List available audio devices
|
|
106
|
+
npm run test-devices # Interactive device testing
|
|
107
|
+
npm start # Start wake word detection
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Example
|
|
111
|
+
|
|
112
|
+
Run the included example:
|
|
113
|
+
```bash
|
|
114
|
+
node example.js
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Dependencies
|
|
118
|
+
|
|
119
|
+
- [Vosk](https://alphacephei.com/vosk/) - Speech recognition toolkit
|
|
120
|
+
- [SoX](http://sox.sourceforge.net/) - Sound processing tool
|
|
121
|
+
- Vosk model included: vosk-model-small-en-us-0.15
|
|
122
|
+
|
|
123
|
+
## Platform Notes
|
|
124
|
+
|
|
125
|
+
### Windows
|
|
126
|
+
- Default uses device "0" if not specified
|
|
127
|
+
- Use `npm run test-devices` to find the correct device
|
|
128
|
+
- USB microphones may appear as separate devices
|
|
129
|
+
|
|
130
|
+
### macOS/Linux
|
|
131
|
+
- Uses system default audio input automatically
|
|
132
|
+
- Device selection usually not needed
|
|
133
|
+
|
|
134
|
+
## Troubleshooting
|
|
135
|
+
|
|
136
|
+
1. **No audio detected on Windows:**
|
|
137
|
+
- Run `npm run test-devices` to find the correct device
|
|
138
|
+
- Set `AUDIO_DEVICE` environment variable
|
|
139
|
+
|
|
140
|
+
2. **Poor recognition quality:**
|
|
141
|
+
- Adjust confidence threshold (lower = more sensitive)
|
|
142
|
+
- Try different audio devices
|
|
143
|
+
- Ensure microphone is not muted
|
|
144
|
+
|
|
145
|
+
3. **Device not found:**
|
|
146
|
+
- Ensure microphone is connected before starting
|
|
147
|
+
- Check system audio settings
|
|
148
|
+
|
|
149
|
+
## SoX Binaries
|
|
150
|
+
|
|
151
|
+
Pre-compiled SoX binaries are included for all platforms.
|
|
152
|
+
Source: https://github.com/zackees/static-sox/tree/main/bin
|
|
153
|
+
|
|
154
|
+
## License
|
|
155
|
+
|
|
156
|
+
See LICENSE file for details.
|
package/binaries/sox.exe
CHANGED
|
File without changes
|
package/binaries/soxlinux
CHANGED
|
File without changes
|
package/binaries/soxmac
CHANGED
|
File without changes
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { listAudioDevices } from "./list-devices.js";
|
|
2
|
+
import { spawn } from "child_process";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* List available audio input devices
|
|
10
|
+
* @returns {Promise<Array<{id: string, name: string}>>} Array of available devices
|
|
11
|
+
*/
|
|
12
|
+
export { listAudioDevices };
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Start the wake word detection with optional device selection
|
|
16
|
+
* @param {Object} options - Configuration options
|
|
17
|
+
* @param {string} [options.device] - Audio device ID to use
|
|
18
|
+
* @param {string} [options.soxPath] - Path to SoX binary
|
|
19
|
+
* @param {number} [options.sampleRate] - Sample rate (default: 16000)
|
|
20
|
+
* @param {Array<string>} [options.grammar] - Wake words to detect
|
|
21
|
+
* @param {number} [options.confidence] - Confidence threshold (0-1)
|
|
22
|
+
* @returns {ChildProcess} The spawned voice detection process
|
|
23
|
+
*/
|
|
24
|
+
export function startWakeWord(options = {}) {
|
|
25
|
+
const {
|
|
26
|
+
device = null,
|
|
27
|
+
soxPath = null,
|
|
28
|
+
sampleRate = 16000,
|
|
29
|
+
grammar = [],
|
|
30
|
+
confidence = 0.7,
|
|
31
|
+
} = options;
|
|
32
|
+
|
|
33
|
+
const voiceScript = join(here, "voice.js");
|
|
34
|
+
const args = [voiceScript];
|
|
35
|
+
|
|
36
|
+
if (soxPath) {
|
|
37
|
+
args.push(soxPath);
|
|
38
|
+
} else {
|
|
39
|
+
args.push(""); // placeholder for default sox path
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (device) {
|
|
43
|
+
args.push(device);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const env = { ...process.env };
|
|
47
|
+
if (sampleRate) {
|
|
48
|
+
env.SAMPLE_RATE = sampleRate.toString();
|
|
49
|
+
}
|
|
50
|
+
if (device && !args[2]) {
|
|
51
|
+
env.AUDIO_DEVICE = device;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const proc = spawn("node", args, {
|
|
55
|
+
env,
|
|
56
|
+
stdio: ["pipe", "pipe", "inherit"],
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// Send initial grammar if provided
|
|
60
|
+
if (grammar.length > 0) {
|
|
61
|
+
proc.stdin.write(`update,${grammar.join(",")}\n`);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Send confidence threshold if provided
|
|
65
|
+
if (confidence !== 0.7) {
|
|
66
|
+
proc.stdin.write(`confidence,${confidence}\n`);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return proc;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export default {
|
|
73
|
+
listAudioDevices,
|
|
74
|
+
startWakeWord,
|
|
75
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { spawn } from "child_process";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { existsSync } from "node:fs";
|
|
5
|
+
|
|
6
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
|
|
8
|
+
function unpacked(p) {
|
|
9
|
+
return p.includes("app.asar")
|
|
10
|
+
? p.replace("app.asar", "app.asar.unpacked")
|
|
11
|
+
: p;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const exeName = { win32: "sox.exe", darwin: "soxmac", linux: "soxlinux" }[
|
|
15
|
+
process.platform
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
let soxPath = process.argv[2] || join(here, "..", "binaries", exeName);
|
|
19
|
+
soxPath = unpacked(soxPath);
|
|
20
|
+
|
|
21
|
+
if (!existsSync(soxPath)) {
|
|
22
|
+
console.error(`SoX not found: ${soxPath}`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function listAudioDevices() {
|
|
27
|
+
return new Promise((resolve, reject) => {
|
|
28
|
+
if (process.platform !== "win32") {
|
|
29
|
+
// On macOS and Linux, SoX uses default device
|
|
30
|
+
resolve([{ id: "default", name: "Default Audio Input" }]);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Windows: Use PowerShell to get audio devices
|
|
35
|
+
const psCommand = `Get-WmiObject Win32_SoundDevice | Select-Object -Property Name, DeviceID | ConvertTo-Json`;
|
|
36
|
+
const proc = spawn("powershell", ["-Command", psCommand], {
|
|
37
|
+
encoding: "utf8",
|
|
38
|
+
windowsHide: true,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
let output = "";
|
|
42
|
+
let errorOutput = "";
|
|
43
|
+
|
|
44
|
+
proc.stdout?.on("data", (data) => {
|
|
45
|
+
output += data.toString();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
proc.stderr?.on("data", (data) => {
|
|
49
|
+
errorOutput += data.toString();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
proc.on("close", (code) => {
|
|
53
|
+
const devices = [];
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
// Try to parse PowerShell JSON output
|
|
57
|
+
if (output.trim()) {
|
|
58
|
+
const psDevices = JSON.parse(output);
|
|
59
|
+
const deviceArray = Array.isArray(psDevices) ? psDevices : [psDevices];
|
|
60
|
+
|
|
61
|
+
deviceArray.forEach((device, index) => {
|
|
62
|
+
if (device && device.Name) {
|
|
63
|
+
devices.push({
|
|
64
|
+
id: index.toString(),
|
|
65
|
+
name: device.Name,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
} catch (e) {
|
|
71
|
+
// PowerShell failed, try alternative method
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// If PowerShell didn't work, try using Get-AudioDevice module if available
|
|
75
|
+
if (devices.length === 0) {
|
|
76
|
+
// Provide numbered device options for manual selection
|
|
77
|
+
// SoX on Windows typically uses device numbers 0-9
|
|
78
|
+
for (let i = 0; i <= 5; i++) {
|
|
79
|
+
devices.push({
|
|
80
|
+
id: i.toString(),
|
|
81
|
+
name: `Audio Input Device ${i}${i === 0 ? ' (Default)' : ''}`,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
console.log("\nNote: Unable to query actual device names.");
|
|
86
|
+
console.log("Showing generic device numbers (0-5).");
|
|
87
|
+
console.log("You may need to test each to find your microphone.\n");
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
resolve(devices);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
proc.on("error", (err) => {
|
|
94
|
+
// If PowerShell is not available, provide default options
|
|
95
|
+
const devices = [];
|
|
96
|
+
for (let i = 0; i <= 5; i++) {
|
|
97
|
+
devices.push({
|
|
98
|
+
id: i.toString(),
|
|
99
|
+
name: `Audio Input Device ${i}${i === 0 ? ' (Default)' : ''}`,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
resolve(devices);
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// If run directly, list devices
|
|
108
|
+
if (process.argv[1] && import.meta.url.endsWith(process.argv[1].replace(/\\/g, '/'))) {
|
|
109
|
+
listAudioDevices()
|
|
110
|
+
.then((devices) => {
|
|
111
|
+
console.log("Available audio input devices:");
|
|
112
|
+
devices.forEach((device) => {
|
|
113
|
+
console.log(` ${device.id}: ${device.name}`);
|
|
114
|
+
});
|
|
115
|
+
})
|
|
116
|
+
.catch((err) => {
|
|
117
|
+
console.error("Error listing devices:", err);
|
|
118
|
+
process.exit(1);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { listAudioDevices } from "./list-devices.js";
|
|
4
|
+
import { spawn } from "child_process";
|
|
5
|
+
import readline from "node:readline";
|
|
6
|
+
import { dirname, join } from "node:path";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
|
|
9
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
|
|
11
|
+
async function testDevice(deviceId) {
|
|
12
|
+
console.log(`\nTesting device ${deviceId}...`);
|
|
13
|
+
console.log("Speak into your microphone. Press Ctrl+C to stop.\n");
|
|
14
|
+
|
|
15
|
+
const voiceScript = join(here, "voice.js");
|
|
16
|
+
// Pass empty string for soxPath (will use default), then deviceId
|
|
17
|
+
const args = deviceId ? [voiceScript, "", deviceId] : [voiceScript];
|
|
18
|
+
const proc = spawn("node", args, {
|
|
19
|
+
stdio: ["pipe", "inherit", "inherit"],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Send test grammar
|
|
23
|
+
proc.stdin.write("update,hello,test,lumia\n");
|
|
24
|
+
|
|
25
|
+
return new Promise((resolve) => {
|
|
26
|
+
proc.on("close", () => {
|
|
27
|
+
resolve();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Allow user to stop with Ctrl+C
|
|
31
|
+
process.on("SIGINT", () => {
|
|
32
|
+
proc.kill();
|
|
33
|
+
resolve();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async function main() {
|
|
39
|
+
console.log("LumiaWakeWord Audio Device Tester");
|
|
40
|
+
console.log("==================================\n");
|
|
41
|
+
|
|
42
|
+
try {
|
|
43
|
+
const devices = await listAudioDevices();
|
|
44
|
+
|
|
45
|
+
if (process.platform !== "win32") {
|
|
46
|
+
console.log("Note: On macOS/Linux, the default audio input is used automatically.");
|
|
47
|
+
console.log("Device selection is primarily for Windows users.\n");
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
console.log("Available audio input devices:");
|
|
51
|
+
devices.forEach((device) => {
|
|
52
|
+
console.log(` ${device.id}: ${device.name}`);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
if (process.platform === "win32") {
|
|
56
|
+
const rl = readline.createInterface({
|
|
57
|
+
input: process.stdin,
|
|
58
|
+
output: process.stdout,
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const deviceId = await new Promise((resolve) => {
|
|
62
|
+
rl.question(
|
|
63
|
+
"\nEnter device ID to test (or press Enter for default): ",
|
|
64
|
+
(answer) => {
|
|
65
|
+
rl.close();
|
|
66
|
+
resolve(answer.trim() || "0");
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
await testDevice(deviceId);
|
|
72
|
+
|
|
73
|
+
console.log("\n\nTo use this device permanently, you can:");
|
|
74
|
+
console.log(`1. Set environment variable: AUDIO_DEVICE=${deviceId}`);
|
|
75
|
+
console.log(`2. Pass as 3rd argument when running voice.js`);
|
|
76
|
+
console.log(`3. Update your application to pass the device ID\n`);
|
|
77
|
+
} else {
|
|
78
|
+
console.log("\nTesting default audio input...");
|
|
79
|
+
await testDevice(null);
|
|
80
|
+
}
|
|
81
|
+
} catch (err) {
|
|
82
|
+
console.error("Error:", err);
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
main();
|
package/lib/voice.js
CHANGED
|
@@ -17,16 +17,23 @@ function unpacked(p) {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/* ------------------------------------------------------------------ */
|
|
20
|
-
/* 1. Resolve SoX binary
|
|
20
|
+
/* 1. Resolve SoX binary and audio device */
|
|
21
21
|
/* ------------------------------------------------------------------ */
|
|
22
22
|
const exeName = { win32: "sox.exe", darwin: "soxmac", linux: "soxlinux" }[
|
|
23
23
|
process.platform
|
|
24
24
|
];
|
|
25
25
|
|
|
26
|
-
/* Priority: argv[2]
|
|
27
|
-
|
|
26
|
+
/* Priority for sox path: argv[2] → fallback to sibling binaries/<exe> */
|
|
27
|
+
/* Priority for device: argv[3] → env var → default */
|
|
28
|
+
let soxPath = process.argv[2];
|
|
29
|
+
if (!soxPath || soxPath === "") {
|
|
30
|
+
soxPath = join(here, "..", "binaries", exeName);
|
|
31
|
+
}
|
|
28
32
|
soxPath = unpacked(soxPath);
|
|
29
33
|
|
|
34
|
+
// Parse device from argv[3] or environment variable
|
|
35
|
+
let audioDevice = process.argv[3] || process.env.AUDIO_DEVICE || null;
|
|
36
|
+
|
|
30
37
|
if (!existsSync(soxPath)) throw new Error(`SoX not found: ${soxPath}`);
|
|
31
38
|
try {
|
|
32
39
|
chmodSync(soxPath, 0o755);
|
|
@@ -59,8 +66,17 @@ rec.setWords(true);
|
|
|
59
66
|
/* 4. Start the microphone */
|
|
60
67
|
/* ------------------------------------------------------------------ */
|
|
61
68
|
const recArgs = { sampleRate: SAMPLE_RATE, threshold: 0, binPath: soxPath };
|
|
62
|
-
|
|
69
|
+
|
|
70
|
+
// Set device based on platform and configuration
|
|
71
|
+
if (audioDevice !== null) {
|
|
72
|
+
// User specified a device explicitly
|
|
73
|
+
recArgs.device = audioDevice;
|
|
74
|
+
console.error(`Using audio device: ${audioDevice}`);
|
|
75
|
+
} else if (process.platform === "win32") {
|
|
76
|
+
// Windows: default to device 0 if not specified
|
|
63
77
|
recArgs.device = "0";
|
|
78
|
+
console.error("Using default Windows audio device: 0");
|
|
79
|
+
console.error("To specify a different device, use: AUDIO_DEVICE=<device_id> or pass as 3rd argument");
|
|
64
80
|
}
|
|
65
81
|
|
|
66
82
|
const mic = record.record(recArgs).stream();
|
package/package.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumiastream/wakeword",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "lib/
|
|
5
|
+
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"lib/",
|
|
8
8
|
"models/",
|
|
9
9
|
"binaries/"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
-
"postinstall": "chmod +x binaries/soxmac binaries/soxlinux binaries/sox.exe || true"
|
|
12
|
+
"postinstall": "chmod +x binaries/soxmac binaries/soxlinux binaries/sox.exe || true",
|
|
13
|
+
"list-devices": "node lib/list-devices.js",
|
|
14
|
+
"test-devices": "node lib/test-devices.js",
|
|
15
|
+
"start": "node lib/voice.js"
|
|
13
16
|
},
|
|
14
17
|
"dependencies": {
|
|
15
18
|
"vosk-koffi": "^1.1.1"
|