Metadata-Version: 2.2
Name: whisper_transcriber
Version: 0.1.1
Summary: A library for transcribing audio files using Whisper models
Home-page: https://github.com/COILDOrg/whisper-transcriber
Author: Ranjan Shettigar
Author-email: theloko.dev@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: torch<2.1.0,>=1.7.0
Requires-Dist: numpy<2.0.0,>=1.19.0
Requires-Dist: tqdm<5.0.0,>=4.64.0
Requires-Dist: librosa<0.10.0,>=0.9.2
Requires-Dist: transformers<4.30.0,>=4.26.0
Requires-Dist: huggingface_hub<0.16.0,>=0.12.0
Requires-Dist: regex>=2022.10.31
Requires-Dist: pathlib>=1.0.1
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Whisper Transcriber

A Python library for transcribing audio files using Whisper models with intelligent silence detection and segmentation.

## Installation

```bash
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

```bash
# 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

```python
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
