UNPKG

@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.

19 lines (18 loc) 600 B
import type { Lyric, WordTimeline } from "../types"; export type CreateLyricArgs = { initID?: boolean; id?: string; resourceID: string; 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>;