Skip to content

Latest commit

Β 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Whispr Logo Whispr - Open Source Transcription Studio

Python Flask Whisper License GPU

🎯 Transform speech to text with precision using OpenAI's Whisper technology. Fast, accurate, and completely private with local processing.


πŸ“‹ Table of Contents


✨ Features

πŸ”’ Privacy & Security

  • 100% Local Processing - No data leaves your computer
  • Private by Design - Audio files never uploaded to external servers
  • Secure Transcription - Perfect for confidential content

⚑ Performance

  • GPU Acceleration - Automatic CUDA detection and acceleration
  • CPU Fallback - Works on any system, optimized for available hardware
  • Real-time Progress - Live transcription progress with time estimates

🎡 Format Support

  • Audio Formats: MP3, WAV, FLAC, OGG, M4A
  • Video Formats: MP4, AVI, MOV
  • Export Options: TXT and SRT subtitle formats

🌟 Advanced Features

  • Multilingual Support - Automatic language detection
  • Word-level Timestamps - Precise timing information
  • Editable Transcripts - Modify results before export
  • Drag & Drop Interface - Intuitive file upload

πŸ“· Screenshots

Screenshots showing the web interface, progress tracking, and results

πŸ“Έ View More Screenshots

Full Page Overview


πŸ”§ Requirements

System Requirements

Component Minimum Recommended Notes
Python 3.8 3.9-3.11 Latest stable version preferred
RAM 4 GB 8+ GB More RAM allows larger models
Storage 2 GB 10+ GB For model downloads and temp files
GPU (Optional) - 4+ GB VRAM NVIDIA GPU with CUDA support

Model-Specific Requirements

πŸ“Š Click to view detailed model requirements
Model Parameters CPU Cores RAM GPU VRAM Relative Speed Best For
Tiny 39M Any 2 GB ~1 GB ~10x Quick drafts, low-resource systems
Base 74M 4+ 4 GB ~1 GB ~7x General transcription
Small 244M 6+ 6 GB ~2 GB ~4x Balanced accuracy/speed
Medium 769M 8+ 8 GB ~5 GB ~2x High accuracy needs
Large 1550M 12+ 16 GB ~10 GB 1x Maximum accuracy
Turbo 809M 8+ 12 GB ~6 GB ~8x Best balance of speed/accuracy

⚑ Quick Start

# 1. Clone the repository
git clone https://github.com/MohdYahyaMahmodi/whispr.git
cd whispr

# 2. Install dependencies
pip install -r requirements.txt

# 3. Run the application
python app.py

🌐 Open your browser and navigate to: http://localhost:5000


πŸ“¦ Installation

Prerequisites

Ensure you have Python 3.8+ installed on your system:

python --version
# Should return Python 3.8.x or higher

Step 1: Clone the Repository

git clone https://github.com/MohdYahyaMahmodi/whispr.git
cd whispr

Step 2: Create Virtual Environment (Recommended)

🐍 Python Virtual Environment
# Create virtual environment
python -m venv whispr-env

# Activate virtual environment
# On Windows:
whispr-env\Scripts\activate
# On macOS/Linux:
source whispr-env/bin/activate
πŸ‹ Conda Environment
# Create conda environment
conda create -n whispr python=3.9
conda activate whispr

Step 3: Install Dependencies

pip install --upgrade pip
pip install -r requirements.txt

Core Dependencies:

  • openai-whisper - Core Whisper functionality
  • flask - Web framework
  • torch - PyTorch for model execution
  • librosa - Audio processing
  • psutil - System information
  • requests - HTTP requests for model downloads

Step 4: GPU Setup (Optional but Recommended)

πŸš€ Enable GPU Acceleration

For NVIDIA GPUs with CUDA support:

# Check if CUDA is available
python gpu.py

# If CUDA is not detected, install PyTorch with CUDA support:
pip uninstall torch torchvision torchaudio
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

Verify GPU setup:

import torch
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"GPU name: {torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'N/A'}")

πŸš€ Usage

Starting the Application

# Navigate to the project directory
cd whispr

# Start the Flask development server
python app.py

The application will start on http://localhost:5000

Basic Workflow

  1. πŸ“ Upload File

    • Drag and drop audio/video file onto the upload area
    • Or click "Browse Files" to select manually
    • Supported formats: MP3, WAV, MP4, AVI, MOV, FLAC, OGG, M4A
  2. πŸ€– Select Model

    • Choose from 6 available Whisper models
    • Consider your hardware capabilities and accuracy needs
    • Turbo model recommended for best speed/accuracy balance
  3. βš™οΈ Configure Options (Optional)

    • Multilingual Detection: Auto-detect language
    • Word-level Timestamps: Include precise timing
    • Speaker Detection: Experimental speaker separation
  4. 🎬 Start Transcription

    • Click "Start Transcription"
    • Monitor real-time progress with console output
    • See estimated completion time
  5. πŸ“ Review & Export

    • Edit transcript if needed (fully editable)
    • Download as TXT or SRT format
    • Copy to clipboard functionality

Advanced Features

πŸ”§ Advanced Configuration

Model Auto-Selection

The app automatically detects your hardware and suggests compatible models:

  • βœ… Green: Fully compatible
  • ⚠️ Yellow: Compatible but may be slow
  • ❌ Red: Not recommended for your hardware

Progress Monitoring

  • Real-time Progress: Live percentage and estimated time
  • Console Output: Detailed processing logs
  • System Monitoring: GPU/CPU usage indicators

File Handling

  • File Validation: Automatic format and size checking
  • Size Limits: 500MB maximum file size
  • Batch Processing: Process multiple files (planned feature)

πŸ€– Available Models

Whispr supports all six OpenAI Whisper models, each optimized for different use cases:

Performance Comparison

Tiny    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 10x speed
Base    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 7x speed
Small   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 4x speed
Medium  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 2x speed
Turbo   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 8x speed
Large   β–ˆβ–ˆβ–ˆβ–ˆ 1x speed (highest accuracy)

Model Selection Guide

🎯 When to use each model

πŸš€ Tiny - Best for:

  • Quick rough transcripts
  • Resource-constrained systems
  • Real-time applications
  • Testing and development

⚑ Base - Best for:

  • General everyday transcription
  • Good balance of speed and accuracy
  • Most users' needs
  • Default choice for beginners

πŸ“Š Small - Best for:

  • Professional transcription needs
  • When accuracy matters more than speed
  • Business documentation
  • Podcasts and interviews

🎯 Medium - Best for:

  • High-accuracy requirements
  • Professional content creation
  • Legal or medical transcriptions
  • Important business meetings

πŸ† Large - Best for:

  • Maximum accuracy requirements
  • Critical professional content
  • Academic research
  • When every word counts perfectly

⚑ Turbo - Best for:

  • Production environments
  • Best overall choice
  • Optimized large-v3 performance
  • Recommended for most users

πŸ› οΈ Troubleshooting

Common Issues

❌ GPU Not Detected

Problem: Whispr shows "CPU Only Mode" despite having an NVIDIA GPU

Solutions:

  1. Check NVIDIA Drivers:

    nvidia-smi

    If this fails, update your NVIDIA drivers

  2. Reinstall PyTorch with CUDA:

    pip uninstall torch torchvision torchaudio
    pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
  3. Run GPU Diagnostic:

    python gpu.py
  4. Restart after driver installation

πŸ’Ύ Model Download Issues

Problem: Model download fails or is very slow

Solutions:

  1. Check internet connection and firewall settings

  2. Manual model download:

    import whisper
    model = whisper.load_model("base")  # Replace with desired model
  3. Clear model cache:

    • Delete the whisper_models folder and restart
  4. Use smaller model temporarily:

    • Switch to "tiny" or "base" for faster download
πŸ”Š Audio Processing Errors

Problem: "Error getting audio duration" or processing failures

Solutions:

  1. Install/Update FFmpeg:

    # Windows (using chocolatey)
    choco install ffmpeg
    
    # macOS (using homebrew)
    brew install ffmpeg
    
    # Ubuntu/Debian
    sudo apt update && sudo apt install ffmpeg
  2. Check audio file integrity:

    • Try a different audio file
    • Convert to WAV format as a test
  3. Update librosa:

    pip install --upgrade librosa
🚫 Permission Errors

Problem: Cannot write to uploads or transcripts folders

Solutions:

  1. Check folder permissions:

    # Create directories manually
    mkdir uploads transcripts whisper_models
    chmod 755 uploads transcripts whisper_models
  2. Run with appropriate permissions:

    • On Windows: Run terminal as Administrator
    • On macOS/Linux: Check file ownership and permissions
🌐 Web Interface Issues

Problem: Cannot access web interface or features not working

Solutions:

  1. Check if server is running:

    # Should show server startup messages
    python app.py
  2. Try different port:

    # In app.py, change the last line to:
    app.run(debug=True, host='0.0.0.0', port=5001)
  3. Clear browser cache and cookies

  4. Try different browser (Chrome, Firefox, Safari)

  5. Check firewall settings - ensure port 5000 is not blocked

Performance Optimization

⚑ Speed Up Transcription
  1. Use GPU acceleration (up to 10x faster than CPU)
  2. Choose appropriate model (Tiny/Base for speed, Medium/Large for accuracy)
  3. Close unnecessary applications to free up system resources
  4. Use SSD storage for faster file I/O
  5. Ensure adequate cooling to prevent thermal throttling

Getting Help

If you're still experiencing issues:

  1. Check the Issues page for similar problems
  2. Run the diagnostic script: python gpu.py and include output
  3. Provide system information: OS, Python version, GPU model
  4. Include error messages and steps to reproduce

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# Clone and install in development mode
git clone https://github.com/MohdYahyaMahmodi/whispr.git
cd whispr
pip install -e .

# Run tests
python -m pytest tests/

# Run with debug mode
export FLASK_ENV=development
python app.py

Areas for Contribution

  • 🌍 Additional language support
  • 🎀 Real-time transcription
  • πŸ“± Mobile interface improvements
  • πŸ”Š Audio preprocessing filters
  • πŸ“Š Advanced analytics and metrics
  • πŸ› Bug fixes and performance improvements

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • OpenAI for the Whisper model
  • PyTorch team for the deep learning framework
  • Flask community for the web framework
  • All contributors and users who help improve Whispr

πŸ”— Links


⭐ If you find Whispr useful, please consider giving it a star on GitHub! ⭐

Made with ❀️ by Mohd Mahmodi

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages