tubeMate / QUICKSTART.md
ShivamPansuriya
Add application file
74708f4

A newer version of the Gradio SDK is available: 5.47.2

Upgrade

Quick Start Guide

Get your Video Transcription Service running in 5 minutes!

πŸš€ Option 1: Automated Setup (Recommended)

# 1. Run the setup script
python setup.py

# 2. Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate

# 3. Start the service (robust startup prevents restarts)
python start_robust.py

πŸ› οΈ Option 2: Manual Setup

# 1. Create virtual environment
python -m venv venv

# 2. Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate

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

# 4. Install FFmpeg
# Windows: Download from https://ffmpeg.org/download.html
# macOS: brew install ffmpeg
# Linux: sudo apt-get install ffmpeg

# 5. Start the service
python start_robust.py  # Prevents restarts
# OR
python main.py         # Standard startup

πŸ§ͺ Test Your Service

Option A: Web Interface

  1. Open http://localhost:8000/docs
  2. Click "Try it out" on POST /transcribe
  3. Upload a video file
  4. Copy the returned ID
  5. Use GET /transcribe/{id} to check status

Option B: Command Line

# Test with example client
python example_client.py your_video.mp4

# Or test the API directly
python test_api.py your_video.mp4

# Monitor transcription progress in real-time
python log_monitor.py upload your_video.mp4

Option C: cURL

# Upload video
curl -X POST "http://localhost:8000/transcribe" \
  -F "file=@your_video.mp4" \
  -F "language=en"

# Check status (replace 1 with your ID)
curl "http://localhost:8000/transcribe/1"

🌐 Deploy to Render.com

# 1. Push to GitHub
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/yourusername/your-repo.git
git push -u origin main

# 2. Go to render.com
# 3. Create new Web Service
# 4. Connect your GitHub repo
# 5. Deploy!

πŸ“‹ What You Get

  • Free transcription using OpenAI Whisper
  • No API limits - completely free
  • Multiple formats - MP4, AVI, MOV, etc.
  • Auto language detection or specify language
  • REST API with automatic documentation
  • Rate limiting and error handling
  • Ready for production deployment

πŸ”§ Configuration

Edit config.py to customize:

  • File size limits
  • Supported formats
  • Whisper model size
  • Rate limiting
  • Cleanup intervals

πŸ“Š Monitoring & Logging

Enable detailed logging:

DEBUG=true python main.py

Monitor transcription progress:

# Test service
python log_monitor.py test

# Upload and monitor
python log_monitor.py upload video.mp4

# Monitor existing transcription
python log_monitor.py monitor 123

Log to file:

LOG_TO_FILE=true python main.py

πŸ“– Need Help?

🎯 Common Issues

"Service keeps restarting"

"NumPy compatibility error"

  • Run: python fix_numpy.py to fix automatically

"FFmpeg not found"

  • Install FFmpeg for your OS (see setup instructions)

"File too large"

  • Default limit is 100MB (configurable in config.py)

"Service sleeping on Render"

  • Free tier sleeps after 15min inactivity (normal behavior)

"Slow first request"

  • AI model loads on first use (30-60 seconds)

Ready to transcribe? Your service is now running at http://localhost:8000! πŸŽ‰