Skip to main content

Aligner - PyTorch

Project description

Aligner - PyTorch

Sequence alignement methods with helpers for PyTorch.

Install

pip install aligner-pytorch

PyPI - Python Version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aligner-pytorch-0.0.13.tar.gz (106.3 kB view details)

Uploaded Source

Built Distribution

aligner_pytorch-0.0.13-cp39-cp39-macosx_12_0_arm64.whl (58.8 kB view details)

Uploaded CPython 3.9 macOS 12.0+ ARM64

File details

Details for the file aligner-pytorch-0.0.13.tar.gz.

File metadata

  • Download URL: aligner-pytorch-0.0.13.tar.gz
  • Upload date:
  • Size: 106.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for aligner-pytorch-0.0.13.tar.gz
Algorithm Hash digest
SHA256 3e05f1a090b3e63e4444259534f60ad3f84a63b2cf5e1a3a1898f46f9734f4c2
MD5 931f8350e03c729a3f1c2186ae46044a
BLAKE2b-256 7dd92d6bd344f3e86273e8dd34f1c3a9120f79c3301bc73ba0cc08bafd16ff1c

See more details on using hashes here.

File details

Details for the file aligner_pytorch-0.0.13-cp39-cp39-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for aligner_pytorch-0.0.13-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 4577aafcf427397ab916769722421459dd16559e6fa9e44d5546dd1c0c058eb6
MD5 e1f70dac2ebe3a873d5e5c6a83347114
BLAKE2b-256 48e69583add9d757254b82d3145865b02bbeba6bea68a238f3e4d5fae901e211

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page