sherpa-onnx-node 1.0.8 → 1.0.9
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 +6 -0
- package/addon.js +2 -3
- package/package.json +4 -4
- package/streaming-asr.js +0 -1
package/README.md
CHANGED
|
@@ -3,3 +3,9 @@
|
|
|
3
3
|
Please see
|
|
4
4
|
https://github.com/k2-fsa/sherpa-onnx/blob/master/nodejs-addon-examples/README.md
|
|
5
5
|
for usages.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
||Method|Support multiple threads|
|
|
9
|
+
|---|---|---|
|
|
10
|
+
|this package| https://github.com/nodejs/node-addon-api | Yes |
|
|
11
|
+
|https://www.npmjs.com/package/sherpa-onnx| WebAssembly | No |
|
package/addon.js
CHANGED
|
@@ -10,7 +10,6 @@ const possible_paths = [
|
|
|
10
10
|
let found = false;
|
|
11
11
|
for (const p of possible_paths) {
|
|
12
12
|
try {
|
|
13
|
-
console.log(p);
|
|
14
13
|
module.exports = require(p);
|
|
15
14
|
found = true;
|
|
16
15
|
break;
|
|
@@ -23,7 +22,7 @@ for (const p of possible_paths) {
|
|
|
23
22
|
if (!found) {
|
|
24
23
|
let msg =
|
|
25
24
|
`Could not find sherpa-onnx. Tried\n\n ${possible_paths.join('\n ')}\n`
|
|
26
|
-
if (os.platform() == 'darwin' &&
|
|
25
|
+
if (os.platform() == 'darwin' && process.env.DYLD_LIBRARY_PATH &&
|
|
27
26
|
!process.env.DYLD_LIBRARY_PATH.includes(
|
|
28
27
|
`node_modules/sherpa-onnx-${platform_arch}`)) {
|
|
29
28
|
msg +=
|
|
@@ -35,7 +34,7 @@ if (!found) {
|
|
|
35
34
|
msg += ':$DYLD_LIBRARY_PATH\n';
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
if (os.platform() == 'linux' &&
|
|
37
|
+
if (os.platform() == 'linux' && process.env.LD_LIBRARY_PATH &&
|
|
39
38
|
!process.env.LD_LIBRARY_PATH.includes(
|
|
40
39
|
`node_modules/sherpa-onnx-${platform_arch}`)) {
|
|
41
40
|
msg +=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sherpa-onnx-node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Speech-to-text and text-to-speech using Next-gen Kaldi without internet connection",
|
|
5
5
|
"main": "sherpa-onnx.js",
|
|
6
6
|
"scripts": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/csukuangfj/sherpa-onnx#readme",
|
|
47
47
|
"optionalDependencies": {
|
|
48
|
-
"sherpa-onnx-darwin-arm64": "^1.0.
|
|
49
|
-
"sherpa-onnx-darwin-x64": "^1.0.
|
|
50
|
-
"sherpa-onnx-linux-x64": "^1.0.
|
|
48
|
+
"sherpa-onnx-darwin-arm64": "^1.0.9",
|
|
49
|
+
"sherpa-onnx-darwin-x64": "^1.0.9",
|
|
50
|
+
"sherpa-onnx-linux-x64": "^1.0.9"
|
|
51
51
|
}
|
|
52
52
|
}
|