    def _recognize_speech_from_mic(self, ):
        """
        Capture the words from the recorded audio (audio stream --> free text).
        Transcribe speech from recorded from `microphone`.
        """

        with self.microphone as source:
            self.recognizer.adjust_for_ambient_noise(source)
            audio = self.recognizer.listen(source)

        try:
            transcript = self.recognizer.recognize_google(audio).lower()
            self.console_manager.console_output(info_log='User said: {0}'.format(transcript))
        except sr.UnknownValueError:
            # speech was unintelligible
            transcript = ''
            self.console_manager.console_output(info_log='Unable to recognize speech', refresh_console=False)
        except sr.RequestError:
            # API was unreachable or unresponsive
            transcript = ''
            self.console_manager.console_output(error_log='Google API was unreachable')
        return transcript
Capture the words from the recorded audio (audio stream --> free text).
Transcribe speech from recorded from `microphone`.
src/jarvis/jarvis/engines/stt.py