quinten-kamphuis / forced-alignment

Align text to audio with exact word timings. All characters supported!

  • Public
  • 14.4K runs
  • GitHub
  • License

Run time and cost

This model costs approximately $0.00022 to run on Replicate, or 4545 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia T4 GPU hardware. Predictions typically complete within 1 seconds.

Readme

Forced Audio-Text Alignment

This model generates precise word-level timings from audio and text input. Feed it an audio file and its transcript, and it returns the exact timing for each word.

Example Output

[
    {
        "word": "The",
        "start": 0.0,
        "end": 0.16
    },
    {
        "word": "whole",
        "start": 0.16,
        "end": 0.32
    },
    {
        "word": "city",
        "start": 0.32,
        "end": 0.64
    }
]

Built using torchaudio’s MMS model. Supports various audio formats and includes fallback mechanisms for robust production use.