startListening method

void startListening({
  1. required void speechListenFunction(
    1. SpeechRecognitionResult?
    ),
})

Each time to start a speech recognition session

Implementation

void startListening(
    {required void Function(SpeechRecognitionResult?)
        speechListenFunction}) async {
  kLog("Listening...!!!");
  await _speechToText.listen(
      pauseFor: const Duration(seconds: 5), onResult: speechListenFunction);
}