{"id":13576862,"url":"https://github.com/oliverguhr/wav2vec2-live","last_synced_at":"2026-01-22T19:59:55.624Z","repository":{"id":40993327,"uuid":"358203431","full_name":"oliverguhr/wav2vec2-live","owner":"oliverguhr","description":"A live speech recognition using Facebooks wav2vec 2.0 model.","archived":false,"fork":false,"pushed_at":"2024-02-04T15:32:23.000Z","size":2978,"stargazers_count":348,"open_issues_count":5,"forks_count":56,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-05T09:34:08.810Z","etag":null,"topics":["asr","pyaudio","speech","speech-recognition","speech-to-text","wav2vec","wav2vec2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oliverguhr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-15T09:34:05.000Z","updated_at":"2025-04-05T03:10:57.000Z","dependencies_parsed_at":"2025-04-05T09:40:32.832Z","dependency_job_id":null,"html_url":"https://github.com/oliverguhr/wav2vec2-live","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oliverguhr/wav2vec2-live","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverguhr%2Fwav2vec2-live","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverguhr%2Fwav2vec2-live/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverguhr%2Fwav2vec2-live/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverguhr%2Fwav2vec2-live/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oliverguhr","download_url":"https://codeload.github.com/oliverguhr/wav2vec2-live/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverguhr%2Fwav2vec2-live/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28670215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T19:36:09.361Z","status":"ssl_error","status_checked_at":"2026-01-22T19:36:05.567Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asr","pyaudio","speech","speech-recognition","speech-to-text","wav2vec","wav2vec2"],"created_at":"2024-08-01T15:01:15.154Z","updated_at":"2026-01-22T19:59:55.606Z","avatar_url":"https://github.com/oliverguhr.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# automatic speech recognition with wav2vec2 \n\nUse any wav2vec model with a microphone.\n\n![demo gif](./docs/wav2veclive.gif)\n\n## Setup\n\nI recommend to install this project in a virtual environment.\n\n```\npython3 -m venv ./venv\nsource ./venv/bin/activate\npip install -r requirements.txt\n```\n\nDepending on linux distribution you might encounter an **error that portaudio was not found** when installing pyaudio. For Ubuntu you can solve that issue by installing the \"portaudio19-dev\" package.\n\n```\nsudo apt install portaudio19-dev\n```\n\nFinally you can test the speech recognition:\n\n```\npython live_asr.py\n```\n\n### Possible Issues:\n\n* The code uses the systems default audio device. Please make sure that you set your systems default audio device correctly. \n\n* \"*attempt to connect to server failed*\" you can safely ignore this message from pyaudio. It just means, that pyaudio can't connect to the jack audio server. \n\n\n## Usage\n\nYou can use any **wav2vec2** model from the [huggingface model hub](https://huggingface.co/models?pipeline_tag=automatic-speech-recognition\u0026search=wav2vec2). Just set the model name, all files will be downloaded on first execution.\n\n```python \nfrom live_asr import LiveWav2Vec2\n\nenglish_model = \"facebook/wav2vec2-large-960h-lv60-self\"\ngerman_model = \"maxidl/wav2vec2-large-xlsr-german\"\nasr = LiveWav2Vec2(german_model,device_name=\"default\")\nasr.start()\n\ntry:        \n    while True:\n        text,sample_length,inference_time = asr.get_last_text()                        \n        print(f\"{sample_length:.3f}s\"\n        +f\"\\t{inference_time:.3f}s\"\n        +f\"\\t{text}\")\n        \nexcept KeyboardInterrupt:   \n    asr.stop()  \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverguhr%2Fwav2vec2-live","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foliverguhr%2Fwav2vec2-live","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverguhr%2Fwav2vec2-live/lists"}