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 loko99/whisper_small_kannada --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.0.tar.gz
(10.3 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.0.tar.gz.
File metadata
- Download URL: whisper_transcriber-0.1.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbbbbc13064f1f47a3fe7c17b08771b8dac13c16048f83a7db7a370793673b93
|
|
| MD5 |
ce2c39178f0f9828f5e07ca1b29354d9
|
|
| BLAKE2b-256 |
7040a6e3920e41c7e3414a548a05d6c367aede5786e646771115853f67c9d004
|
File details
Details for the file whisper_transcriber-0.1.0-py3-none-any.whl.
File metadata
- Download URL: whisper_transcriber-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.4 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 |
c395564c22a14d368cea1c5d65aa3ddc2783556b67d5a054295ea65cee842220
|
|
| MD5 |
1d82e3d89eaed7ca864189f85e4d18d8
|
|
| BLAKE2b-256 |
17bbaf7fee73095c5b7d30f43e4591c24b5dab4412c28ae064fc9b0d9cac1ce2
|