Sawalign
Align a reviewed transcript to an audio recording. Get word timings and SRT captions through Sawalni API.
pip install sawalign
export SAWALNI_API_KEY="your-key"
from pathlib import Path
from sawalign import Sawalign
text = Path("transcript.txt").read_text(encoding="utf-8")
with Sawalign() as client:
job = client.submit("interview.wav", text)
print(job["job_id"]) # Keep this ID so you can resume without uploading again.
result = client.wait(job["job_id"])
words = result.get("words_so_far", [])
Path("captions.srt").write_text(client.srt(job["job_id"]), encoding="utf-8")
Sawalign places the supplied words on the timeline. It does not transcribe the audio recording. Review the transcript before submitting it. For the full transcription workflow, see the Python and TypeScript starter.
Flow
flowchart LR
A[Audio recording] --> C[Sawalign API]
B[Reviewed transcript] --> C
C --> D[Job ID]
D --> E[Word timings]
D --> F[SRT captions]
Command line
sawalign align interview.wav --text transcript.txt --output captions.srt
Submit separately to keep the job ID:
sawalign submit interview.wav --text transcript.txt
sawalign status JOB_ID
sawalign wait JOB_ID
sawalign srt JOB_ID > captions.srt
Client
submit(audio, text)uploads once and returns the job.status(job_id)returns its current state and available words.wait(job_id, timeout=600, poll_interval=2)waits for completion.srt(job_id)retrieves SRT captions.align(audio, text)submits and waits in one call.
AlignmentTimeout.job_id lets you resume a timed-out wait. AlignmentFailed.job contains the terminal response. HTTP errors use httpx.HTTPStatusError; transport errors use httpx.RequestError. Uploads are not retried automatically. After an uncertain upload, check the service before submitting again.
Audio recording limit: 128 MiB. Transcript limit: 1,000,000 UTF-8 bytes. Keep the API key in a server environment. The package sends data to Sawalni; it does not run the model locally.
Python 3.10 or later. MIT license.
Metadata
Release files for sawalign 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sawalign-0.1.0.tar.gz | 6.3 kB | With provenance | Details for sawalign-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sawalign-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for sawalign-0.1.0-py3-none-any.whl |
Total release size: 12.4 kB
Release files / sawalign-0.1.0.tar.gz
| Download URL | sawalign-0.1.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6b49d34985fef7dcae655190bfeaf9ead1a94bfa5ec5a1b8949061d1bb2ad47
|
|
BLAKE2b-256 checksum How to use checksums |
5090c2f390b04de0adebd5f07bb51fd5738b422058e16cff1fbbd7f0b09392d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / sawalign-0.1.0-py3-none-any.whl
| Download URL | sawalign-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41b588a5d809da2dfff514a00782068fedc8069a8e5360faaa4570aa929aeaf1
|
|
BLAKE2b-256 checksum How to use checksums |
c22e38d452a01399536c877b2b9d5ff0f4a545c94fb720ac6b7ca35722dcd216
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logSecurity for sawalign 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sawalign-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.