Vosk works offline on Linux, and its microphone example emits recognition results as JSON to stdout: https://github.com/alphacep/vosk-api/blob/master/python/example/test_microphone.py
For plain text, the final-result print can become print(json.loads(rec.Result())["text"], flush=True); remove the partial-result prints and startup banner. That gives you text per completed utterance rather than a stream of word-by-word revisions.