soniox-transcribe
CLI tool for generating subtitles from audio/video files using the Soniox Speech-to-Text API.
Features
- Subtitle formats: SRT, VTT, TXT
- Video support: Automatically extracts audio from video files via ffmpeg
- Speaker diarization: Speaker labels enabled by default
- 60+ languages: With automatic language identification
- Context support: Custom terms and background text to improve accuracy (up to ~8,000 tokens)
Installation
pip install soniox-transcribe
For video file support, ffmpeg must be installed:
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg
Configuration
Set your Soniox API key as an environment variable:
export SONIOX_API_KEY=<your-api-key>
Get your API key at console.soniox.com.
Alternatively, create a .env file in your working directory:
SONIOX_API_KEY=<your-api-key>
Usage
# Basic transcription (outputs .srt by default)
soniox-transcribe video.mp4
# Specify output file (format inferred from extension)
soniox-transcribe video.mp4 -o video.vtt
# Explicit format
soniox-transcribe audio.wav -f txt
# Transcribe from URL
soniox-transcribe --url https://example.com/audio.mp3
# Disable speaker diarization
soniox-transcribe interview.wav --no-speaker
# Add custom vocabulary
soniox-transcribe lecture.mp3 -t "Transformer" -t "BERT" -t "GPT"
# Provide background text for better accuracy
soniox-transcribe meeting.mp3 --context-text "Discussion about Q4 revenue targets"
# Use a context file
soniox-transcribe meeting.mp3 --context-text-file agenda.txt
Options
| Option | Description |
|---|---|
-o, --output |
Output file path (default: input with .srt extension) |
-f, --format |
Output format: srt, vtt, txt |
-u, --url |
Transcribe from a public URL instead of a local file |
-l, --language |
Language hints (default: zh, en); repeatable |
--no-speaker |
Disable speaker diarization and labels |
--max-chars |
Max characters per subtitle line (default: 42) |
-m, --model |
Soniox model (default: stt-async-v4) |
-t, --context-term |
Custom terms/vocabulary; repeatable |
--context-text |
Background text for accuracy improvement |
--context-text-file |
File containing background text |
-c, --context |
JSON string with full context configuration |
--context-file |
JSON file with full context configuration |
Supported Formats
Audio: mp3, wav, flac, aac, ogg, m4a, wma
Video: mp4, mkv, avi, mov, webm, flv, wmv, m4v (requires ffmpeg)
License
Metadata
Release files for soniox-transcribe 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 |
|---|---|---|---|---|
| soniox_transcribe-0.1.0.tar.gz | 10.2 kB | Without provenance | Details for soniox_transcribe-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| soniox_transcribe-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for soniox_transcribe-0.1.0-py3-none-any.whl |
Total release size: 23.3 kB
Release files / soniox_transcribe-0.1.0.tar.gz
| Download URL | soniox_transcribe-0.1.0.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
624f67c1830ab98180e526f91752159300dadcad27a5cef81a741ecd6c7347a9
|
|
BLAKE2b-256 checksum How to use checksums |
f98c8734173658e38207f7ca81315253d3cf781d1a5a5463f439bc6f7ea50b0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|
Release files / soniox_transcribe-0.1.0-py3-none-any.whl
| Download URL | soniox_transcribe-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1450b47cc2e689c362c9514381d4811d22a96d5bb65ceaaa655a665cca6619f6
|
|
BLAKE2b-256 checksum How to use checksums |
7db63648dfff1a64f0da6eea79632459964fb4a2b786815e8b7c37d5e95744fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|
Security for soniox-transcribe 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.