@rolme/ytscript
Version:
A CLI tool to download YouTube transcripts and generate summaries
24 lines (23 loc) • 645 B
TypeScript
import type { VideoInfo } from 'ytdl-core';
import type { OutputFormat } from './output.js';
export interface TranscriptOptions {
lang?: string;
format?: OutputFormat;
outputPath?: string;
}
export interface TranscriptSegment {
text: string;
duration: number;
offset: number;
}
export interface TranscriptResult {
transcript: string;
segments: TranscriptSegment[];
videoId: string;
}
export interface TranscriptService {
getTranscript(videoInfo: VideoInfo, options?: TranscriptOptions): Promise<TranscriptResult>;
}
export declare class TranscriptError extends Error {
constructor(message: string);
}