deepspeech-gpu
Advanced tools
Comparing version 0.9.0-alpha.11 to 0.9.0-alpha.12
@@ -41,2 +41,3 @@ #!/usr/bin/env node | ||
parser.addArgument(['--stream'], { action: 'storeTrue', help: 'Use streaming code path (for tests)' }); | ||
parser.addArgument(['--hot_words'], { help: 'Hot-words and their boosts. Word:Boost pairs are comma-separated' }); | ||
let args = parser.parseArgs(); | ||
@@ -74,2 +75,9 @@ function totalTime(hrtimeValue) { | ||
} | ||
if (args['hot_words']) { | ||
console.error('Adding hot-words %s', args['hot_words']); | ||
for (let word_boost of args['hot_words'].split(',')) { | ||
let word = word_boost.split(':'); | ||
model.addHotWord(word[0], parseFloat(word[1])); | ||
} | ||
} | ||
const buffer = Fs.readFileSync(args['audio']); | ||
@@ -76,0 +84,0 @@ const result = Wav.decode(buffer); |
@@ -141,3 +141,3 @@ "use strict"; | ||
addHotWord(aWord, aBoost) { | ||
const status = binding.addHotWord(this._impl, aWord, aBoost); | ||
const status = binding.AddHotWord(this._impl, aWord, aBoost); | ||
if (status !== 0) { | ||
@@ -155,3 +155,3 @@ throw `addHotWord failed: ${binding.ErrorCodeToErrorMessage(status)} (0x${status.toString(16)})`; | ||
eraseHotWord(aWord) { | ||
const status = binding.eraseHotWord(this._impl, aWord); | ||
const status = binding.EraseHotWord(this._impl, aWord); | ||
if (status !== 0) { | ||
@@ -167,3 +167,3 @@ throw `eraseHotWord failed: ${binding.ErrorCodeToErrorMessage(status)} (0x${status.toString(16)})`; | ||
clearHotWords() { | ||
const status = binding.clearHotWords(this._impl); | ||
const status = binding.ClearHotWords(this._impl); | ||
if (status !== 0) { | ||
@@ -170,0 +170,0 @@ throw `clearHotWord failed: ${binding.ErrorCodeToErrorMessage(status)} (0x${status.toString(16)})`; |
{ | ||
"name": "deepspeech-gpu", | ||
"version": "0.9.0-alpha.11", | ||
"version": "0.9.0-alpha.12", | ||
"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.11#project-deepspeech", | ||
"homepage": "https://github.com/mozilla/DeepSpeech/tree/v0.9.0-alpha.12#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
118130722
41
661
6