Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whisper_transcriber-0.1.2-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

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

Hashes for whisper_transcriber-0.1.2.tar.gz
Algorithm Hash digest
SHA256 96f98330301a789e94a4dce644739fd299f985a0364eecbf651d567914036a16
MD5 d7813cf7aaf6dbf1267e69f2e83757cc
BLAKE2b-256 bef890b52b308be3515212b50067ec9799407dc9326530fa43d140aac6593818

See more details on using hashes here.

File details

Details for the file whisper_transcriber-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for whisper_transcriber-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9ad16d01cddd7944a778fc81052946e92aa7f5625fb689196ba0c8d0f505813b
MD5 a3c0158bae516dee35c1419fc7045475
BLAKE2b-256 49d3a85d54df02f27bf27cb2430815bfb978bb8ff48544beef58b362e57f0a1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page