Transcriber
A flexible Python package for transcribing audio and video from various sources (SoundCloud, YouTube, or local files) into multiple text formats (txt, docx, srt). The transcriber supports multiple speech recognition models (defaulting to Whisper "large-v3"). It leverages GPU acceleration for faster processing and utilizes concurrency through async and multiprocessing to improve performance.
Features
- Multiple Input Sources: Transcribe from SoundCloud, YouTube, or local audio/video files
- Multiple Models: Support for both
faster-whisperand standardwhispermodels - GPU Acceleration: Utilize GPU processing for faster transcription
- Concurrent Processing: Batch processing and VAD filtering for improved performance
- Various Output Formats: Export transcriptions to multiple formats
- Progress Tracking: Rich progress bars showing transcription status
- Configurable: Extensive configuration options via environment variables or settings
Requirements
- Python 3.11 or higher
- GPU support (optional but recommended for better performance)
Installation
-
Install the package from PyPI:
uv pip install Transcriber
Configuration
-
Copy the example environment file:
cp .env.example .env
-
Configure the settings in
.env:# Input settings INPUT__URLS_OR_PATHS=["Audio_To_Transcribe"] INPUT__SKIP_IF_OUTPUT_EXIST=false # Output settings OUTPUT__OUTPUT_FORMATS=["all"] OUTPUT__OUTPUT_DIR="Transcripts" # Whisper model settings WHISPER__LANGUAGE="ar" # Logging settings LOGGING__LOG_LEVEL="DEBUG" LOGGING__ENABLE_LOGFIRE=true LOGGING__LOGFIRE_TOKEN="<your_logfire_token>"
Usage
Basic Usage
from Transcriber.transcriber import transcribe
# Configure the transcriber via .env or parameters, then:
transcribe(
urls_or_paths=["path/to/audio.mp3", "https://youtube.com/watch?v=example"],
output_dir="Transcripts",
output_formats=["txt", "srt"],
language="ar",
log_level="INFO",
enable_logfire=True, # Optional
logfire_token="<your_logfire_token>" # Optional, you can get it from https://logfire.pydantic.dev/login
)
Command Line Usage
uv run --with Transcriber transcribe
Example Configuration
# Example settings in your .env file
INPUT__URLS_OR_PATHS=["path/to/audio.mp3", "https://youtube.com/watch?v=example"]
OUTPUT__OUTPUT_FORMATS=["txt", "srt"]
WHISPER__LANGUAGE="en"
Acknowledgments
Metadata
Release files for Transcriber 0.1.19
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| transcriber-0.1.19.tar.gz | 79.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| transcriber-0.1.19-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 101.5 kB
Release files / transcriber-0.1.19.tar.gz
| Download URL | transcriber-0.1.19.tar.gz |
|---|---|
| Size | 79.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24017ad2940be8cd1ef5fd0193dcdfdb71a465fa48a40dffa7321fe1b6a13760
|
|
BLAKE2b-256 checksum How to use checksums |
af2f5ec0710f0a101349861578483fff4531b6bd52cabf58d535e9eb4eb533b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.10
|
Release files / transcriber-0.1.19-py3-none-any.whl
| Download URL | transcriber-0.1.19-py3-none-any.whl |
|---|---|
| Size | 21.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd1b7ca5993c02513c3b90e28749c8400cbef3c4a0152bc88f4820d5a2a3a18c
|
|
BLAKE2b-256 checksum How to use checksums |
339821de96b9bb61ce01841d1b2eb409fe03b1913c50547a2a9b12bab68a7d38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.10
|