{"id":28074239,"url":"https://github.com/resemble-ai/monotonic_align","last_synced_at":"2025-05-12T23:32:57.875Z","repository":{"id":40434084,"uuid":"396695519","full_name":"resemble-ai/monotonic_align","owner":"resemble-ai","description":"Monotonic Alignment Search","archived":false,"fork":false,"pushed_at":"2022-09-06T08:55:11.000Z","size":9,"stargazers_count":91,"open_issues_count":2,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-19T20:58:55.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Cython","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/resemble-ai.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}},"created_at":"2021-08-16T08:25:48.000Z","updated_at":"2025-04-10T05:55:43.000Z","dependencies_parsed_at":"2022-08-09T20:20:38.020Z","dependency_job_id":null,"html_url":"https://github.com/resemble-ai/monotonic_align","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resemble-ai%2Fmonotonic_align","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resemble-ai%2Fmonotonic_align/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resemble-ai%2Fmonotonic_align/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resemble-ai%2Fmonotonic_align/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/resemble-ai","download_url":"https://codeload.github.com/resemble-ai/monotonic_align/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253840991,"owners_count":21972574,"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":[],"created_at":"2025-05-12T23:32:23.223Z","updated_at":"2025-05-12T23:32:57.862Z","avatar_url":"https://github.com/resemble-ai.png","language":"Cython","funding_links":[],"categories":[],"sub_categories":[],"readme":"Adapted from the MAS in [Glow-TTS](https://github.com/jaywalnut310/glow-tts/tree/master/monotonic_align). I made it installable and added variants.\n\n# Installation\n```\npip install git+https://github.com/resemble-ai/monotonic_align.git\n```\nInstalling `monotonic_align` doesn't require torch, but using ``monotonic_align`` will.\nPlease install PyTorch yourself, as its installation differ from system to system.\n\n\n# How to Use\n```python\n# Suppose you have:\n# 1. a probability matrix of size (batch_size=B, symbol_len=S, mel_lens=T)\n#    NOTE: a similarity matrix (a higher score means better) or negative cost will do\n#          but may have issues.\n# 2. an array of symbol lengths `symbol_lens` of size (batch_size=B)\n# 3. an array of mel-spectrogram lengths `mel_lens` of size (batch_size=B)\n\nfrom monotonic_align import mask_from_lens, maximum_path\nmask_ST = mask_from_lens(similarity, symbol_lens, mel_lens)\nalignment = maximum_path(similarity, mask_ST)  # (B, S, T)\n\n# NOTE:\n# - If `mask` is not specified, the default mask is `True` for all elements.\n# - You can specify `topology` if you want to use other variants of alignment algorithms.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresemble-ai%2Fmonotonic_align","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresemble-ai%2Fmonotonic_align","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresemble-ai%2Fmonotonic_align/lists"}