Aligner - PyTorch
Project description
Aligner - PyTorch
Sequence alignement methods with helpers for PyTorch.
Install
pip install aligner-pytorch
Usage
MAS
MAS (Monotonic Alignment Search) from GlowTTS. This can be used to get the alignment of any (similarity) matrix. Implementation in optimized Cython.
from aligner_pytorch import mas
sim = torch.rand(1, 4, 6) # [batch_size, m_rows, n_cols]
alignment = mas(sim)
"""
sim = tensor([[
[0.2, 0.8, 0.9, 0.9, 0.9, 0.4],
[0.6, 0.8, 0.9, 0.7, 0.1, 0.4],
[1.0, 0.4, 0.4, 0.2, 1.0, 0.7],
[0.1, 0.3, 0.1, 0.7, 0.6, 0.9]
]])
alignment = tensor([[
[1, 0, 0, 0, 0, 0],
[0, 1, 1, 1, 0, 0],
[0, 0, 0, 0, 1, 0],
[0, 0, 0, 0, 0, 1]
]], dtype=torch.int32)
"""
Citations
Monotonic Alignment Search
@misc{2005.11129,
Author = {Jaehyeon Kim and Sungwon Kim and Jungil Kong and Sungroh Yoon},
Title = {Glow-TTS: A Generative Flow for Text-to-Speech via Monotonic Alignment Search},
Year = {2020},
Eprint = {arXiv:2005.11129},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file aligner_pytorch-0.0.11-cp39-cp39-macosx_12_0_arm64.whl
.
File metadata
- Download URL: aligner_pytorch-0.0.11-cp39-cp39-macosx_12_0_arm64.whl
- Upload date:
- Size: 58.8 kB
- Tags: CPython 3.9, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a72d3c1ee8e16369477f68e8a5a4a6f3fcdc6571e55170e1d06686de22a7481 |
|
MD5 | 5048542eddd1a04adbb6e734735d3547 |
|
BLAKE2b-256 | 25084534d7d8177e2894f2403086242d67cee6ffccb6bcb6f3c2161913df2a10 |