Practical overview
When it fits
Use it when you need a local, code-oriented example for live microphone recognition with wav2vec2, rather than a hosted transcription interface.
Who it is for
- Developers prototyping microphone-based speech-to-text.
- Users who want to try wav2vec2 models for live transcription on a local machine.
Documented uses
- Transcribe speech from a microphone as it is captured.
- Read recognized text alongside sample length and inference time.
- Try a selected Hugging Face wav2vec2 model in a Python workflow.
Requirements & limits
The project is a public GitHub repository with an MIT license. The documented workflow is installed and run locally with Python.
- Model files download on first execution, so the model name is an important choice.
- Audio input comes from the system default device, which needs to be configured.
- The README recommends a virtual environment and notes a possible PortAudio dependency issue during PyAudio installation on Linux.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up and run live microphone recognition
Install the project and start its documented live speech-recognition script.
Before you start
- Python 3 and a Linux environment.
- A correctly configured system default audio device.
- On Ubuntu, install portaudio19-dev if PyAudio installation reports that PortAudio is missing.
Steps
Create and activate a virtual environment with the README’s Python commands.
Install project dependencies with pip install -r requirements.txt.
Run python live_asr.py.
Expected outcome
The project starts its documented speech-recognition workflow using microphone input.
Guide limitations
- Audio capture uses the system default device, which must be configured correctly.
- The README notes that a PyAudio message about failing to connect to the JACK audio server can be ignored.
Use a Hugging Face wav2vec2 model in Python
Select a wav2vec2 model and read live text and timing values through the Python class.
Before you start
- The project’s Python dependencies installed.
- A wav2vec2 automatic-speech-recognition model name from the Hugging Face model hub.
- A configured default microphone.
Steps
Set a model name when creating LiveWav2Vec2; the README provides English and German examples.
Call start() to begin recognition.
Read text, sample length and inference time using get_last_text() in a loop.
Call stop() when ending the loop.
Expected outcome
The Python workflow exposes recognized text together with sample length and inference time; model files are downloaded on first execution.
Guide limitations
- The example handles KeyboardInterrupt to stop recognition.
- Microphone capture relies on the system default audio device.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- oliverguhr/wav2vec2-live · Official homepage title · retained in its source language

