EveryVoiceTTS fork of monotonic_align
We forked https://github.com/resemble-ai/monotonic_align in order to publish it to PyPI so that it can be installed without requiring a clone:
pip install ilt-monotonic-align
Original README file from resemble-ai:
Adapted from the MAS in Glow-TTS. I made it installable and added variants.
Installation
pip install git+https://github.com/resemble-ai/monotonic_align.git
Installing monotonic_align doesn't require torch, but using monotonic_align will.
Please install PyTorch yourself, as its installation differ from system to system.
How to Use
# Suppose you have:
# 1. a probability matrix of size (batch_size=B, symbol_len=S, mel_lens=T)
# NOTE: a similarity matrix (a higher score means better) or negative cost will do
# but may have issues.
# 2. an array of symbol lengths `symbol_lens` of size (batch_size=B)
# 3. an array of mel-spectrogram lengths `mel_lens` of size (batch_size=B)
from monotonic_align import mask_from_lens, maximum_path
mask_ST = mask_from_lens(similarity, symbol_lens, mel_lens)
alignment = maximum_path(similarity, mask_ST) # (B, S, T)
# NOTE:
# - If `mask` is not specified, the default mask is `True` for all elements.
# - You can specify `topology` if you want to use other variants of alignment algorithms.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ilt_monotonic_align-1.2.1.tar.gz
(606.7 kB
view details)
File details
Details for the file ilt_monotonic_align-1.2.1.tar.gz.
File metadata
- Download URL: ilt_monotonic_align-1.2.1.tar.gz
- Upload date:
- Size: 606.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db7b5cfb8be76a24655ff75484fae3f8819370f1ab5184e9e64d0681906549e4
|
|
| MD5 |
ad3a6048b8950f0bc1cfde85a21bf9c3
|
|
| BLAKE2b-256 |
f6bb6226f2f506b8f05f670d440c87e212d1eeba0b16e76cf806822bf2542389
|