diff --git a/vocodes/public/video-thumbnails/donald-trump.webp b/vocodes/public/video-thumbnails/donald-trump.webp new file mode 100644 index 0000000000..5cc067fabe Binary files /dev/null and b/vocodes/public/video-thumbnails/donald-trump.webp differ diff --git a/vocodes/public/video-thumbnails/dr-phil.webp b/vocodes/public/video-thumbnails/dr-phil.webp new file mode 100644 index 0000000000..9b6e1d8c37 Binary files /dev/null and b/vocodes/public/video-thumbnails/dr-phil.webp differ diff --git a/vocodes/src/App.scss b/vocodes/src/App.scss index 368ce2dcb4..63a7b05baa 100644 --- a/vocodes/src/App.scss +++ b/vocodes/src/App.scss @@ -161,6 +161,11 @@ nav { min-height: 1.5em; } +.video-thumbnail { + max-width: 250px; + padding: 1em; +} + #usage, #updates, #help-wanted, diff --git a/vocodes/src/App.tsx b/vocodes/src/App.tsx index 2da3fb9fcd..c0f39c3a3d 100644 --- a/vocodes/src/App.tsx +++ b/vocodes/src/App.tsx @@ -13,6 +13,7 @@ import { Spectrogram } from './modes/speak/extras/Spectrogram'; import { TermsComponent } from './modes/terms/TermsComponent'; import { TopNav } from './navigation/TopNav'; import { Utterance } from './model/utterance'; +import { VideoComponent } from './modes/video/VideoComponent'; interface Props { // Certan browsers (iPhone) have pitiful support for drawing APIs. Worse yet, @@ -239,6 +240,10 @@ class App extends React.Component { setTextCallback={this.setText} />; break; + case Mode.VIDEO_MODE: + component = + break; case Mode.HISTORY_MODE: component = { + + constructor(props: Props) { + super(props); + this.state = { + }; + } + + public render() { + let thumbnails : any[] = []; + + VIDEO_TEMPLATES.forEach(videoTemplate => { + + const thumbnail = + + thumbnails.push(thumbnail); + + }); + + return ( +
+

Deep Fake Video Beta

+ +
+

+ Upload audio from vo.codes or any other source and pick a video template + below. +

+
+ +
+ +
+
+ +
+
+ +
+ {thumbnails.map(v => v)} +
+ +
+

+ Hundreds of additional templates will be added in the future. + Feel free to send some to us. As always, check Discord or + like/subscribe Twitter for updates. +

+
+ + + +
+ +

Notes

+ +
+

+ This is a brand new, beta feature. It might break. + I need to reach out to Google Cloud sales engineers to get more GPUs as I'm + currently on a limited trial account (I was previously on Digital Ocean). + Expect this to lag during peak traffic until I get more GPUs. +

+
+
+ ) + } +} + + +export { VideoComponent }; diff --git a/vocodes/src/modes/video/Videos.ts b/vocodes/src/modes/video/Videos.ts new file mode 100644 index 0000000000..c50fae4a5a --- /dev/null +++ b/vocodes/src/modes/video/Videos.ts @@ -0,0 +1,44 @@ + +class VideoTemplate { + name: string; + slug: string; + thumbnail: string; + + constructor( + name: string, + slug: string, + thumbnail: string, + ) { + this.name = name; + this.slug = slug; + this.thumbnail = thumbnail; + } + + static fromJson(json: any) : VideoTemplate { + return new VideoTemplate( + json.name, + json.slug, + json.thumbnail, + ); + } + + getThumbnailUrl() : string { + return `/video-thumbnails/${this.thumbnail}`; + } +} + + +const VIDEO_TEMPLATES : VideoTemplate[] = [ + VideoTemplate.fromJson({ + name: "Donald Trump", + slug: "trump-election-night.mp4", + thumbnail: "donald-trump.webp", + }), + VideoTemplate.fromJson({ + name: "Dr. Phil", + slug: "dr-phil-bubble.mp4", + thumbnail: "dr-phil.webp", + }), +]; + +export { VideoTemplate, VIDEO_TEMPLATES } diff --git a/vocodes/src/navigation/TopNav.tsx b/vocodes/src/navigation/TopNav.tsx index 632de59a5e..571ac0d9e3 100644 --- a/vocodes/src/navigation/TopNav.tsx +++ b/vocodes/src/navigation/TopNav.tsx @@ -13,6 +13,7 @@ function TopNav(props: Props) { props.switchModeCallback(Mode.SPEAK_MODE)}>Vocodes + props.switchModeCallback(Mode.VIDEO_MODE)}>Video props.switchModeCallback(Mode.HISTORY_MODE)}>Replay & Download props.switchModeCallback(Mode.ABOUT_MODE)}>About