speechflow 0.9.1 → 0.9.3
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/dst/speechflow.d.ts +5 -0
- package/dst/speechflow.js +8 -1
- package/etc/nps.yaml +6 -6
- package/package.json +5 -6
- package/sample.yaml +2 -1
- package/src/speechflow.ts +7 -1
package/dst/speechflow.d.ts
CHANGED
package/dst/speechflow.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
"use strict";
|
|
2
|
-
|
|
3
|
+
/*!
|
|
3
4
|
** SpeechFlow - Speech Processing Flow Graph
|
|
4
5
|
** Copyright (c) 2024-2025 Dr. Ralf S. Engelschall <rse@engelschall.com>
|
|
5
6
|
** Licensed under GPL 3.0 <https://spdx.org/licenses/GPL-3.0-only>
|
|
@@ -296,6 +297,12 @@ let cli = null;
|
|
|
296
297
|
process.on("SIGINT", () => {
|
|
297
298
|
shutdown("SIGINT");
|
|
298
299
|
});
|
|
300
|
+
process.on("SIGUSR1", () => {
|
|
301
|
+
shutdown("SIGUSR1");
|
|
302
|
+
});
|
|
303
|
+
process.on("SIGUSR2", () => {
|
|
304
|
+
shutdown("SIGUSR2");
|
|
305
|
+
});
|
|
299
306
|
process.on("SIGTERM", () => {
|
|
300
307
|
shutdown("SIGTERM");
|
|
301
308
|
});
|
package/etc/nps.yaml
CHANGED
|
@@ -21,18 +21,18 @@ scripts:
|
|
|
21
21
|
lint-eslint: eslint --config etc/eslint.mjs src/**/*.ts
|
|
22
22
|
|
|
23
23
|
# code compilation/transpiling (building)
|
|
24
|
-
build:
|
|
24
|
+
build: >
|
|
25
|
+
tsc --project etc/tsconfig.json &&
|
|
26
|
+
(echo "#!/usr/bin/env node"; cat dst/speechflow.js) >dst/speechflow.js.new &&
|
|
27
|
+
mv dst/speechflow.js.new dst/speechflow.js
|
|
25
28
|
build-watch: nodemon --exec "npm start build" --watch src --ext ts
|
|
26
29
|
|
|
27
30
|
# start server run-time
|
|
28
31
|
server-delay: delay 2.0
|
|
29
|
-
server-
|
|
32
|
+
server: node dst/speechflow.js -v info -c sample@sample.yaml
|
|
33
|
+
server-watch: >
|
|
30
34
|
cross-env NODE_OPTIONS="--enable-source-maps"
|
|
31
35
|
nodemon --exec "npm start server" --watch src --ext ts --delay 1.0
|
|
32
|
-
server: >
|
|
33
|
-
node --env-file=.env dst/speechflow.js -v debug -c sample@sample.yaml
|
|
34
|
-
server-dev: node --env-file=.env -r ts-node/register --watch src/speechflow.ts -v debug -c sample@sample.yaml
|
|
35
|
-
server-prd: node --env-file=.env -r ts-node/register src/speechflow.ts -v info -c sample@sample.yaml
|
|
36
36
|
|
|
37
37
|
# cleanup filesystem
|
|
38
38
|
clean: rimraf dst
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "speechflow",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"x-stdver": "0.9.1-EA",
|
|
5
5
|
"x-release": "2025-04-27",
|
|
6
6
|
"homepage": "https://github.com/rse/speechflow",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "git+https://github.com/rse/speechflow"
|
|
16
|
+
"url": "git+https://github.com/rse/speechflow.git"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"cli-io": "0.9.13",
|
|
@@ -60,9 +60,7 @@
|
|
|
60
60
|
"@types/ws": "8.18.1",
|
|
61
61
|
"@types/resolve": "1.20.6",
|
|
62
62
|
|
|
63
|
-
"ts-node": "10.9.2",
|
|
64
63
|
"stmux": "1.8.10",
|
|
65
|
-
"patch-package": "8.0.0",
|
|
66
64
|
"nodemon": "3.1.10",
|
|
67
65
|
"rimraf": "6.0.1",
|
|
68
66
|
"typescript": "5.8.3",
|
|
@@ -74,7 +72,7 @@
|
|
|
74
72
|
"engines": {
|
|
75
73
|
"node": ">=22.0.0"
|
|
76
74
|
},
|
|
77
|
-
"bin": { "speechflow": "
|
|
75
|
+
"bin": { "speechflow": "dst/speechflow.js" },
|
|
78
76
|
"types": "./dst/speechflow-node.d.ts",
|
|
79
77
|
"module": "./dst/speechflow-node.js",
|
|
80
78
|
"main": "./dst/speechflow-node.js",
|
|
@@ -85,6 +83,7 @@
|
|
|
85
83
|
}
|
|
86
84
|
},
|
|
87
85
|
"scripts": {
|
|
88
|
-
"start": "nps -c etc/nps.yaml"
|
|
86
|
+
"start": "nps -c etc/nps.yaml",
|
|
87
|
+
"speechflow": "node dst/speechflow.js"
|
|
89
88
|
}
|
|
90
89
|
}
|
package/sample.yaml
CHANGED
|
@@ -26,7 +26,8 @@ translation: |
|
|
|
26
26
|
deepl(key: env.SPEECHFLOW_KEY_DEEPL, src: "de", dst: "en-US") |
|
|
27
27
|
file(path: "-", mode: "w", type: "text")
|
|
28
28
|
|
|
29
|
+
# sample for development
|
|
29
30
|
sample: |
|
|
30
|
-
device(device: "
|
|
31
|
+
device(device: "coreaudio:Elgato Wave:3", mode: "r") |
|
|
31
32
|
file(path: "capture.pcm", mode: "w", type: "audio")
|
|
32
33
|
|
package/src/speechflow.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
2
|
** SpeechFlow - Speech Processing Flow Graph
|
|
3
3
|
** Copyright (c) 2024-2025 Dr. Ralf S. Engelschall <rse@engelschall.com>
|
|
4
4
|
** Licensed under GPL 3.0 <https://spdx.org/licenses/GPL-3.0-only>
|
|
@@ -325,6 +325,12 @@ let cli: CLIio | null = null
|
|
|
325
325
|
process.on("SIGINT", () => {
|
|
326
326
|
shutdown("SIGINT")
|
|
327
327
|
})
|
|
328
|
+
process.on("SIGUSR1", () => {
|
|
329
|
+
shutdown("SIGUSR1")
|
|
330
|
+
})
|
|
331
|
+
process.on("SIGUSR2", () => {
|
|
332
|
+
shutdown("SIGUSR2")
|
|
333
|
+
})
|
|
328
334
|
process.on("SIGTERM", () => {
|
|
329
335
|
shutdown("SIGTERM")
|
|
330
336
|
})
|