Add streaming CTC ASR APIs for node-addon-api (#867)
This commit is contained in:
@@ -25,7 +25,6 @@ function createOnlineRecognizer() {
|
||||
'numThreads': 2,
|
||||
'provider': 'cpu',
|
||||
'debug': 1,
|
||||
'modelType': 'zipformer',
|
||||
},
|
||||
'decodingMethod': 'greedy_search',
|
||||
'maxActivePaths': 4,
|
||||
@@ -68,7 +67,7 @@ ai.on('data', data => {
|
||||
}
|
||||
|
||||
const isEndpoint = recognizer.isEndpoint(stream);
|
||||
const text = recognizer.getResult(stream).text;
|
||||
const text = recognizer.getResult(stream).text.toLowerCase();
|
||||
|
||||
if (text.length > 0 && lastText != text) {
|
||||
lastText = text;
|
||||
|
||||
Reference in New Issue
Block a user