deepspeech-gpu
Advanced tools
Comparing version 0.9.0-alpha.9 to 0.9.0-alpha.10
@@ -107,2 +107,25 @@ /// <reference types="node" /> | ||
/** | ||
* Add a hot-word and its boost | ||
* | ||
* @param aWord word | ||
* @param aBoost boost | ||
* | ||
* @throws on error | ||
*/ | ||
addHotWord(aWord: string, aBoost: number): void; | ||
/** | ||
* Erase entry for hot-word | ||
* | ||
* @param aWord word | ||
* | ||
* @throws on error | ||
*/ | ||
eraseHotWord(aWord: string): void; | ||
/** | ||
* Clear all hot-word entries | ||
* | ||
* @throws on error | ||
*/ | ||
clearHotWords(): void; | ||
/** | ||
* Return the sample rate expected by the model. | ||
@@ -109,0 +132,0 @@ * |
38
index.js
@@ -133,2 +133,40 @@ "use strict"; | ||
/** | ||
* Add a hot-word and its boost | ||
* | ||
* @param aWord word | ||
* @param aBoost boost | ||
* | ||
* @throws on error | ||
*/ | ||
addHotWord(aWord, aBoost) { | ||
const status = binding.addHotWord(this._impl, aWord, aBoost); | ||
if (status !== 0) { | ||
throw `addHotWord failed: ${binding.ErrorCodeToErrorMessage(status)} (0x${status.toString(16)})`; | ||
} | ||
} | ||
/** | ||
* Erase entry for hot-word | ||
* | ||
* @param aWord word | ||
* | ||
* @throws on error | ||
*/ | ||
eraseHotWord(aWord) { | ||
const status = binding.eraseHotWord(this._impl, aWord); | ||
if (status !== 0) { | ||
throw `eraseHotWord failed: ${binding.ErrorCodeToErrorMessage(status)} (0x${status.toString(16)})`; | ||
} | ||
} | ||
/** | ||
* Clear all hot-word entries | ||
* | ||
* @throws on error | ||
*/ | ||
clearHotWords() { | ||
const status = binding.clearHotWords(this._impl); | ||
if (status !== 0) { | ||
throw `clearHotWord failed: ${binding.ErrorCodeToErrorMessage(status)} (0x${status.toString(16)})`; | ||
} | ||
} | ||
/** | ||
* Return the sample rate expected by the model. | ||
@@ -135,0 +173,0 @@ * |
{ | ||
"name": "deepspeech-gpu", | ||
"version": "0.9.0-alpha.9", | ||
"version": "0.9.0-alpha.10", | ||
"description": "DeepSpeech NodeJS bindings", | ||
@@ -12,3 +12,3 @@ "main": "./index.js", | ||
"license": "MPL-2.0", | ||
"homepage": "https://github.com/mozilla/DeepSpeech/tree/v0.9.0-alpha.9#project-deepspeech", | ||
"homepage": "https://github.com/mozilla/DeepSpeech/tree/v0.9.0-alpha.10#project-deepspeech", | ||
"files": [ | ||
@@ -15,0 +15,0 @@ "README.md", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
117867460
653
10