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.1.tar.gz
(13.2 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.1.tar.gz.
File metadata
- Download URL: whisper_transcriber-0.1.1.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53402246edb49d4ff1463d306eb0984f82c2bf35e2436429d49c1a103c4ee61f
|
|
| MD5 |
5544e8a0869b02c4d74ac064ba76d9a0
|
|
| BLAKE2b-256 |
b208e7604852b22c84583daa3a0fc7370e39cf6ab84550706219ed727cd1bb7e
|
File details
Details for the file whisper_transcriber-0.1.1-py3-none-any.whl.
File metadata
- Download URL: whisper_transcriber-0.1.1-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 |
1ffe9bc95b91c6779c967f8429c13942cbed44b49fb892c13ce8a12ce0ef2afd
|
|
| MD5 |
ec1cf85e28f5b3fcda2727fc3e1a3f9e
|
|
| BLAKE2b-256 |
f36a3b4f9c08b291168138f129c94d0f51824eff11bb7994f4e36d1d736c010a
|