import { ClapSegment } from '@aitube/clap' import { parseFileIntoSegments } from './parseFileIntoSegments' export async function parseFilesIntoSegments({ files, }: { /** * The files to import */ files: File[] }): Promise { return ( await Promise.all( files.map((file) => parseFileIntoSegments({ file, }) ) ) ).reduce((acc, segments) => [...acc, ...segments], []) }