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 with professional-grade motion typography.

License: MIT Python 3.9+


โœจ What Makes UACE Special

Most caption tools just transcribe. UACE transforms.

๐ŸŽฏ The UACE Difference

  • ๐Ÿงน Intelligent Cleaning - Removes "um", "uh", repetitions, sound effects automatically
  • ๐ŸŽจ 30+ Style Presets - From viral TikTok to cinematic film subtitles
  • ๐ŸŽฌ High-Quality Burn-in - Embed captions without quality loss (CRF 18)
  • โšก CPU & GPU Support - Works on Kaggle, Colab, local machines
  • ๐Ÿ”ง Extremely Customizable - 80+ parameters for fine control
  • ๐Ÿ“ฆ Offline First - No cloud APIs, no internet required
  • ๐ŸŒ Multi-Language - Language-aware cleaning and processing

๐Ÿš€ Quick Start

Installation

# Install dependencies
pip install faster-whisper pydantic rich click

# Add to path (if using from folder)
import sys
sys.path.append('/path/to/uace-package/src')

Simple Usage

from uace import CaptionEngine

# One line to caption your video
engine = CaptionEngine()
caption = engine.process("video.mp4", output="captions.ass")

With Configuration

from uace import CaptionEngine, ProcessingConfig

config = ProcessingConfig()

# Transcription
config.transcription.gpu = False  # Use CPU (works on Kaggle!)
config.transcription.model = "base"  # tiny, base, small, medium, large

# Styling
config.styling.preset = "big_bold"  # Choose from 30+ styles
config.styling.font_size = 72  # Custom font size
config.styling.primary_color = "#FFD700"  # Gold text

# Cleaning
config.cleaning.mode = "aggressive"  # Remove all fillers

# Generate captions
engine = CaptionEngine(config, verbose=True)
caption = engine.process("video.mp4", "captions.ass")

print(f"โœ… Generated {len(caption.segments)} caption segments")

Burn Captions (High Quality, No Quality Loss!)

from uace.utils import burn_captions

# Embed captions directly into video
output = burn_captions(
    video_path="video.mp4",
    caption_path="captions.ass",
    output_path="output.mp4",
    quality="high",  # Visually lossless (CRF 18)
    gpu=True,
    verbose=True
)

print(f"โœ… Video with captions: {output}")

๐ŸŽจ 30+ Built-in Style Presets

๐Ÿ”ฅ Viral/Social Media Styles

Perfect for TikTok, Instagram Reels, YouTube Shorts

  • viral_pop - Original word-by-word pop
  • big_bold - HUGE text that zooms in (72px!)
  • zoom_punch - Explosive word-by-word zoom
  • wave_motion - Smooth flowing wave animation
  • elastic_bounce - Playful rubber band bounce
  • earthquake - Violent shake effect

๐ŸŽต Music/Rhythm Styles

Sync with audio beats

  • karaoke - Classic karaoke fill effect
  • beat_pulse - Pulse to the beat
  • sound_wave - Visual audio waveform
  • rhythm_bounce - Bounce to rhythm

๐ŸŽจ Creative/Artistic Styles

Unique aesthetics

  • neon - Cyberpunk neon glow
  • glitch - Digital glitch effect
  • retro_vhs - 80s VHS aesthetic
  • hologram - Futuristic hologram
  • graffiti - Street art style
  • handwritten - Personal handwriting

๐ŸŽฌ Cinematic Styles

Professional film quality

  • minimal - Clean and professional
  • subtitle_classic - Traditional subtitles
  • cinematic_fade - Elegant film fade
  • noir_typewriter - Detective story style

โœจ Animation Styles

Dynamic motion effects

  • bounce - Energetic bounce
  • slide_up - Rise from bottom
  • slide_down - Drop from top
  • flip_in - 3D flip animation
  • rotate_in - Spinning entrance
  • blur_focus - Camera focus effect
  • typewriter - Character-by-character typing

๐ŸŒ 3D/Perspective + Special Effects

  • perspective_3d - Dramatic 3D tilt
  • depth_blur - Depth of field effect
  • floating - Gentle floating motion
  • fire - Burning flame effect
  • lightning - Electric flash
  • particles - Magical explosion
  • spotlight - Stage reveal effect

See STYLE_GUIDE.md for detailed descriptions and examples.


๐ŸŽฏ Key Features

๐ŸŽค Multi-Engine Transcription

  • faster-whisper (default) - Fastest, GPU/CPU
  • WhisperX - Advanced alignment + speaker diarization
  • distil-whisper - Ultra-fast CPU inference
  • Automatic engine selection

๐Ÿงน Intelligent Cleaning

  • Filler removal ("um", "uh", "like")
  • Sound effects ([laughter], [music])
  • Repetitions ("I I I think" โ†’ "I think")
  • Language-aware cleaning
  • 4 cleaning modes: none, light, balanced, aggressive

โœ‚๏ธ Semantic Chunking

  • Respects phrase boundaries
  • Optimizes reading speed
  • Maintains natural flow
  • 5 chunking strategies

๐ŸŽจ Motion Typography

  • Word-by-word timing
  • 20+ animation styles
  • Karaoke effects
  • ASS format (universal)

๐Ÿ’พ Export Formats

  • ASS, SRT, VTT, JSON, TXT

๐Ÿ”ง Extreme Customization

UACE provides 80+ configuration parameters:

Font Control

config.styling.font_size = 80
config.styling.font_family = "Impact"
config.styling.font_file = "/path/to/custom.ttf"
config.styling.font_weight = "black"
config.styling.font_italic = True
config.styling.letter_spacing = 5
config.styling.text_transform = "uppercase"

Color Control

config.styling.primary_color = "#FFFFFF"
config.styling.outline_color = "#000000"
config.styling.shadow_color = "#FF0000"
config.styling.emphasis_color = "#FFD700"

Effects Control

config.styling.outline_width = 5
config.styling.shadow_depth = 10
config.styling.glow = True
config.styling.glow_intensity = 15
config.styling.blur = 3
config.styling.opacity = 0.9

Animation Control

config.styling.animation_duration = 0.3
config.styling.stagger_delay = 0.08
config.styling.scale_overshoot = 1.5
config.styling.rotation_start = -45
config.styling.rotation_end = 0

3D Effects

config.styling.perspective = True
config.styling.rotation_x = 10
config.styling.rotation_y = 20

Gradients

config.styling.gradient_enabled = True
config.styling.gradient_start = "#FF00FF"
config.styling.gradient_end = "#00FFFF"

See DOCS.md for complete API reference.


๐ŸŽฌ High-Quality Video Burn-in

Embed captions without quality loss:

Simple High-Quality

from uace.utils import burn_captions

output = burn_captions(
    "video.mp4", 
    "captions.ass", 
    "output.mp4",
    quality="high"  # CRF 18 - visually lossless
)

Lossless (Perfect Quality)

from uace.utils.burnin import VideoBurnIn

VideoBurnIn.burn_captions_lossless(
    "video.mp4", 
    "captions.ass", 
    "output.mp4"
)

Fast Processing

VideoBurnIn.burn_captions_fast(
    "video.mp4",
    "captions.ass", 
    "output.mp4",
    gpu=True
)

Custom Settings

VideoBurnIn.burn_captions(
    video_path="video.mp4",
    caption_path="captions.ass",
    output_path="output.mp4",
    preset="slow",  # veryslow, slow, medium, fast
    crf=15,  # 0-51 (lower = better)
    font_size=80,
    custom_font="/path/to/font.ttf"
)

See BURNIN_GUIDE.md for complete guide.


๐Ÿ’ป Platform Support

โœ… Kaggle

config = ProcessingConfig()
config.transcription.gpu = False  # Auto-detects CPU
engine = CaptionEngine(config)

See KAGGLE_SETUP.md

โœ… Google Colab

config.transcription.gpu = True  # Use GPU

โœ… Local Machine

Works on CPU or GPU, your choice!


๐Ÿ“Š Performance

Processing Speed (base model)

Video Length CPU Time GPU Time
1 minute ~5s ~2s
10 minutes ~60s ~15s
30 minutes ~3min ~45s
1 hour ~6min ~90s

Burn-in Speed (1080p, 10-min)

Quality CPU Time GPU Time
High ~15 min ~3 min
Lossless ~30 min ~8 min
Fast ~5 min ~1 min

๐ŸŽ“ Examples

Viral TikTok Style

config = ProcessingConfig()
config.styling.preset = "big_bold"
config.styling.font_size = 80
config.cleaning.mode = "aggressive"

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

Music Video Karaoke

config.styling.preset = "karaoke"
config.transcription.word_timestamps = True

Professional Documentary

config.styling.preset = "subtitle_classic"
config.cleaning.mode = "light"
config.transcription.model = "large"

Podcast with Speakers

config.transcription.diarization = True
config.styling.preset = "minimal"

Custom Cyberpunk

config.styling.preset = "neon"
config.styling.glow_intensity = 20
config.styling.perspective = True

See examples.py for 10+ examples.


๐Ÿ”ฅ Complete Workflow

from uace import CaptionEngine, ProcessingConfig
from uace.utils import burn_captions

# Configure
config = ProcessingConfig()
config.transcription.gpu = False
config.styling.preset = "big_bold"
config.styling.font_size = 72
config.cleaning.mode = "aggressive"

# Generate captions
engine = CaptionEngine(config, verbose=True)
caption = engine.process("video.mp4", "captions.ass")

print(f"โœ… Generated {len(caption.segments)} segments")

# Burn into video (high quality)
output = burn_captions(
    "video.mp4",
    "captions.ass",
    "final.mp4",
    quality="high",
    gpu=True
)

print(f"๐ŸŽ‰ Final video: {output}")

๐Ÿ“š Documentation


โ“ FAQ

Q: Does it work without GPU?
A: Yes! Set config.transcription.gpu = False.

Q: Can I use it on Kaggle?
A: Absolutely! See KAGGLE_SETUP.md.

Q: Will burning reduce video quality?
A: Not with UACE! Use quality="high" (CRF 18).

Q: Can I customize everything?
A: Yes! 80+ configuration parameters.

Q: What languages are supported?
A: 30+ languages with language-aware cleaning.

Q: Can I add custom fonts?
A: Yes! Use config.styling.font_file.


๐Ÿ› Recent Fixes (v1.2.1)

โœ… Fixed: String preset handling
โœ… Fixed: Auto CPU detection
โœ… Fixed: Video quality loss
โœ… Added: Font size customization
โœ… Added: Custom font support
โœ… Added: High-quality burn-in


๐ŸŽฏ Comparison

Feature UACE Whisper CapCut
Intelligent Cleaning โœ… โŒ โœ…
30+ Presets โœ… โŒ โœ…
Offline โœ… โœ… โŒ
CPU Support โœ… โœ… โŒ
Quality Burn-in โœ… โŒ โœ…
Open Source โœ… โœ… โŒ
Customizable โœ… โŒ โš ๏ธ

๐ŸŒŸ Why Choose UACE?

  1. Complete Pipeline - Transcribe โ†’ Clean โ†’ Style โ†’ Export โ†’ Burn
  2. Professional Quality - Visually lossless output
  3. Extreme Flexibility - 80+ parameters, 30+ presets
  4. Platform Agnostic - Kaggle, Colab, local
  5. Offline Capable - No cloud dependencies
  6. Open Source - MIT license, extensible
  7. Well Documented - 8 comprehensive guides

๐Ÿ“ฆ What's Included

  • Core Engine with multi-stage pipeline
  • 3 Transcription Engines
  • Intelligent Cleaner
  • Semantic Chunker
  • 30+ Style Presets
  • Video Burn-in Utility
  • 5 Export Formats
  • Complete Documentation
  • Test Suite

๐Ÿš€ Get Started

# Install dependencies
pip install faster-whisper pydantic rich click

# Run demo
python demo.py

# Try examples
python examples.py

๐Ÿ“„ License

MIT License - See LICENSE


๐ŸŽ‰ Version History

  • v0.1.3 - Logging and Intelligent Speaker labelling added
  • v0.1.2 - Small Bug Fix
  • v0.1.1 - Bug fixes, burn-in, font customization
  • v0.1.0 - Initial release

UACE - Transform speech into clarity. ๐ŸŽฌโœจ

Made with โค๏ธ for content creators, video editors, and developers.

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.3.tar.gz (55.2 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.3-py3-none-any.whl (54.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uace-0.1.3.tar.gz
  • Upload date:
  • Size: 55.2 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.3.tar.gz
Algorithm Hash digest
SHA256 f225c06eae3277a17fecc80923a7020744a0405af2024181d413686ff29813df
MD5 0da820929ae6b7d05053ea482677e8a7
BLAKE2b-256 1dd9a754a005d45cd1ccea5d894b53a84cb0480be83fef05ed4fa3cccac47a33

See more details on using hashes here.

Provenance

The following attestation bundles were made for uace-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: uace-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 54.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c039bfa047df06fac2c56d7a66ea17d5b5e634b8cabb366b13d81d6fabadb94a
MD5 37a63b1a134cbe28065c5071f1657d06
BLAKE2b-256 06eeb503c71960055a4dc45cc9526d0d802ac529965b2e38e8dfd78c2680ac0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for uace-0.1.3-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