Skip to content

Dasemu/Transcriptarr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,084 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 Transcriptarr

AI-powered subtitle transcription service with REST API and Web UI

Python FastAPI Vue.js License

Transcriptarr is an AI-powered subtitle transcription service based on Subgen, featuring a modern FastAPI backend with 45+ REST endpoints, a Vue 3 web interface, and a distributed worker pool architecture.


✨ Features

🎯 Core Features

  • Whisper Transcription - Support for faster-whisper and stable-ts
  • Translation - Two-stage translation: Whisper to English, then Google Translate to target language
  • CPU/GPU Workers - Scalable worker pool with CUDA support
  • Persistent Queue - Priority-based queue manager with SQLite/PostgreSQL
  • Library Scanner - Automatic scanning with configurable rules
  • REST API - 45+ endpoints with FastAPI
  • Web UI - Complete Vue 3 dashboard with 6 views
  • Setup Wizard - Interactive first-run configuration
  • Real-time Monitoring - File watcher, scheduled scans, and system resources

πŸ”§ Technical Features

  • Multiprocessing: Workers isolated in separate processes
  • Priority Queuing: Queue with priorities and deduplication
  • Graceful Degradation: Works without optional dependencies (Whisper, GPU)
  • Thread-Safe: Row locking and context managers
  • Auto-retry: Automatic retry of failed jobs
  • Health Monitoring: Detailed statistics and health checks
  • Database-backed Settings: All configuration stored in database, editable via Web UI

πŸš€ Quick Start

1. Install dependencies

# Basic dependencies
pip install -r requirements.txt

# Transcription dependencies (optional - required for actual transcription)
pip install stable-ts faster-whisper
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install av>=10.0.0

2. First run (Setup Wizard)

# The setup wizard runs automatically on first start
python backend/cli.py server

# Or run setup wizard manually
python backend/cli.py setup

The setup wizard will guide you through:

  • Standalone mode: Configure library paths, scan rules, and workers
  • Bazarr mode: Configure as Bazarr subtitle provider (in development)

3. Start the server

# Development (with auto-reload)
python backend/cli.py server --reload

# Production
python backend/cli.py server --host 0.0.0.0 --port 8000 --workers 4

4. Access the application

URL Description
http://localhost:8000 Web UI (Dashboard)
http://localhost:8000/docs Swagger API Documentation
http://localhost:8000/redoc ReDoc API Documentation
http://localhost:8000/health Health Check Endpoint

πŸ“‹ CLI Commands

# Server
python backend/cli.py server [options]
  --host HOST           Host (default: 0.0.0.0)
  --port PORT           Port (default: 8000)
  --reload              Auto-reload for development
  --workers N           Number of uvicorn workers (default: 1)
  --log-level LEVEL     Log level (default: info)

# Setup wizard
python backend/cli.py setup     # Run setup wizard

# Database
python backend/cli.py db init   # Initialize database
python backend/cli.py db reset  # Reset (WARNING: deletes all data!)

# Standalone worker
python backend/cli.py worker --type cpu
python backend/cli.py worker --type gpu --device-id 0

# Manual scan
python backend/cli.py scan /path/to/media [--no-recursive]

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   FastAPI Server                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚              REST API (45+ endpoints)            β”‚   β”‚
β”‚  β”‚  /api/workers  | /api/jobs     | /api/settings  β”‚   β”‚
β”‚  β”‚  /api/scanner  | /api/system   | /api/setup     β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚              β”‚              β”‚                  β”‚
    β–Ό              β–Ό              β–Ό                  β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Worker β”‚   β”‚  Queue   β”‚   β”‚ Scanner β”‚      β”‚ Database β”‚
β”‚  Pool  │◄─── Manager  │◄─── Engine  β”‚      β”‚ SQLite/  β”‚
β”‚ CPU/GPUβ”‚   β”‚ Priority β”‚   β”‚ Rules + β”‚      β”‚ Postgres β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚  Queue   β”‚   β”‚ Watcher β”‚      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow

  1. LibraryScanner detects files (manual/scheduled/watcher)
  2. FileAnalyzer analyzes with ffprobe (audio tracks, subtitles)
  3. Rules Engine evaluates against configurable ScanRules
  4. QueueManager adds job to persistent queue (with deduplication)
  5. Worker processes with WhisperTranscriber
  6. Output: Generates .eng.srt (transcription) or .{lang}.srt (translation)

πŸ–₯️ Web UI

The Web UI includes 6 complete views:

View Description
Dashboard System overview, resource monitoring (CPU/RAM/GPU), recent jobs
Queue Job management with filters, pagination, retry/cancel actions
Scanner Scanner control, scheduler configuration, manual scan trigger
Rules Scan rules CRUD with create/edit modal
Workers Worker pool management, add/remove workers dynamically
Settings Database-backed settings organized by category

πŸŽ›οΈ Configuration

Database-backed Settings

All configuration is stored in the database and manageable via:

  • Setup Wizard (first run)
  • Settings page in Web UI
  • Settings API (/api/settings)

Settings Categories

Category Settings
General Operation mode, library paths, log level
Workers CPU/GPU worker counts, auto-start, health check interval
Transcription Whisper model, compute type, skip existing files
Scanner Enable/disable, schedule interval, file watcher
Bazarr Provider mode (in development)

Environment Variables

Only DATABASE_URL is required in .env:

# SQLite (default)
DATABASE_URL=sqlite:///./transcriptarr.db

# PostgreSQL (production)
DATABASE_URL=postgresql://user:pass@localhost/transcriptarr

πŸ“š Documentation

Document Description
docs/API.md Complete REST API documentation (45+ endpoints)
docs/ARCHITECTURE.md Backend architecture and components
docs/FRONTEND.md Frontend structure and components
docs/CONFIGURATION.md Configuration system and settings

🐳 Docker

# CPU only
docker build -t transcriptorio:cpu -f Dockerfile.cpu .

# GPU (NVIDIA CUDA)
docker build -t transcriptorio:gpu -f Dockerfile .

# Run
docker run -d \
  -p 8000:8000 \
  -v /path/to/media:/media \
  -v /path/to/data:/app/data \
  --gpus all \
  transcriptorio:gpu

πŸ“Š Project Status

Component Status Progress
Core Backend βœ… Complete 100%
REST API (45+ endpoints) βœ… Complete 100%
Worker System βœ… Complete 100%
Library Scanner βœ… Complete 100%
Web UI (6 views) βœ… Complete 100%
Settings System βœ… Complete 100%
Setup Wizard βœ… Complete 100%
Bazarr Provider ⏳ In Development 30%
Testing Suite ⏳ Pending 0%
Docker ⏳ Pending 0%

🀝 Contributing

Contributions are welcome!

πŸ“ Credits

Based on Subgen by McCloudS.

Architecture redesigned with:

  • FastAPI for REST APIs
  • SQLAlchemy for persistence
  • Multiprocessing for workers
  • Whisper (stable-ts / faster-whisper) for transcription
  • Vue 3 + Pinia for frontend

πŸ“„ License

MIT License - See LICENSE for details.

About

TranscriptorIO is an AI-powered subtitle transcription service based on Subgen, featuring a modern FastAPI backend with 45+ REST endpoints, a Vue 3 web interface, and a distributed worker pool architecture.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors