A comprehensive web-based application that provides three powerful features:
- Audio Transcription: Convert audio files to text using OpenAI's Whisper AI
- Document Conversion: Convert documents between various formats (DOCX, PDF, TXT, Excel)
- OCR (Optical Character Recognition): Extract text from images and PDF files
- Multiple Audio Format Support: MP3, WAV, M4A, FLAC, OGG, OPUS, AAC, WMA, MP4, WebM, 3GP, AMR, AIFF, AU
- Automatic Language Detection: Automatically detects the language in your audio
- High-Quality Transcription: Powered by OpenAI's Whisper model (base model by default)
- Translation Support: Translate transcriptions to English, French, Spanish, German, or Dutch
- Real-time Progress Tracking: Visual feedback with elapsed time and processing steps
- Sentence Formatting: Automatically formats transcriptions with sentences on separate lines
- Dual Output: View both original and translated text side-by-side
- DOCX Conversions: DOCX ↔ TXT, DOCX ↔ PDF
- PDF Conversions: PDF ↔ TXT, PDF ↔ DOCX
- TXT Conversions: TXT ↔ PDF, TXT ↔ DOCX
- Excel Conversions: XLSX/XLS → TXT
- Format Detection: Automatically detects available conversion options based on file type
- Image Support: PNG, JPG, JPEG, GIF, BMP, TIFF, WEBP
- PDF Support: Extract text from PDF files (multi-page support)
- Formatted Output: Extracted text formatted with sentences on separate lines
- Page Separation: PDF pages are clearly marked in the output
- Modern Tabbed Interface: Easy navigation between features
- Drag & Drop Support: Intuitive file upload
- Real-time Progress: Live timers and progress bars
- Processing Time Display: See exactly how long operations take
- Download Results: Download all processed files
- Python: 3.8 or higher
- FFmpeg: Required for audio transcription
- Tesseract OCR: Required for OCR functionality (optional but recommended)
Windows:
# Using winget (recommended)
winget install ffmpeg
# Or using Chocolatey
choco install ffmpeg
# Or download from: https://ffmpeg.org/download.htmlmacOS:
brew install ffmpegLinux (Ubuntu/Debian):
sudo apt update
sudo apt install ffmpegWindows:
# Using winget (recommended)
winget install --id UB-Mannheim.TesseractOCR --accept-package-agreements --accept-source-agreementsmacOS:
brew install tesseractLinux (Ubuntu/Debian):
sudo apt update
sudo apt install tesseract-ocr- Clone or navigate to the project directory:
cd audiotranscribe- Create a virtual environment (recommended):
python -m venv venv-
Activate the virtual environment:
Windows:
venv\Scripts\activate
macOS/Linux:
source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt- Download Whisper model (automatic on first use): The application will automatically download the Whisper model on first transcription. The "base" model is used by default.
See DOCKER.md for detailed Docker installation instructions.
Quick start:
docker-compose up -dWindows:
python app.py
# Or double-click start.batmacOS/Linux:
python app.py
# Or
bash start.shDocker:
docker-compose up -dOpen your web browser and navigate to:
http://localhost:5012
- Click the "🎤 Audio Transcription" tab
- Drag and drop an audio file or click to browse
- (Optional) Select a target language for translation (English, French, Spanish, German, or Dutch)
- Click "Transcribe Audio"
- Wait for processing (you'll see real-time progress)
- View and download the transcription (and translation if requested)
- Click the "📄 Document Conversion" tab
- Upload a document (DOCX, PDF, TXT, or Excel file)
- Select the target format from the dropdown
- Click "Convert Document"
- Download the converted file
- Click the "👁️ OCR (Text Extraction)" tab
- Upload an image or PDF file
- Click "Extract Text (OCR)"
- View and download the extracted text
- MP3, WAV, M4A, FLAC, OGG, OPUS, AAC
- WMA, MP4 (audio track), WebM (audio track)
- 3GP, AMR, AIFF, AU
- Input: DOCX, PDF, TXT, XLSX, XLS
- Output: DOCX, PDF, TXT
- PNG, JPG, JPEG, GIF, BMP, TIFF, WEBP
- PDF (for text extraction)
Edit app.py:
model = whisper.load_model("base") # Options: tiny, base, small, medium, largeModel Options:
- tiny: Fastest, least accurate (~39M parameters)
- base: Good balance (default, ~74M parameters)
- small: Better accuracy (~244M parameters)
- medium: High accuracy (~769M parameters)
- large: Best accuracy (~1550M parameters)
Default maximum file size is 100MB. To change it, modify MAX_FILE_SIZE in app.py:
MAX_FILE_SIZE = 100 * 1024 * 1024 # 100MBDefault port is 5012. To change it, modify the last line in app.py:
app.run(debug=True, host='0.0.0.0', port=5012)audiotranscribe/
├── app.py # Flask backend server
├── transcribe_file.py # Command-line transcription script
├── requirements.txt # Python dependencies
├── Dockerfile # Docker container configuration
├── docker-compose.yml # Docker Compose configuration
├── .dockerignore # Docker ignore patterns
├── templates/
│ └── index.html # Frontend web interface
├── uploads/ # Temporary upload directory (auto-created)
├── transcriptions/ # Saved transcription files (auto-created)
├── conversions/ # Converted document files (auto-created)
├── ocr_results/ # OCR extracted text files (auto-created)
├── start.bat # Windows startup script
├── start.sh # Linux/macOS startup script
├── README.md # This file
├── DOCKER.md # Docker documentation
└── INSTALL_FFMPEG.md # FFmpeg installation guide
GET /- Main web interfacePOST /upload- Upload and transcribe audio file (supportstarget_languageparameter)GET /download/<filename>- Download transcription fileGET /supported-formats- Get list of supported audio formatsGET /check-ffmpeg- Check FFmpeg installation statusGET /translation-capabilities- Get translation capabilities and supported languages
POST /convert-document- Convert document between formatsGET /download-conversion/<filename>- Download converted documentGET /supported-conversions- Get supported conversion formats
POST /ocr- Perform OCR on image or PDFGET /download-ocr/<filename>- Download OCR resultGET /ocr-capabilities- Get OCR capabilities and status
GET /health- Health check endpoint
See DOCKER.md for complete Docker deployment instructions.
# Build and start
docker-compose up -d
# View logs
docker-compose logs -f
# Stop
docker-compose down- Ensure FFmpeg is installed and available in your system PATH
- Verify installation:
ffmpeg -version - See INSTALL_FFMPEG.md for detailed instructions
- Install Tesseract OCR (see Prerequisites section)
- On Windows, the app will auto-detect Tesseract in common locations
- Verify installation:
tesseract --version - Restart the server after installation
- Ensure all dependencies are installed:
pip install -r requirements.txt - Restart the server after installing new packages
- Check that Python version is 3.8 or higher
- Use a smaller Whisper model (tiny or base) for faster processing
- Consider using GPU acceleration if available (requires CUDA-enabled PyTorch)
- Processing time is roughly 0.2-0.5x the audio duration
- Use a smaller Whisper model
- Process shorter audio files
- Close other applications to free up memory
- Reduce MAX_FILE_SIZE if processing large files
- Ensure you have a stable internet connection for the first run
- Models are cached after first download
- First transcription may take longer as the model downloads
- Verify that required libraries are installed (python-docx, pypdf, reportlab, etc.)
- Check server logs for specific error messages
- Ensure file format is supported (see Supported Formats section)
-
GPU Acceleration: For faster transcription, install PyTorch with CUDA support:
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu118
-
Model Selection: Choose the appropriate model size based on your needs:
- Quick transcriptions:
tinyorbase - High accuracy:
mediumorlarge
- Quick transcriptions:
-
File Preparation: For best results:
- Use clear audio with minimal background noise
- Ensure good audio quality
- Consider splitting very long files
- For OCR, use high-resolution images
-
Docker Performance:
- Use Docker volumes for persistent storage
- Allocate sufficient memory (recommended: 4GB+)
- Consider using GPU support in Docker for faster processing
- Local Processing: All processing happens locally - no data is sent to external services
- Automatic Cleanup: Uploaded files are automatically deleted after processing
- No Data Storage: Processed files are saved only if you download them
- Secure: All operations run on your local machine or Docker container
- First transcription may take longer as the Whisper model downloads (~150MB for base model)
- Transcription time depends on audio length and model size (roughly 0.2-0.5x audio duration)
- Model loading time: 10-30 seconds on first use, then cached in memory
- Document conversions are typically very fast (< 5 seconds for most files)
- OCR processing time depends on image/PDF size and complexity
This project is licensed under the MIT License - see the LICENSE file for details.
This software uses the following open-source components:
- OpenAI Whisper: MIT License - Copyright (c) 2022 OpenAI
- Tesseract OCR: Apache License 2.0 - Copyright (c) Google Inc.
- Other dependencies: See
requirements.txtfor individual licenses
All third-party components maintain their original licenses. Please refer to the LICENSE file for complete license information and third-party attributions.
Feel free to submit issues, fork the repository, and create pull requests for any improvements.
For issues or questions:
- Check the Troubleshooting section above
- Review the documentation files (DOCKER.md, INSTALL_FFMPEG.md)
- Check server logs for detailed error messages
- Open an issue on the repository
- Content Creators: Transcribe podcasts, videos, and interviews
- Students: Convert lecture recordings to text notes
- Business: Extract text from scanned documents and PDFs
- Accessibility: Make audio content accessible through text
- Document Management: Convert documents between formats
- Data Entry: Extract text from images and forms