setPartialWords method

Future<void> setPartialWords({
  1. required bool partialWords,
})

Same as setWords but for getPartialResult.

Implementation

Future<void> setPartialWords({required final bool partialWords}) {
  if (_voskLibrary != null) {
    _voskLibrary.vosk_recognizer_set_partial_words(
      recognizerPointer!,
      partialWords ? 1 : 0,
    );
    return Future.value();
  }

  return _invokeRecognizerMethod<void>('setPartialWords', {
    'partialWords': partialWords,
  });
}