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.
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
- JSON: custom format
- 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.
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
- Audio: Upload an audio file (mp3, wav, ogg) or provide a local path.
- 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
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f824afe9e475147ea81f2039b5aebef35f17ffa9a752f60fc79d688548976d70
|
|
| MD5 |
4f564e36065c5488e9f01dc436013aef
|
|
| BLAKE2b-256 |
b21f506dc6e8296ad1d72ecb77ac282d5cac1c4697887ab7ff91f434b5a0ce6b
|
File details
Details for the file speech_align_viz-0.1.1-py3-none-any.whl.
File metadata
- Download URL: speech_align_viz-0.1.1-py3-none-any.whl
- Upload date:
- Size: 95.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c5789a30ca1f4bd61c94a8bd5175d2b0421e7694e05ea246ecde341506f57bc
|
|
| MD5 |
0f8fe1b43606b68274bc4873d752b6bf
|
|
| BLAKE2b-256 |
017ed0274209f3cdbe9e9ac96481cc31bfc94e61237eabba26918be41c0267a3
|