Skip to main content

Audio Text Alignment Visualization Tool

Project description

SpeechAlignViz 🎙️📝

SpeechAlignViz is a web-based visualization tool for audio-text alignment. It allows researchers and developers to verify and interact with speech transcription segments (SRT, VTT, TextGrid, JSON) directly on the audio waveform.

SpeechAlignViz Logo

Features

  • Unified Waveform View: View text segments directly on the audio timeline.
  • Multi-Format Support:
    • JSON: custom format [{text, start_time, end_time}]
    • SRT: SubRip Subtitle files
    • WebVTT: Web Video Text Tracks
    • TextGrid: Praat annotation files
  • Interactive Control:
    • Click any segment to play its corresponding audio.
    • Zoom in/out for precise alignment checks.
    • Automatic audio-text synchronization.
  • Local & Upload Support: Load files from your local filesystem or upload them directly via the browser.

Demo

Installation

From PyPI (Coming soon!)

pip install speech-align-viz

From Source

git clone https://github.com/LoganLiu66/SpeechAlignViz.git
cd SpeechAlignViz
pip install -e .

Usage

Start the server using the CLI:

speech-align-viz serve --port 8001 --host 0.0.0.0

Then open http://0.0.0.0:8001 in your browser.

CLI Figure Export

You can generate a static alignment figure directly from the command line:

speech-align-viz export \
  --audio ./examples/example.wav \
  --subtitle ./examples/example.json \
  --output-fig ./examples/example.png

Note: The figure width is automatically calculated based on audio length to prevent overcrowding, but you can override it with --width N.

Loading Data

  1. Audio: Upload an audio file (mp3, wav, ogg) or provide a local path.
  2. Transcript: Upload a support transcript file (.json, .srt, .vtt, .TextGrid) or provide a local path.

Development

The project structure is split into:

  • src/speech_align_viz: FastAPI backend and CLI.
  • frontend: React + Vite + WaveSurfer.js frontend.

To build the frontend:

cd frontend
npm run build

This will bundle the frontend into src/speech_align_viz/static.

License

MIT

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

speech_align_viz-0.1.0.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

speech_align_viz-0.1.0-py3-none-any.whl (94.9 kB view details)

Uploaded Python 3

File details

Details for the file speech_align_viz-0.1.0.tar.gz.

File metadata

  • Download URL: speech_align_viz-0.1.0.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for speech_align_viz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4a40cd2a75dbcf922ac4870ba9fa3a1576c232acb73119d20e57a703107427cd
MD5 da84739ee4d390bb8bb69123c47e395b
BLAKE2b-256 cfb86f7a38831f1390a352a7f16adce2f69cd316ce931fa7d71afd6063eff561

See more details on using hashes here.

File details

Details for the file speech_align_viz-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for speech_align_viz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6c53ca7f284876d4687c3e2d851e36950cdfb30af1335c18ec1551514ce526e
MD5 925bdb9f9d916e0103e5967766a4f38f
BLAKE2b-256 86fe940c9abb4f91420d990e9c1a418a6f15faf0cdca5e84810da6405aa6d0e4

See more details on using hashes here.

Supported by

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