@ioris/core
Version:
This package provides the core functionality for the [@ioris](https://www.npmjs.com/search?q=%40ioris) ecosystem for managing music lyrics with time synchronization.
20 lines (19 loc) • 622 B
TypeScript
import type { Lyric, WordTimeline } from "../types";
export type CreateLyricArgs = {
initID?: boolean;
id?: string;
resourceID: string;
duration: number;
timelines: WordTimeline[][][];
lineTokenizer?: (lineArgs: {
position: number;
timelines: WordTimeline[];
}) => Promise<Map<number, {
position: number;
timelines: WordTimeline[];
jointNearWord?: boolean;
}>>;
paragraphTokenizer?: (timelines: WordTimeline[][]) => Promise<WordTimeline[][]>;
offsetSec?: number;
};
export declare function createLyric(args: CreateLyricArgs): Promise<Lyric>;