termux-tts 1.4.2 → 1.4.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/.github/workflows/release.yml +98 -98
- package/CHANGELOG.md +57 -48
- package/LICENSE +17 -17
- package/README.md +441 -438
- package/README.pypi.md +441 -438
- package/bin/cli.js +33 -33
- package/doc.config.yaml +532 -532
- package/docs/benchmarks.md +11 -11
- package/index.js +5 -5
- package/install.sh +53 -53
- package/package.json +57 -57
- package/pyproject.toml +81 -81
- package/setup.py +38 -38
- package/termux_tts/__init__.py +64 -64
- package/termux_tts/control/component.py +398 -398
- package/termux_tts/engine_native.py +104 -104
- package/termux_tts/exceptions.py +28 -28
- package/termux_tts/installer.py +66 -6
- package/termux_tts/tokenizer.py +184 -184
package/bin/cli.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* termux-tts Node.js Global CLI Wrapper
|
|
4
|
-
* Cross-platform entry point for npm global execution.
|
|
5
|
-
*/
|
|
6
|
-
const { spawn } = require('child_process');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
|
|
9
|
-
const args = process.argv.slice(2);
|
|
10
|
-
const pyBin = process.env.PYTHON_BIN || (process.platform === 'win32' ? 'py' : 'python3');
|
|
11
|
-
|
|
12
|
-
// 1. Try running module entry point directly
|
|
13
|
-
const pyProcess = spawn(pyBin, ['-m', 'termux_tts.cli', ...args], {
|
|
14
|
-
stdio: 'inherit',
|
|
15
|
-
env: { ...process.env, PYTHONPATH: path.join(__dirname, '..') }
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
pyProcess.on('error', (err) => {
|
|
19
|
-
// 2. Fallback to standalone binary
|
|
20
|
-
const binProcess = spawn('termux-tts', args, { stdio: 'inherit' });
|
|
21
|
-
binProcess.on('error', (bErr) => {
|
|
22
|
-
console.error('[ERROR] Failed to execute termux-tts CLI:', bErr.message);
|
|
23
|
-
process.exit(1);
|
|
24
|
-
});
|
|
25
|
-
binProcess.on('close', (code) => {
|
|
26
|
-
process.exit(code || 0);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
pyProcess.on('close', (code) => {
|
|
31
|
-
process.exit(code || 0);
|
|
32
|
-
});
|
|
33
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* termux-tts Node.js Global CLI Wrapper
|
|
4
|
+
* Cross-platform entry point for npm global execution.
|
|
5
|
+
*/
|
|
6
|
+
const { spawn } = require('child_process');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
|
|
9
|
+
const args = process.argv.slice(2);
|
|
10
|
+
const pyBin = process.env.PYTHON_BIN || (process.platform === 'win32' ? 'py' : 'python3');
|
|
11
|
+
|
|
12
|
+
// 1. Try running module entry point directly
|
|
13
|
+
const pyProcess = spawn(pyBin, ['-m', 'termux_tts.cli', ...args], {
|
|
14
|
+
stdio: 'inherit',
|
|
15
|
+
env: { ...process.env, PYTHONPATH: path.join(__dirname, '..') }
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
pyProcess.on('error', (err) => {
|
|
19
|
+
// 2. Fallback to standalone binary
|
|
20
|
+
const binProcess = spawn('termux-tts', args, { stdio: 'inherit' });
|
|
21
|
+
binProcess.on('error', (bErr) => {
|
|
22
|
+
console.error('[ERROR] Failed to execute termux-tts CLI:', bErr.message);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
});
|
|
25
|
+
binProcess.on('close', (code) => {
|
|
26
|
+
process.exit(code || 0);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
pyProcess.on('close', (code) => {
|
|
31
|
+
process.exit(code || 0);
|
|
32
|
+
});
|
|
33
|
+
|