speechflow 0.9.2 → 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.
@@ -1 +1,6 @@
1
+ /*!
2
+ ** SpeechFlow - Speech Processing Flow Graph
3
+ ** Copyright (c) 2024-2025 Dr. Ralf S. Engelschall <rse@engelschall.com>
4
+ ** Licensed under GPL 3.0 <https://spdx.org/licenses/GPL-3.0-only>
5
+ */
1
6
  export {};
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: tsc --project etc/tsconfig.json
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-dev-watch: >
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.2",
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",
@@ -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",
@@ -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: "wasapi:Voicemeeter Out B1", mode: "r") |
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,3 @@
1
- #!/usr/bin/env node
2
1
  /*!
3
2
  ** SpeechFlow - Speech Processing Flow Graph
4
3
  ** Copyright (c) 2024-2025 Dr. Ralf S. Engelschall <rse@engelschall.com>
@@ -326,6 +325,12 @@ let cli: CLIio | null = null
326
325
  process.on("SIGINT", () => {
327
326
  shutdown("SIGINT")
328
327
  })
328
+ process.on("SIGUSR1", () => {
329
+ shutdown("SIGUSR1")
330
+ })
331
+ process.on("SIGUSR2", () => {
332
+ shutdown("SIGUSR2")
333
+ })
329
334
  process.on("SIGTERM", () => {
330
335
  shutdown("SIGTERM")
331
336
  })