Skip to main content

Universal Auto-Caption Engine - Speech refinement with motion typography

Project description

UACE - Universal Auto-Caption Engine

Words are noisy. Meaning is not.
Captions should speak clearly โ€” and move beautifully.

UACE transforms raw speech transcription into clean, readable, beautifully animated captions.

PyPI version License: MIT Python 3.9+

Why UACE?

Most caption systems treat transcription as the end goal. UACE treats transcription as raw material.

Speech is messy:

  • Fillers ("um", "uh", "like")
  • Repetitions ("I I I think")
  • Non-speech artifacts ("[laughter]", "[music]")
  • Stage directions
  • Background events

UACE cleans, sculpts, and animates speech into readable motion.

Features

๐ŸŽฏ Core Philosophy

โœ… Offline first - No cloud dependencies
โœ… Software agnostic - Works with any video editor
โœ… Linear-time processing - Fast, even on CPU
โœ… Declarative styling - Simple configuration, powerful results
โœ… Graceful degradation - Falls back intelligently

๐Ÿš€ What Makes UACE Different

  1. Multi-Engine Support

    • faster-whisper (default, fastest)
    • openai-whisper (maximum accuracy)
    • whisperx (advanced alignment + diarization)
    • distil-whisper (ultra-fast CPU)
    • Custom engine plugins
  2. Intelligent Cleaning

    • Language-aware filler removal
    • Sound effect stripping
    • Repetition collapsing
    • Conversational normalization
    • Cultural sensitivity (dialect-aware)
  3. Semantic Chunking

    • Respects phrase boundaries
    • Optimizes reading speed
    • Maintains meaning
    • Adapts to context
  4. Motion Typography

    • CapCut-style animations
    • Word-by-word timing
    • Karaoke effects
    • Bounce, pop, slide animations
    • ASS format export (universal compatibility)

Installation

Basic Installation

pip install uace

With Transcription Engine

# faster-whisper (recommended)
pip install "uace[whisper]"

# WhisperX (for diarization)
pip install "uace[whisperx]"

# All features
pip install "uace[all]"

Development

git clone https://github.com/chigozie-coder/uace
cd uace
pip install -e ".[dev]"

Quick Start

CLI Usage

# Simple processing
uace process video.mp4

# Custom style and cleaning
uace process video.mp4 --style viral_pop --cleaning aggressive

# Speaker diarization
uace process podcast.mp3 --diarization --model large

# Export as SRT
uace process video.mp4 --format srt -o captions.srt

Python API

from uace import CaptionEngine

# Simplest usage
engine = CaptionEngine()
caption = engine.process("video.mp4", output="captions.ass")

# Custom configuration
from uace import ProcessingConfig, CleaningMode

config = ProcessingConfig.quick(
    cleaning=CleaningMode.AGGRESSIVE,
    style="viral_pop"
)

engine = CaptionEngine(config)
caption = engine.process("video.mp4")

# Advanced control
config = ProcessingConfig()
config.transcription.diarization = True
config.cleaning.mode = CleaningMode.BALANCED
config.styling.preset = "neon"

engine = CaptionEngine(config)
caption = engine.process_audio("podcast.mp3")

Style Presets

UACE includes professional style presets:

Preset Description Use Case
viral_pop High-energy word pop TikTok, Shorts
minimal Clean, professional Corporate, vlogs
karaoke Color-fill timing Music videos, lyrics
subtitle_classic Traditional subtitles Movies, TV
bounce Energetic bounce Gaming, reactions
neon Cyberpunk glow Tech content

List all styles:

uace styles

Cleaning Modes

Mode What It Removes Use Case
none Nothing Legal, compliance
light Fillers + sound effects Interviews
balanced Fillers + repetitions + effects YouTube (default)
aggressive Maximum cleaning Shorts, TikTok

Pipeline

TRANSCRIBE โ†’ CLEAN โ†’ CHUNK โ†’ STYLE โ†’ EXPORT

Each stage is:

  • Configurable - Full control over behavior
  • Non-destructive - Original text preserved
  • Transparent - Full processing metadata
  • Fast - Linear time complexity

Performance

Without GPU

Video Length Processing Time
30 minutes ~45 seconds
1 hour ~90 seconds

With GPU

Video Length Processing Time
1 hour ~15 seconds

Advanced Features

Speaker Diarization

config = ProcessingConfig()
config.transcription.diarization = True
config.transcription.preference = EnginePreference.DIARIZATION

engine = CaptionEngine(config)
caption = engine.process("podcast.mp3")

# Access speaker info
for segment in caption.segments:
    print(f"[{segment.speaker}]: {segment.text}")

Language Support

config = ProcessingConfig()
config.transcription.language = "es"  # Spanish
config.cleaning.language = "es"
config.cleaning.dialect = "mx"  # Mexican Spanish

engine = CaptionEngine(config)

Custom Fillers

config = ProcessingConfig()
config.cleaning.custom_fillers = ["basically", "literally", "actually"]

engine = CaptionEngine(config)

Word-Level Timing

caption = engine.process("video.mp4")

for segment in caption.segments:
    if segment.has_words():
        for word in segment.words:
            print(f"{word.text}: {word.start:.2f}s - {word.end:.2f}s")

Export Formats

  • ASS - Advanced SubStation Alpha (with animations) โœจ
  • SRT - SubRip (basic compatibility)
  • VTT - WebVTT (web)
  • JSON - Full data export

API Reference

CaptionEngine

engine = CaptionEngine(
    config: Optional[ProcessingConfig] = None,
    verbose: bool = False
)

# Process video/audio
caption = engine.process(
    input_file: str,
    output: Optional[str] = None,
    **overrides
) -> Caption

# Export caption
engine.export(
    caption: Caption,
    output_path: str
)

ProcessingConfig

# Quick configs
config = ProcessingConfig.quick(cleaning="balanced", style="viral_pop")
config = ProcessingConfig.fast()  # Speed priority
config = ProcessingConfig.accurate()  # Quality priority

# Full customization
config = ProcessingConfig()
config.transcription.model = "large"
config.transcription.diarization = True
config.cleaning.mode = CleaningMode.AGGRESSIVE
config.chunking.max_chars_per_line = 42
config.styling.preset = "neon"

CLI Reference

# Main command
uace process INPUT [OPTIONS]

# Options
--style TEXT           Caption style preset
--cleaning TEXT        Text cleaning mode
--language TEXT        Language code (ISO 639-1)
--model TEXT          Whisper model size
--diarization         Enable speaker detection
--gpu/--no-gpu        Use GPU acceleration
--format TEXT         Output format (ass/srt/vtt/json)
-o, --output PATH     Output file path
-v, --verbose         Verbose output

# Utilities
uace styles           List available styles
uace engines          Show available engines
uace doctor          System diagnostics
uace demo            Show examples

Architecture

uace/
โ”œโ”€โ”€ engines/          # Transcription backends
โ”‚   โ””โ”€โ”€ transcription.py
โ”œโ”€โ”€ cleaning/         # Text cleaning
โ”‚   โ””โ”€โ”€ engine.py
โ”œโ”€โ”€ chunking/         # Semantic chunking
โ”‚   โ””โ”€โ”€ semantic.py
โ”œโ”€โ”€ styling/          # Style presets
โ”‚   โ””โ”€โ”€ presets.py
โ”œโ”€โ”€ export/          # Format exporters
โ”‚   โ””โ”€โ”€ formats.py
โ”œโ”€โ”€ models.py        # Data models
โ”œโ”€โ”€ config.py        # Configuration
โ”œโ”€โ”€ engine.py        # Main pipeline
โ””โ”€โ”€ cli.py          # Command line interface

Contributing

Contributions welcome! Areas of interest:

  • Additional transcription engines
  • Language-specific cleaning rules
  • New style presets
  • Performance optimizations
  • Documentation improvements

Roadmap

  • Real-time processing
  • More animation presets
  • Video embedding (burn-in)
  • Cloud API (optional)
  • GUI application
  • Plugin system

License

MIT License - see LICENSE file for details.

Credits

Built with:

Support


UACE is not a subtitle generator. It is a speech refinement engine with motion typography.

We don't transcribe speech. We transform it into clarity.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uace-0.1.0.tar.gz (39.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uace-0.1.0-py3-none-any.whl (38.7 kB view details)

Uploaded Python 3

File details

Details for the file uace-0.1.0.tar.gz.

File metadata

  • Download URL: uace-0.1.0.tar.gz
  • Upload date:
  • Size: 39.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for uace-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1275add6f0c666c422ffc67cba64c6cbe184ab9881ba2928608985abde135f52
MD5 3094caf64c43447d8b788ef5d509d1ad
BLAKE2b-256 8a6614ae960d6b45f433877cd1d230b0a191157954db3c99f16a7419dadd62b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for uace-0.1.0.tar.gz:

Publisher: publish.yaml on chigozie-coder/uace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uace-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: uace-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for uace-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4f6422402002158b3823783869091adc7b906de6a42e04596be0b410c8f6519
MD5 563e3b5d54aee95faf583ccd28c50464
BLAKE2b-256 2ffd4c13e457da6d73782151f060edf947153551a11ca0383823f36976b6a094

See more details on using hashes here.

Provenance

The following attestation bundles were made for uace-0.1.0-py3-none-any.whl:

Publisher: publish.yaml on chigozie-coder/uace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page