Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

961 B
Raw Blame
export interface AudiobookRenderChapter {
  title?: string;
  status: string;
  duration_s?: number;
}

export interface AudiobookLyricsWord {
  text: string;
  start: number;
  end: number;
  chapterIndex: number;
}

export interface AudiobookLyricsChapter {
  title: string;
  start: number;
  end: number;
  wordStart: number;
  wordCount: number;
}

export interface AudiobookLyricsTimeline {
  chapters: AudiobookLyricsChapter[];
  words: AudiobookLyricsWord[];
}

export function evenSplitWords(
  text: string,
  start: number,
  end: number,
): Array<Omit<AudiobookLyricsWord, 'chapterIndex'>>;

export function scriptChapters(script: string): Array<{
  title: string;
  tokens: string[];
}>;

export function buildLyricsTimeline(
  script: string,
  options?: {
    chapters?: AudiobookRenderChapter[] | null;
    duration?: number;
  },
): AudiobookLyricsTimeline;

export function activeWordIndex(words: AudiobookLyricsWord[], time: number): number;