Skip to main content

Audio Text Alignment Visualization Tool

Project description

SpeechAlignViz 🎙️📝

SpeechAlignViz is a web-based visualization tool for audio-text alignment. (🤗 Hugging Face) 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

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.1.tar.gz (12.3 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.1-py3-none-any.whl (95.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for speech_align_viz-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f824afe9e475147ea81f2039b5aebef35f17ffa9a752f60fc79d688548976d70
MD5 4f564e36065c5488e9f01dc436013aef
BLAKE2b-256 b21f506dc6e8296ad1d72ecb77ac282d5cac1c4697887ab7ff91f434b5a0ce6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for speech_align_viz-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c5789a30ca1f4bd61c94a8bd5175d2b0421e7694e05ea246ecde341506f57bc
MD5 0f8fe1b43606b68274bc4873d752b6bf
BLAKE2b-256 017ed0274209f3cdbe9e9ac96481cc31bfc94e61237eabba26918be41c0267a3

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