{"id":19067068,"url":"https://github.com/imvladikon/wav2vec2-hebrew","last_synced_at":"2025-09-23T04:07:27.794Z","repository":{"id":92776007,"uuid":"451910232","full_name":"imvladikon/wav2vec2-hebrew","owner":"imvladikon","description":"Speech Recognition for Hebrew (using wav2vec2 models)","archived":false,"fork":false,"pushed_at":"2023-05-08T07:12:02.000Z","size":216,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T12:40:02.000Z","etag":null,"topics":["hebrew","speech-recognition"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imvladikon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2022-01-25T14:29:21.000Z","updated_at":"2025-07-18T19:49:34.000Z","dependencies_parsed_at":"2025-05-28T10:07:59.206Z","dependency_job_id":"ac1d917c-3d55-4b01-b0cc-6df8f2561d4d","html_url":"https://github.com/imvladikon/wav2vec2-hebrew","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imvladikon/wav2vec2-hebrew","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imvladikon%2Fwav2vec2-hebrew","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imvladikon%2Fwav2vec2-hebrew/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imvladikon%2Fwav2vec2-hebrew/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imvladikon%2Fwav2vec2-hebrew/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imvladikon","download_url":"https://codeload.github.com/imvladikon/wav2vec2-hebrew/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imvladikon%2Fwav2vec2-hebrew/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276512977,"owners_count":25655500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["hebrew","speech-recognition"],"created_at":"2024-11-09T00:59:03.189Z","updated_at":"2025-09-23T04:07:27.759Z","avatar_url":"https://github.com/imvladikon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Hebrew Speech Recognition with Wav2Vec2\n\n\n## Usage\n\n### Without package installation (using `transformers` library)\n\n\n```python\nfrom transformers import (\n    AutomaticSpeechRecognitionPipeline,\n    AutoFeatureExtractor,\n    Wav2Vec2ForCTC,\n    AutoTokenizer\n)\n\npretrained_model_name_or_path = \"imvladikon/wav2vec2-xls-r-300m-hebrew\"\nasr = AutomaticSpeechRecognitionPipeline(\n    feature_extractor=AutoFeatureExtractor.from_pretrained(\n        pretrained_model_name_or_path\n    ),\n    model=Wav2Vec2ForCTC.from_pretrained(\n        pretrained_model_name_or_path\n    ),\n    tokenizer=AutoTokenizer.from_pretrained(\n        pretrained_model_name_or_path\n    ))\nfilename = \"audio.wav\"\nprint(asr(filename))\n```\nChunking file into smaller chunks is not implemented yet. \n\n### With package installation\n\n```bash\npip install git+https://github.com/imvladikon/wav2vec2-hebrew\n```\n\n#### Speech recognition\n\n```python\nfrom wav2vec2_hebrew import HebrewSpeechRecognitionPipeline\n\nasr = HebrewSpeechRecognitionPipeline()\nfilename = \"./samples/bereshit011.wav\"\noutput = asr(filename)\nprint(output)\n# [{'text': 'בראשית ברא אלוהים את השמייים ואת הארץ'}]\n```\n\n#### Alignment\n```python\nimport torchaudio\nfrom wav2vec2_hebrew import HebrewWav2Vec2Aligner\n\nfilename = \"./samples/bereshit011.wav\"\ntext = \"בראשית ברא אלוהים את השמיים ואת הארץ\"\naligner = HebrewWav2Vec2Aligner(input_sample_rate=16000, use_cuda=True)\n# aligning segments to text (sentences)\nfirst_sentence = aligner.align_data(filename, text)[0]\n# {'sentence': 'בראשית ברא אלוהים את השמיים ואת הארץ', \n#  'segments': [Segment(label='בראשית', start=6750.516853932584, end=18644.284644194755, score=0.16025335497152965)...]}\n\n# showing in IPython (notebook)\nwaveform, sample_rate = torchaudio.load(filename)\naligner.show_segments(waveform, first_sentence)\n# showing segments using IPython.display.Audio\n```\n\n## Training process\n\nTraining logs and details are available in the [train](train) folder.\n\n### Datasets   \n\n* https://huggingface.co/datasets/imvladikon/hebrew_speech_kan   \n* https://huggingface.co/datasets/imvladikon/hebrew_speech_coursera   \n\n### Weights\n\n* [imvladikon/wav2vec2-xls-r-300m-hebrew](https://huggingface.co/imvladikon/wav2vec2-xls-r-300m-hebrew)\n* [imvladikon/wav2vec2-xls-r-300m-lm-hebrew](https://huggingface.co/imvladikon/wav2vec2-xls-r-300m-lm-hebrew)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimvladikon%2Fwav2vec2-hebrew","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimvladikon%2Fwav2vec2-hebrew","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimvladikon%2Fwav2vec2-hebrew/lists"}