{"library":"monotonic-alignment-search","title":"Monotonic Alignment Search","description":"Independent package implementing the monotonic alignment search algorithm from Glow-TTS for aligning text and speech. Currently at v0.2.1, supports PyTorch (CPU/GPU) and NumPy backends. Requires Python >=3.10.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install monotonic-alignment-search"],"cli":null},"imports":["from monotonic_alignment_search import maximum_path","from monotonic_alignment_search import maximum_path_numpy"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import torch\nfrom monotonic_alignment_search import maximum_path\n\n# Example: random hard attention (batch=1, 1 source, 5 target, no mask)\nattn_hard = torch.rand(1, 1, 1, 5).cumsum(3).round().long()\n# Perform MAS\npath = maximum_path(attn_hard, attn_hard.new_zeros(attn_hard.shape))\nprint(path.shape)  # torch.Size([1, 1, 1, 5])\n","lang":"python","description":"Perform monotonic alignment search on a random hard attention matrix using PyTorch.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}