Architecture & Sub-10ms Precision
CaptionLab bridges raw audio decoding with frame-synchronized client canvas burning. When you upload a video, the speech stream is parsed into phonetic segments with start and end timestamps. Our acoustic alignment engine ensures karaoke word-level highlighting matches natural vocal cadences without phase delay.
Audio is split into high-resolution spectral chunks to detect syllable onsets with ±10ms accuracy.
Words are bound to CSS transition matrices that trigger karaoke glow, scale bounce, and pill badges in real time.
Final videos are rendered frame-by-frame on an HTML5 canvas and encoded into hardware-accelerated MP4s.
import { CaptionLab } from '@captionlab/sdk';
const client = new CaptionLab({ apiKey: process.env.CAPTION_API_KEY });
// Transcribe with sub-10ms acoustic word alignment
const result = await client.transcribe({
videoUrl: 'https://media.acme.com/podcast.mp4',
highlightMode: 'karaoke-glow',
activeColor: '#FFD000',
language: 'en',
});
// Export perfectly synchronized subtitle timecodes
const srtData = result.toSRT();
console.log('Synchronized captions:', result.chunks.length);Core API Endpoints
Accepts audio or video payloads (multipart or public URL) and returns word-level timestamps, chunk boundaries, and speech metadata.
Generates a clean, standard `.srt` or `.vtt` file with sub-millisecond formatted timestamps for NLE video editors.
All browser previews, font rendering, and watermark compositions execute on your local client machine. Audio streams are encrypted with TLS 1.3 in transit and are never retained for model retraining.