return timestamps for WebAssembly (#737)
This commit is contained in:
@@ -100,7 +100,7 @@ fs.createReadStream(waveFilename, {highWaterMark: 4096})
|
||||
|
||||
stream.acceptWaveform(recognizer.config.featConfig.sampleRate, flattened);
|
||||
recognizer.decode(stream);
|
||||
const text = recognizer.getResult(stream);
|
||||
const text = recognizer.getResult(stream).text;
|
||||
console.log(text);
|
||||
|
||||
stream.free();
|
||||
|
||||
@@ -100,7 +100,7 @@ fs.createReadStream(waveFilename, {'highWaterMark': 4096})
|
||||
|
||||
stream.acceptWaveform(recognizer.config.featConfig.sampleRate, flattened);
|
||||
recognizer.decode(stream);
|
||||
const text = recognizer.getResult(stream);
|
||||
const text = recognizer.getResult(stream).text;
|
||||
console.log(text);
|
||||
|
||||
stream.free();
|
||||
|
||||
@@ -101,7 +101,7 @@ fs.createReadStream(waveFilename, {'highWaterMark': 4096})
|
||||
|
||||
stream.acceptWaveform(recognizer.config.featConfig.sampleRate, flattened);
|
||||
recognizer.decode(stream);
|
||||
const text = recognizer.getResult(stream);
|
||||
const text = recognizer.getResult(stream).text;
|
||||
console.log(text);
|
||||
|
||||
stream.free();
|
||||
|
||||
@@ -100,7 +100,7 @@ fs.createReadStream(waveFilename, {'highWaterMark': 4096})
|
||||
|
||||
stream.acceptWaveform(recognizer.config.featConfig.sampleRate, flattened);
|
||||
recognizer.decode(stream);
|
||||
const text = recognizer.getResult(stream);
|
||||
const text = recognizer.getResult(stream).text;
|
||||
console.log(text);
|
||||
|
||||
stream.free();
|
||||
|
||||
@@ -86,7 +86,7 @@ ai.on('data', data => {
|
||||
}
|
||||
|
||||
const isEndpoint = recognizer.isEndpoint(stream);
|
||||
const text = recognizer.getResult(stream);
|
||||
const text = recognizer.getResult(stream).text;
|
||||
|
||||
if (text.length > 0 && lastText != text) {
|
||||
lastText = text;
|
||||
|
||||
@@ -75,7 +75,7 @@ function decode(samples) {
|
||||
while (recognizer.isReady(stream)) {
|
||||
recognizer.decode(stream);
|
||||
}
|
||||
const text = recognizer.getResult(stream);
|
||||
const text = recognizer.getResult(stream).text;
|
||||
console.log(text);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ ai.on('data', data => {
|
||||
}
|
||||
|
||||
const isEndpoint = recognizer.isEndpoint(stream);
|
||||
const text = recognizer.getResult(stream);
|
||||
const text = recognizer.getResult(stream).text;
|
||||
|
||||
if (text.length > 0 && lastText != text) {
|
||||
lastText = text;
|
||||
|
||||
@@ -77,7 +77,7 @@ function decode(samples) {
|
||||
while (recognizer.isReady(stream)) {
|
||||
recognizer.decode(stream);
|
||||
}
|
||||
const text = recognizer.getResult(stream);
|
||||
const text = recognizer.getResult(stream).text;
|
||||
console.log(text);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ function decode(samples) {
|
||||
while (recognizer.isReady(stream)) {
|
||||
recognizer.decode(stream);
|
||||
}
|
||||
const text = recognizer.getResult(stream);
|
||||
const text = recognizer.getResult(stream).text;
|
||||
console.log(text);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ function decode(samples) {
|
||||
while (recognizer.isReady(stream)) {
|
||||
recognizer.decode(stream);
|
||||
}
|
||||
const text = recognizer.getResult(stream);
|
||||
const text = recognizer.getResult(stream).text;
|
||||
console.log(text);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user