echogarden 0.4.3 → 0.5.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 +42 -26
- package/data/lexicons/heteronyms.en.json +13 -13
- package/dist/cli/CLI.js +22 -6
- package/dist/cli/CLI.js.map +1 -1
- package/dist/nlp/TextNormalizer.js +1 -1
- package/dist/nlp/TextNormalizer.js.map +1 -1
- package/dist/synthesis/VitsTTS.js +230 -65
- package/dist/synthesis/VitsTTS.js.map +1 -1
- package/dist/utilities/PackageManager.d.ts +3 -1
- package/dist/utilities/PackageManager.js +20 -16
- package/dist/utilities/PackageManager.js.map +1 -1
- package/docs/CLI.md +37 -13
- package/docs/Development.md +17 -1
- package/docs/Engines.md +29 -21
- package/docs/Licenses.md +2 -2
- package/docs/Options.md +2 -2
- package/docs/Tasklist.md +288 -0
- package/docs/Technical.md +16 -14
- package/package.json +11 -13
- package/docs/Roadmap.md +0 -14
package/docs/Technical.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
* Echogarden is written in TypeScript and targets the Node.js platform.
|
|
4
4
|
* It uses ESM modules and latest ECMAScript and TypeScript features.
|
|
5
|
-
* It does not depend on essential binary executables. Instead, all of its engines either use pure JavaScript, WebAssembly, WASI, or the ONNX runtime (with some exceptions: the CLI does
|
|
6
|
-
* It does not depend on essential native modules requiring compilation with `node-gyp`. This greatly simplifies
|
|
5
|
+
* It does not depend on essential binary executables. Instead, all of its engines either use pure JavaScript, WebAssembly, WASI, or the ONNX runtime (with some exceptions: the CLI does invoke a few binary executables, loaded from expansion packages, for the `SoX` and `ffmpeg` tools.Using expansion packages simplifies the installation and ensures non-buggy version are used. Since SoX `v14.4.2` is broken on Windows, it bundles `v14.4.1`).
|
|
6
|
+
* It does not depend on essential native node.js modules requiring compilation with `node-gyp`. This greatly simplifies the installation experience for end-users (the ONNX runtime bundles precompiled NAPI modules for all supported platforms - it doesn't require any compilation during its installation).
|
|
7
7
|
|
|
8
8
|
## Package system
|
|
9
9
|
|
|
@@ -16,13 +16,13 @@ Packages are downloaded as `.tar.gz` files, and are extracted to `[data-folder]/
|
|
|
16
16
|
* `Users/User/Library/Application Support/echogarden` on macOS
|
|
17
17
|
* `/home/user/.local/share/echogarden` on Linux
|
|
18
18
|
|
|
19
|
-
By using downloadable packages, the installed size is made significantly smaller and the installation faster. The total size of all available packages is currently about
|
|
19
|
+
By using downloadable packages, the installed size is made significantly smaller and the installation faster. The total size of all available packages is currently about 15.4GB (10.6GB compressed).
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
The packages are currently hosted and downloaded from a dedicated [Hugging Face repository](https://huggingface.co/echogarden/echogarden-packages).
|
|
22
22
|
|
|
23
23
|
## Can the base install size be made smaller?
|
|
24
24
|
|
|
25
|
-
The installed (uncompressed) size, including dependencies, is around 270MB. This is without any models or voices, which are downloaded as needed.
|
|
25
|
+
The base installed (uncompressed) size, including dependencies, is around 270MB. This is without any models or voices, which are downloaded as needed.
|
|
26
26
|
|
|
27
27
|
Currently, the biggest contributors to the size are:
|
|
28
28
|
|
|
@@ -34,29 +34,31 @@ Currently, the biggest contributors to the size are:
|
|
|
34
34
|
|
|
35
35
|
`onnxruntime-node` is big because it bundles pre-compiled binaries for multiple platforms. `kuromoji` is large because of its dictionary files and some unessential test code it bundles. The other three packages include large WASM binaries.
|
|
36
36
|
|
|
37
|
-
So, yes, in the future it may be possible to reduce the core installed size by dynamically installing some of these dependencies,
|
|
37
|
+
So, yes, in the future it may be possible to reduce the core installed size by dynamically installing some of these dependencies, or using modified, "slimmed-down" custom versions.
|
|
38
38
|
|
|
39
39
|
## Since the code is almost all JavaScript and WASM, why can't it just run in a web browser?
|
|
40
40
|
|
|
41
41
|
It is technically possible, overall, since its core components: `espeak-ng` and `onnxruntime` both have WASM ports. Actually, `onnxruntime-web`, unlike `onnxruntime-node` can also make use of the GPU via WebGL, and in the future, [it will support WebGPU](https://github.com/microsoft/onnxruntime/issues/11695), which should give a performance boost.
|
|
42
42
|
|
|
43
|
-
However, it is a lot of work, and only a subset of the engines can be supported (no cloud engines, in particular). There are several reasons why the web may not be the most effective platform:
|
|
43
|
+
However, it is a lot of work, and only a subset of the engines can be supported (no cloud engines, in particular). There are several reasons why the web may not be the most effective platform for Echogarden:
|
|
44
44
|
|
|
45
|
-
* Significantly slower inference when
|
|
45
|
+
* Significantly slower inference when using CPU for ONNX models
|
|
46
46
|
* No cross-domain network connectivity - can't connect to Google Cloud, Microsoft, Amazon etc. without a proxy
|
|
47
47
|
* Large initial download size would make it too heavy and slow to load as part of a standard web page directly
|
|
48
|
+
* Large memory requirement for the VITS models, starting at about 800MB - 1GB, which is a bit too much for a browser
|
|
49
|
+
* Due to the high code complexity, data size, and memory consumption, it is unlikely that a browser extension, internally bundling some of the models, would be accepted to the Chrome and Firefox web stores
|
|
48
50
|
* Will require a virtual file system to store models and make use of downloadable packages
|
|
49
|
-
* Requires duplicating a lot of prior work and increasing code complexity
|
|
51
|
+
* Requires duplicating a lot of prior work, porting many node.js-only APIs, and increasing code complexity
|
|
50
52
|
* Possibly lots of issues with inconsistent browser support and browser security constraints
|
|
51
53
|
* Not future-proof. Due to changing restrictions of browsers, the runtime environment is not guaranteed be reliably reproducible in the future, meaning that it may need continuous maintenance to ensure it keeps working on the newest browsers
|
|
52
54
|
|
|
53
|
-
It remains to be seen
|
|
55
|
+
It remains to be seen if this sort of work would feel justified somehow. I designed the tool to make the local installation extremely easy and issue-free. I guess it could look "impressive" to be able to run it in a browser, and may be come as a nice "toy" or "tech-demo", and could get some attention, but it may eventually turn out to be simpler and more practical to just install a local instance and connect to it from the browser via a WebSocket API (which is already working and running, but at a development stage).
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
A TTS-only browser extension is in development. It registers Echogarden's voices on the browser's Web Speech API using the [`chrome.ttsEngine`](https://developer.chrome.com/docs/extensions/reference/ttsEngine/) extension API and communicates with it using the WebSocket API
|
|
56
58
|
|
|
57
59
|
## Why can't I use `stdin` and `stdout` to pipe into and out from the CLI app?
|
|
58
60
|
|
|
59
|
-
I don't think that `stdin` and `stdout` are able to capture the type of complex, multi-message, bidirectional communication that is needed for a full speech processing service. When
|
|
61
|
+
I don't think that `stdin` and `stdout` are able to capture the type of complex, multi-message, bidirectional communication that is needed for a full speech processing service. When the WebSocket server is released, it will fulfill all these needs, and more. It would provide a uniform interface for all external clients, and would also be launched and used internally by the CLI itself. It would enable the CLI to do complex asynchronous and parallel operations it can't currently do, like transcribing a live input while text is written to the terminal and audio is played, processed and transmitted, all at the same time.
|
|
60
62
|
|
|
61
63
|
## Why does the CLI use `--option=value` and not `--option value` syntax?
|
|
62
64
|
|
|
@@ -64,11 +66,11 @@ I would have allowed `--option value` if I could. The reason `--option=value` sy
|
|
|
64
66
|
|
|
65
67
|
In order to support a syntax like `--option value` I will need to parse the command line separately for each command, but then it would be difficult to share common options between all of them.
|
|
66
68
|
|
|
67
|
-
Also, `option=value` is more similar to the syntax used in the configuration file, which makes it more consistent, and since the CLI accepts arbitrary numbers of free arguments, it
|
|
69
|
+
Also, `option=value` is more similar to the syntax used in the configuration file, which makes it more consistent, and since the CLI accepts arbitrary numbers of free arguments, it helps prevent confusion on whether an argument is related to an option or a free one.
|
|
68
70
|
|
|
69
71
|
## Code organization
|
|
70
72
|
|
|
71
73
|
* `src`: TypeScript source code
|
|
72
74
|
* `dist`: compiled JavaScript modules
|
|
73
|
-
* `data`: various data files, including phonetic lexicons and conversion tables. `data/schemas` stores JSON schemas for all configuration options, auto-generated using [`ts-json-schema-generator`](https://github.com/vega/ts-json-schema-generator) directly from the TypeScript code, and used by the CLI to parse and validate the
|
|
75
|
+
* `data`: various data files, including phonetic lexicons and language code conversion tables. `data/schemas` stores JSON schemas for all configuration options, auto-generated using [`ts-json-schema-generator`](https://github.com/vega/ts-json-schema-generator) directly from the TypeScript code, and used by the CLI to parse and validate the options provided
|
|
74
76
|
* `docs`: documentation
|
package/package.json
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "echogarden",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.5.1",
|
|
4
|
+
"description": "A fully open-source speech system designed with end-users in mind.",
|
|
5
5
|
"author": "Rotem Dan",
|
|
6
6
|
"license": "GPL-3.0-only",
|
|
7
7
|
"keywords": [
|
|
8
|
-
"tts",
|
|
9
8
|
"text-to-speech",
|
|
10
|
-
"stt",
|
|
11
|
-
"speech-to-text",
|
|
12
|
-
"speech processing",
|
|
13
9
|
"speech synthesis",
|
|
10
|
+
"speech-to-text",
|
|
14
11
|
"speech recognition",
|
|
12
|
+
"speech processing",
|
|
15
13
|
"speech alignment",
|
|
16
14
|
"forced alignment",
|
|
17
15
|
"speech translation",
|
|
18
|
-
"language
|
|
16
|
+
"language identification",
|
|
19
17
|
"language detection"
|
|
20
18
|
],
|
|
21
19
|
"repository": {
|
|
@@ -55,8 +53,8 @@
|
|
|
55
53
|
"echogarden": "./dist/cli/CLILauncher.js"
|
|
56
54
|
},
|
|
57
55
|
"dependencies": {
|
|
58
|
-
"@aws-sdk/client-polly": "^3.
|
|
59
|
-
"@aws-sdk/client-transcribe-streaming": "^3.
|
|
56
|
+
"@aws-sdk/client-polly": "^3.370.0",
|
|
57
|
+
"@aws-sdk/client-transcribe-streaming": "^3.370.0",
|
|
60
58
|
"@echogarden/espeak-ng-emscripten": "^0.1.2",
|
|
61
59
|
"@echogarden/fasttext-wasm": "^0.1.0",
|
|
62
60
|
"@echogarden/flite-wasi": "^0.1.1",
|
|
@@ -122,13 +120,13 @@
|
|
|
122
120
|
"@types/msgpack-lite": "^0.1.8",
|
|
123
121
|
"@types/ndarray": "^1.0.11",
|
|
124
122
|
"@types/ndarray-ops": "^1.2.4",
|
|
125
|
-
"@types/node": "^20.4.
|
|
123
|
+
"@types/node": "^20.4.2",
|
|
126
124
|
"@types/recursive-readdir": "^2.2.1",
|
|
127
125
|
"@types/tar": "^6.1.5",
|
|
128
126
|
"@types/ws": "^8.5.5",
|
|
129
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
130
|
-
"@typescript-eslint/parser": "^
|
|
131
|
-
"eslint": "^8.
|
|
127
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
128
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
129
|
+
"eslint": "^8.45.0",
|
|
132
130
|
"ts-json-schema-generator": "^1.2.0",
|
|
133
131
|
"typescript": "^5.1.6"
|
|
134
132
|
}
|
package/docs/Roadmap.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Roadmap
|
|
2
|
-
|
|
3
|
-
1. Publish a working command line application
|
|
4
|
-
1. Smooth out any significant bugs
|
|
5
|
-
1. Ensure platform support
|
|
6
|
-
1. Add missing features, options or commands to the CLI
|
|
7
|
-
1. Stabilize the library API
|
|
8
|
-
1. Open up the library API. Add any extra methods or options needed for that to happen
|
|
9
|
-
1. Develop a worker API that closely mirrors the library API
|
|
10
|
-
1. Develop a WebSocket server based on the worker API
|
|
11
|
-
1. Develop a basic Web-based client app, talking the WebSocket server
|
|
12
|
-
1. Modify the CLI app to internally use the background worker
|
|
13
|
-
1. Further improve the client app
|
|
14
|
-
1. Port the offline speech synthesis API to the browser (in particular the `vits`, `pico`, `flite`, `eSpeak` engines)
|