Last active
October 21, 2023 00:20
-
-
Save malerba118/392f5d8d3cf38c425b93cede7ab715e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface Project { | |
id: string; | |
video: MediaReference; // hosted video | |
preview_video: MediaReference; // hosted video | |
background: MediaReference; | |
speakers: Speaker[]; | |
source_blueprint: { | |
id: string; | |
utterances: SourceUtterance[] | |
tracks: SourceTrack[] // tracks contain clips | |
deleted_at?: number | null; | |
}; | |
target_blueprints: Array<{ | |
id: string; | |
language: string; | |
utterances: TargetUtterance[] | |
tracks: TargetTrack[] // tracks contain clips | |
deleted_at?: number | null; | |
}> | |
deleted_at?: number | null; | |
} | |
export interface Utterance { | |
id: string; | |
speaker_id: string; | |
text: string; | |
language: string; | |
clip: Clip | null; | |
deleted_at?: number | null; | |
} | |
export interface TargetUtterance extends Utterance { | |
source_id: string; // reference to source utterance | |
clip: Clip | null; | |
} | |
export interface SourceUtterance extends Utterance { | |
clip: Clip; | |
} | |
// Eventually we may want want track-level config such as volume | |
export interface Track { | |
id: string; | |
deleted_at?: number | null; | |
} | |
export interface SourceTrack extends Track { | |
speaker_id: string; | |
} | |
export interface TargetTrack extends Track { | |
speaker_id: string; | |
} | |
export interface Clip { | |
id: string; | |
deleted_at?: number | null; | |
media: MediaReference; | |
// offset of media from beginning of video in seconds (this will always be 0 for source clips because audio will be full length of video) | |
media_offset: number; | |
volume: number; // +/- decibles | |
// trim gives the range of the media that we care about | |
trim: { | |
start: number; // standardized value from 0-1 | |
end: number; // standardized value from 0-1 | |
}; | |
} | |
export interface Speaker { | |
id: string; | |
deleted_at?: number | null; | |
name: string; | |
// voice_id: string; // generated as part of video decomposition process | |
} | |
export interface MediaReference { | |
src: string; | |
type: string; // content-type (eg: video/mp4) | |
duration: number; // i need to know how long each piece of media is without loading it | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment