blob: 7ab0da7fb9243aabb68c07f7af6a7ec44caf504c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
import type { LanguageCode } from "./languages";
export type TranscriptionLanguage = LanguageCode | "auto";
export interface TranscriptionSegment {
text: string;
start: number;
end: number;
}
export interface TranscriptionResult {
text: string;
segments: TranscriptionSegment[];
language: string;
}
export type TranscriptionStatus =
| "idle"
| "loading-model"
| "transcribing"
| "complete"
| "error";
export interface TranscriptionProgress {
status: TranscriptionStatus;
progress: number;
message?: string;
}
export type TranscriptionModelId =
| "whisper-tiny"
| "whisper-small"
| "whisper-medium"
| "whisper-large-v3-turbo";
export interface TranscriptionModel {
id: TranscriptionModelId;
name: string;
huggingFaceId: string;
description: string;
}
export interface CaptionChunk {
text: string;
startTime: number;
duration: number;
}
|