{"id":13589149,"url":"https://github.com/seanghay/kfa","last_synced_at":"2025-07-13T04:32:18.944Z","repository":{"id":223163651,"uuid":"758361966","full_name":"seanghay/kfa","owner":"seanghay","description":"A fast Khmer Forced Aligner powered by Wav2Vec2CTC and Phonetisaurus","archived":false,"fork":false,"pushed_at":"2024-05-02T03:27:29.000Z","size":10635,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T06:43:04.263Z","etag":null,"topics":["alignment","cambodia","forced-alignment","khmer","wav2vec2"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/kfa","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/seanghay.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}},"created_at":"2024-02-16T06:37:09.000Z","updated_at":"2024-11-21T11:08:10.000Z","dependencies_parsed_at":"2024-05-02T04:42:34.610Z","dependency_job_id":"ec72c732-2af9-4580-9c5d-65519e4e411c","html_url":"https://github.com/seanghay/kfa","commit_stats":null,"previous_names":["seanghay/kfa"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/seanghay/kfa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanghay%2Fkfa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanghay%2Fkfa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanghay%2Fkfa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanghay%2Fkfa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seanghay","download_url":"https://codeload.github.com/seanghay/kfa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanghay%2Fkfa/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265088850,"owners_count":23709595,"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","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":["alignment","cambodia","forced-alignment","khmer","wav2vec2"],"created_at":"2024-08-01T16:00:24.014Z","updated_at":"2025-07-13T04:32:15.769Z","avatar_url":"https://github.com/seanghay.png","language":"Python","funding_links":[],"categories":["Projects","Awesome Khmer Language"],"sub_categories":["Khmer AI Projects","2. Toolkit"],"readme":"## KFA\n\n[[Google Colab]](https://colab.research.google.com/drive/1-aRxWOzqqsL7Qbgp95dlwN-_cvI41INf?usp=sharing)\n\nA fast Khmer Forced Aligner powered by **Wav2Vec2CTC** and **Phonetisaurus**.\n\n- [ ] Built-in Speech Enhancement\n- [x] Word-level Alignment\n\n```shell\npip install kfa\n```\n\n#### CLI\n\n\u003e [!Note]\n\u003e `audio.wav` Input audio sample rate should be in 16kHz. Use ffmpeg or any other tools to resample the audio before processing.\n\u003e\n\u003e `ffmpeg -i audio_orig.wav -ac 1 -ar 16000 audio.wav`\n\n\n```shell\nkfa -a audio.wav -t text.txt -o alignments.jsonl\n\n# Output as Whisper style JSON format\nkfa -a audio.wav -t text.txt --format whisper -o alignments.json\n```\n\n#### Python\n\n\n```python\nfrom kfa import align, create_session\nimport librosa\n\nwith open(\"test.txt\") as infile:\n    text = infile.read()\n\ny, sr = librosa.load(\"text.wav\", sr=16000, mono=True)\nsession = create_session()\n\nfor alignment in align(y, sr, text, session=session):\n  print(alignment)\n```\n\n#### References\n\n- [MMS: Scaling Speech Technology to 1000+ languages](https://github.com/facebookresearch/fairseq/tree/main/examples/mms)\n- [CTC FORCED ALIGNMENT API TUTORIAL](https://pytorch.org/audio/main/tutorials/ctc_forced_alignment_api_tutorial.html)\n- [Phonetisaurus](https://github.com/AdolfVonKleist/Phonetisaurus)\n- [Fine-Tune Wav2Vec2 for English ASR with 🤗 Transformers](https://huggingface.co/blog/fine-tune-wav2vec2-english)\n- [Thai Wav2vec2 model to ONNX model](https://pythainlp.github.io/tutorials/notebooks/thai_wav2vec2_onnx.html)\n\n\n#### License\n\n`Apache-2.0`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanghay%2Fkfa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanghay%2Fkfa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanghay%2Fkfa/lists"}