whisperwebui-transcript-utils
v0.1.0
Published
Small dependency-free utilities for cleaning transcripts and generating SRT or VTT subtitles.
Maintainers
Readme
whisperwebui-transcript-utils
Small, dependency-free JavaScript utilities for turning speech-to-text output into clean text, SRT subtitles, and WebVTT subtitles.
Useful with browser transcription tools, local Whisper pipelines, podcast workflows, and video editors.
Install
npm install whisperwebui-transcript-utilsUsage
import { normalizeTranscript, toSrt, toVtt } from "whisperwebui-transcript-utils";
const transcript = normalizeTranscript(rawTranscript);
const srt = toSrt(transcript);
const vtt = toVtt(transcript);The package does not call an AI provider and does not upload user data. It only transforms text locally.
API
normalizeTranscript(text)cleans line endings and repeated whitespace.splitTranscript(text, options)creates readable subtitle-sized segments.formatTimestamp(seconds, separator)formats SRT/VTT timestamps.createSubtitleCues(text, options)returns timestamped cue objects.toSrt(text, options)returns SRT text.toVtt(text, options)returns WebVTT text.
Development
npm testBuilt by WhisperWebUI, a free browser-based audio transcription tool.
License
MIT
