A library for transcribing audio files using Whisper models
Project description
Whisper Transcriber
A Python library for transcribing audio files using Whisper models with intelligent silence detection and segmentation.
Installation
pip install whisper-transcriber
Requirements
- Python 3.7 or higher
- ffmpeg and ffprobe installed on your system
Features
- Intelligent silence detection for natural segmentation
- Adaptive audio analysis for optimal threshold detection
- High-quality transcription using Whisper models
- Support for various audio formats
- SRT subtitle output
Usage
Command Line
# Basic usage
whisper-transcribe audio_file.mp3
# Advanced usage
whisper-transcribe audio_file.mp3 --model openai/whisper-smal --output transcript.srt --min-segment 3 --max-segment 12
Python Library
from whisper_transcriber import WhisperTranscriber
# Initialize the transcriber
transcriber = WhisperTranscriber(model_name="openai/whisper-small", hf_token="YOUR_HF_TOKEN")
# Transcribe an audio file
results = transcriber.transcribe(
"audio_file.mp3",
output="transcript.srt",
min_segment=5,
max_segment=15,
normalize_text=True
)
# Access the transcription results
for i, segment in enumerate(results):
print(f"Segment {i+1}: {segment['transcript']}")
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
whisper_transcriber-0.1.2.tar.gz
(13.1 kB
view details)
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 whisper_transcriber-0.1.2.tar.gz.
File metadata
- Download URL: whisper_transcriber-0.1.2.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96f98330301a789e94a4dce644739fd299f985a0364eecbf651d567914036a16
|
|
| MD5 |
d7813cf7aaf6dbf1267e69f2e83757cc
|
|
| BLAKE2b-256 |
bef890b52b308be3515212b50067ec9799407dc9326530fa43d140aac6593818
|
File details
Details for the file whisper_transcriber-0.1.2-py3-none-any.whl.
File metadata
- Download URL: whisper_transcriber-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ad16d01cddd7944a778fc81052946e92aa7f5625fb689196ba0c8d0f505813b
|
|
| MD5 |
a3c0158bae516dee35c1419fc7045475
|
|
| BLAKE2b-256 |
49d3a85d54df02f27bf27cb2430815bfb978bb8ff48544beef58b362e57f0a1f
|