speechflow 0.9.2 → 0.9.4

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 CHANGED
@@ -15,8 +15,16 @@ About
15
15
  -----
16
16
 
17
17
  **SpeechFlow** is a command-line interface based tool for establishing a
18
- directed data flow graph of audio and text processing nodes. This way it
19
- allows to perform various speech processing tasks in a flexible way.
18
+ directed data flow graph of audio and text processing nodes. This way,
19
+ it allows to perform various speech processing tasks in a flexible way.
20
+ Currently, **SpeechFlow** comes with graph nodes for local file I/O, local audio
21
+ device I/O, local/remote WebSocket network I/O, cloud-based [Deepgram](https://deepgram.com)
22
+ speech-to-text conversion, cloud-based [DeepL](https://deepl.com) text-to-text
23
+ translation, local [Gemma/Ollama](https://ollama.com/library/gemma3)
24
+ text-to-text translation, cloud-based [ElevenLabs](https://elevenlabs.io/)
25
+ text-to-speech conversion, and local [FFmpeg](https://ffmpeg.org/)
26
+ speech-to-speech encoding. **SpeechFlow** is written in TypeScript and
27
+ ships as a package for the Node Package Manager (NPM).
20
28
 
21
29
  Installation
22
30
  ------------
@@ -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
@@ -8,9 +8,9 @@ scripts:
8
8
  # multiview-style development dashboard
9
9
  dev: >
10
10
  stmux -w always -m beep -e "built.in.+ms" --
11
- [ -s 40% "npm start lint-watch" :
12
- -s 40% "npm start build-watch" :
13
- -s 20% "npm start server-delay server-dev-watch" ]
11
+ [ -s 35% "npm start lint-watch" :
12
+ -s 15% "npm start build-watch" :
13
+ -s 30% "npm start server-delay server-watch" ]
14
14
 
15
15
  # static code analysis (linting)
16
16
  lint-watch: nodemon --exec "npm start lint" --watch src --ext ts
@@ -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
- 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
35
+ nodemon --exec "npm start server" --watch dst --ext ts --delay 1.0
36
36
 
37
37
  # cleanup filesystem
38
38
  clean: rimraf dst
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "speechflow",
3
- "version": "0.9.2",
4
- "x-stdver": "0.9.1-EA",
3
+ "version": "0.9.4",
4
+ "x-stdver": "0.9.4-EA",
5
5
  "x-release": "2025-04-27",
6
6
  "homepage": "https://github.com/rse/speechflow",
7
7
  "description": "Speech Processing Flow Graph",
@@ -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
  })