sherpa-onnx-node
Advanced tools
Comparing version 1.0.14 to 1.0.15
{ | ||
"name": "sherpa-onnx-node", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "Speech-to-text and text-to-speech using Next-gen Kaldi without internet connection", | ||
@@ -48,8 +48,8 @@ "main": "sherpa-onnx.js", | ||
"optionalDependencies": { | ||
"sherpa-onnx-darwin-arm64": "^1.0.14", | ||
"sherpa-onnx-darwin-x64": "^1.0.14", | ||
"sherpa-onnx-linux-x64": "^1.0.14", | ||
"sherpa-onnx-linux-arm64": "^1.0.14", | ||
"sherpa-onnx-win-x64": "^1.0.14" | ||
"sherpa-onnx-darwin-arm64": "^1.0.15", | ||
"sherpa-onnx-darwin-x64": "^1.0.15", | ||
"sherpa-onnx-linux-x64": "^1.0.15", | ||
"sherpa-onnx-linux-arm64": "^1.0.15", | ||
"sherpa-onnx-win-x64": "^1.0.15" | ||
} | ||
} |
@@ -7,2 +7,3 @@ const addon = require('./addon.js') | ||
readWave: addon.readWave, | ||
Display: streaming_asr.Display, | ||
} |
const addon = require('./addon.js'); | ||
class Display { | ||
constructor(maxWordPerline) { | ||
this.handle = addon.createDisplay(maxWordPerline); | ||
} | ||
print(idx, text) { | ||
addon.print(this.handle, idx, text) | ||
} | ||
} | ||
class OnlineStream { | ||
@@ -13,2 +23,6 @@ constructor(handle) { | ||
} | ||
inputFinished() { | ||
addon.inputFinished(this.handle) | ||
} | ||
} | ||
@@ -19,2 +33,3 @@ | ||
this.handle = addon.createOnlineRecognizer(config); | ||
this.config = config | ||
} | ||
@@ -35,2 +50,10 @@ | ||
isEndpoint(stream) { | ||
return addon.isEndpoint(this.handle, stream.handle); | ||
} | ||
reset(stream) { | ||
addon.reset(this.handle, stream.handle); | ||
} | ||
getResult(stream) { | ||
@@ -44,2 +67,5 @@ const jsonStr = | ||
module.exports = {OnlineRecognizer} | ||
module.exports = { | ||
OnlineRecognizer, | ||
Display | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4858
105