sherpa-onnx-node
Advanced tools
Comparing version 1.9.24 to 1.9.27
19
addon.js
@@ -12,2 +12,3 @@ const os = require('os'); | ||
`../sherpa-onnx-${platform_arch}/sherpa-onnx.node`, | ||
'./sherpa-onnx.node', | ||
]; | ||
@@ -28,7 +29,8 @@ | ||
if (!found) { | ||
let msg = | ||
`Could not find sherpa-onnx. Tried\n\n ${possible_paths.join('\n ')}\n` | ||
if (os.platform() == 'darwin' && process.env.DYLD_LIBRARY_PATH && | ||
!process.env.DYLD_LIBRARY_PATH.includes( | ||
`node_modules/sherpa-onnx-${platform_arch}`)) { | ||
let msg = `Could not find sherpa-onnx-node. Tried\n\n ${ | ||
possible_paths.join('\n ')}\n` | ||
if (os.platform() == 'darwin' && | ||
(!process.env.DYLD_LIBRARY_PATH || | ||
!process.env.DYLD_LIBRARY_PATH.includes( | ||
`node_modules/sherpa-onnx-${platform_arch}`))) { | ||
msg += | ||
@@ -43,5 +45,6 @@ 'Please remeber to set the following environment variable and try again:\n'; | ||
if (os.platform() == 'linux' && process.env.LD_LIBRARY_PATH && | ||
!process.env.LD_LIBRARY_PATH.includes( | ||
`node_modules/sherpa-onnx-${platform_arch}`)) { | ||
if (os.platform() == 'linux' && | ||
(!process.env.LD_LIBRARY_PATH || | ||
!process.env.LD_LIBRARY_PATH.includes( | ||
`node_modules/sherpa-onnx-${platform_arch}`))) { | ||
msg += | ||
@@ -48,0 +51,0 @@ 'Please remeber to set the following environment variable and try again:\n'; |
{ | ||
"name": "sherpa-onnx-node", | ||
"version": "1.9.24", | ||
"version": "1.9.27", | ||
"description": "Speech-to-text and text-to-speech using Next-gen Kaldi without internet connection", | ||
@@ -11,3 +11,3 @@ "main": "sherpa-onnx.js", | ||
"type": "git", | ||
"url": "git+https://github.com/csukuangfj/sherpa-onnx.git" | ||
"url": "git+https://github.com/k2-fsa/sherpa-onnx.git" | ||
}, | ||
@@ -45,12 +45,12 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/csukuangfj/sherpa-onnx/issues" | ||
"url": "https://github.com/k2-fsa/sherpa-onnx/issues" | ||
}, | ||
"homepage": "https://github.com/csukuangfj/sherpa-onnx#readme", | ||
"homepage": "https://github.com/k2-fsa/sherpa-onnx#readme", | ||
"optionalDependencies": { | ||
"sherpa-onnx-darwin-arm64": "^1.9.24", | ||
"sherpa-onnx-darwin-x64": "^1.9.24", | ||
"sherpa-onnx-linux-x64": "^1.9.24", | ||
"sherpa-onnx-linux-arm64": "^1.9.24", | ||
"sherpa-onnx-win-x64": "^1.9.24" | ||
"sherpa-onnx-darwin-arm64": "^1.9.27", | ||
"sherpa-onnx-darwin-x64": "^1.9.27", | ||
"sherpa-onnx-linux-x64": "^1.9.27", | ||
"sherpa-onnx-linux-arm64": "^1.9.27", | ||
"sherpa-onnx-win-x64": "^1.9.27" | ||
} | ||
} |
@@ -10,3 +10,3 @@ # Introduction | ||
|---|---|---|---| | ||
|this package| https://github.com/nodejs/node-addon-api | Yes | v10| | ||
|this package| https://github.com/nodejs/node-addon-api | Yes | v16| | ||
|https://www.npmjs.com/package/sherpa-onnx| WebAssembly | No | v18| |
const addon = require('./addon.js') | ||
const streaming_asr = require('./streaming-asr.js'); | ||
const non_streaming_asr = require('./non-streaming-asr.js'); | ||
const non_streaming_tts = require('./non-streaming-tts.js'); | ||
const vad = require('./vad.js'); | ||
const slid = require('./spoken-language-identification.js'); | ||
const sid = require('./speaker-identification.js'); | ||
const at = require('./audio-tagg.js'); | ||
const punct = require('./punctuation.js'); | ||
const kws = require('./keyword-spotter.js'); | ||
module.exports = { | ||
OnlineRecognizer: streaming_asr.OnlineRecognizer, | ||
OfflineRecognizer: non_streaming_asr.OfflineRecognizer, | ||
OfflineTts: non_streaming_tts.OfflineTts, | ||
readWave: addon.readWave, | ||
writeWave: addon.writeWave, | ||
Display: streaming_asr.Display, | ||
Vad: vad.Vad, | ||
CircularBuffer: vad.CircularBuffer, | ||
SpokenLanguageIdentification: slid.SpokenLanguageIdentification, | ||
SpeakerEmbeddingExtractor: sid.SpeakerEmbeddingExtractor, | ||
SpeakerEmbeddingManager: sid.SpeakerEmbeddingManager, | ||
AudioTagging: at.AudioTagging, | ||
Punctuation: punct.Punctuation, | ||
KeywordSpotter: kws.KeywordSpotter, | ||
} |
@@ -18,6 +18,7 @@ const addon = require('./addon.js'); | ||
// obj is {samples: samples, sampleRate: sampleRate} | ||
// samples is a float32 array containing samples in the range [-1, 1] | ||
acceptWaveform(samples, sampleRate) { | ||
addon.acceptWaveformOnline( | ||
this.handle, {samples: samples, sampleRate: sampleRate}) | ||
// sampleRate is a number | ||
acceptWaveform(obj) { | ||
addon.acceptWaveformOnline(this.handle, obj) | ||
} | ||
@@ -67,3 +68,4 @@ | ||
OnlineRecognizer, | ||
OnlineStream, | ||
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
13764
13
427
1