Last active
August 29, 2023 23:50
-
-
Save malerba118/d2ad037e142389b5d62d04906cbed7e2 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
// actions | |
decomposeVideo({ src: 'video-url'}): SourceBlueprint | |
dub({ source_transcription, target_transcription, source_audio, voice_id }): MediaReference | |
recomposeVideo(targetBlueprint: TargetBlueprint): MediaReference | |
// types | |
interface SourceBlueprint { | |
video: MediaReference // hosted video | |
background_audio: MediaReference | |
utterances: Utterance[] | |
speakers: Speaker[] | |
} | |
interface TargetBlueprint { | |
video: MediaReference | |
background_audio: MediaReference | |
utterances: Utterance[] | |
speakers: Speaker[] | |
} | |
interface Utterance { | |
id: string | |
transcription: string | |
speaker_id: string | |
language: string | |
clip: Clip | |
} | |
interface Clip { | |
media: MediaReference | |
start_time: number // 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) | |
// 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 | |
} | |
} | |
interface Speaker { | |
id: string | |
name: string | |
voice_id: string // generated as part of video decomposition process | |
} | |
interface MediaReference { | |
src: string | |
type: 'video' | 'audio' | |
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