diff --git a/packages/fakeyou/public/mascot/kitsune_pose2.png b/packages/fakeyou/public/mascot/kitsune_pose2.png new file mode 100644 index 0000000000..771a791e12 Binary files /dev/null and b/packages/fakeyou/public/mascot/kitsune_pose2.png differ diff --git a/packages/fakeyou/src/App.scss b/packages/fakeyou/src/App.scss index 88992895c3..665d2e459d 100644 --- a/packages/fakeyou/src/App.scss +++ b/packages/fakeyou/src/App.scss @@ -121,6 +121,8 @@ nav { padding-left: 16px !important; padding-right: 16px !important; color: $light-text-color; + display: flex; + align-items: center; } .navbar-brand { @@ -131,10 +133,12 @@ nav { font-size: 15px; font-weight: 600; padding: 0.5rem 1rem; - } + display: flex; + align-items: center; - .dropdown-item:active { - background-color: #fc6b68; + &:active { + background-color: #fc6b68; + } } .dropdown-menu { @@ -163,7 +167,7 @@ nav { transition: 0.1s; &:hover { - color: rgba(255, 255, 255, 0.6); + color: rgba($white, 0.6); text-decoration: none; transition: 0.1s; } @@ -173,7 +177,7 @@ nav { .top-bar { display: flex; align-items: center; - background-color: rgba(255, 255, 255, 0.05); + background-color: rgba($white, 0.05); margin-bottom: 5px; padding: 10px 0; backdrop-filter: blur(5px); diff --git a/packages/fakeyou/src/scss/site-refresh.scss b/packages/fakeyou/src/scss/site-refresh.scss index 8cc5557fd7..d0bccbea73 100644 --- a/packages/fakeyou/src/scss/site-refresh.scss +++ b/packages/fakeyou/src/scss/site-refresh.scss @@ -50,10 +50,19 @@ label:focus, box-shadow: none !important; } +code { + color: $primary; + background-color: rgba($white, 0.06); +} + .text-link { color: $primary; } +.text-light { + color: rgba($white, 0.7) !important; +} + .container { max-width: 1080px !important; } @@ -104,6 +113,22 @@ label:focus, background-color: lighten($primary, 5%) !important; } +.btn-secondary, +.btn-secondary:focus, +.btn-secondary:active { + background-color: #fff; + color: #212529; + border: 2.5px solid; + border-color: #fff; + transition: 0.2s; +} +.btn-secondary:hover { + background-color: #ccc; + color: #212529; + border: 2.5px solid; + border-color: #ccc; +} + .panel { position: relative; width: 100%; diff --git a/packages/fakeyou/src/v2/view/NewTopNavFc.tsx b/packages/fakeyou/src/v2/view/NewTopNavFc.tsx index f43ba88749..32780343a9 100644 --- a/packages/fakeyou/src/v2/view/NewTopNavFc.tsx +++ b/packages/fakeyou/src/v2/view/NewTopNavFc.tsx @@ -5,6 +5,11 @@ import { MigrationTopNavSession } from "../../migration/MigrationTopNav_Session" import { FrontendUrlConfig } from "../../common/FrontendUrlConfig"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { + faMicrophone, + faPlus, + faUsers, + faVideo, + faHeadphones, faGavel, faGrinBeamSweat, faList, @@ -54,13 +59,16 @@ function NewTopNavFc(props: Props) {
- + About - - + + Terms of Use - - + + Developers
- - - + + FakeYou: Cartoon and Celebrity Text to Speech +

Built With

-
- models are written in pytorch - core server components are written in Rust - the cluster scales with k8s +
+
+ models are written in pytorch +
+
+ core server components are written in Rust +
+
+ the cluster scales with k8s +
diff --git a/packages/fakeyou/src/v2/view/about/terms_page/TermsPage.tsx b/packages/fakeyou/src/v2/view/about/terms_page/TermsPage.tsx index fca67b906d..61a738b4eb 100644 --- a/packages/fakeyou/src/v2/view/about/terms_page/TermsPage.tsx +++ b/packages/fakeyou/src/v2/view/about/terms_page/TermsPage.tsx @@ -1,82 +1,79 @@ -import React from 'react'; +import React from "react"; -interface Props { -} +interface Props {} function TermsPage(props: Props) { return ( -
- -
-
- -
- -
-
- FakeYou Kitsune Mascot! -
-
- -
-

- Terms and Conditions -

-

- Please use this technology responsibly. -

-
- -
- +
+
+
+

Terms and Conditions

+

+ Please use this technology responsibly. +

-
+
-

Terms of Use

+
+
+

Terms of Use

+
+

+ We do not condone the use of FakeYou for any type of deception, + slur, abuse, or mistreatment of any individual or group. Please + report such abuses to our{" "} + + community staff on Discord + + . Bad actors will have their access revoked and materials deleted. +

+

+ This is a research technology for fun. You may not use FakeYou + deepfakes for commercial use. +

+

+ Do not engage in unlawful activity or attempt to impersonate any + person, company, or other entity. All published usages must be + labled as "deep fake". +

+

+ + The audio we generate is watermarked, and we will soon release a + tool to verify that it is deep fake generated and trace it back + to its source. + +

-

- We do not condone the use of FakeYou for any type of deception, slur, - abuse, or mistreatment of any individual or group. Please report such - abuses to our community staff on Discord. - Bad actors will have their access revoked and materials deleted. -

- -

- This is a research technololgy for fun. You may not use FakeYou deepfakes - for commercial use. -

- -

- Do not engage in unlawful activity or attempt to impersonate any person, - company, or other entity. All published usages must be labled as "deep fake". -

- -

- The audio we generate is watermarked, and we will soon release a tool to - verify that it is deep fake generated and trace it back to its source. -

- -

Takedown Requests

- -

- The machine learning models and content at FakeYou are user-submitted, but we'll be happy to - remove content for any reason for copyright holders, original speakers, voice actors, et al. - Please send us an email to copyright@storyteller.io with details in order to - request a takedown. -

- -

Voice Acting & Musician Jobs

- -

- If you're a voice actor or musician, we're looking to hire talented performers to help us build - commercial-friendly AI voices. (The user-submitted models on FakeYou are just a technology - demonstration and may not be used commercially.) We want to empower small creators (game - designers, musicians, and more) to voice, sing, and speak emotion into their work. Please reach - out to jobs@storyteller.io if you'd like to work with us. We can pay a flat fee - and/or royalty. Please get in touch to learn more! -

+
+

Takedown Requests

+

+ The machine learning models and content at FakeYou are + user-submitted, but we'll be happy to remove content for any + reason for copyright holders, original speakers, voice actors, + et al. Please send us an email to{" "} + copyright@storyteller.io with details in order to + request a takedown. +

+
+
+

Voice Acting & Musician Jobs

+

+ If you're a voice actor or musician, we're looking to hire + talented performers to help us build commercial-friendly AI + voices. (The user-submitted models on FakeYou are just a + technology demonstration and may not be used commercially.) We + want to empower small creators (game designers, musicians, and + more) to voice, sing, and speak emotion into their work. Please + reach out to jobs@storyteller.io if you'd like to + work with us. We can pay a flat fee and/or royalty. Please get + in touch to learn more! +

+
+
+
+
- ) + ); } export { TermsPage }; diff --git a/packages/fakeyou/src/v2/view/tts/tts_model_list/TtsModelListFc.tsx b/packages/fakeyou/src/v2/view/tts/tts_model_list/TtsModelListFc.tsx index b762627824..52a441a91a 100644 --- a/packages/fakeyou/src/v2/view/tts/tts_model_list/TtsModelListFc.tsx +++ b/packages/fakeyou/src/v2/view/tts/tts_model_list/TtsModelListFc.tsx @@ -1,91 +1,104 @@ -import React, { useEffect, useCallback, useState } from 'react'; -import { Link } from 'react-router-dom'; -import { SessionTtsInferenceResultListFc } from '../../_common/SessionTtsInferenceResultsListFc'; -import { SessionTtsModelUploadResultListFc } from '../../_common/SessionTtsModelUploadResultsListFc'; -import { SessionW2lInferenceResultListFc } from '../../_common/SessionW2lInferenceResultsListFc'; -import { SessionW2lTemplateUploadResultListFc } from '../../_common/SessionW2lTemplateUploadResultsListFc'; -import { SessionWrapper } from '@storyteller/components/src/session/SessionWrapper'; -import { Gravatar } from '@storyteller/components/src/elements/Gravatar'; -import { TtsInferenceJob } from '@storyteller/components/src/jobs/TtsInferenceJobs'; -import { TtsModelUploadJob } from '@storyteller/components/src/jobs/TtsModelUploadJobs'; -import { W2lInferenceJob } from '@storyteller/components/src/jobs/W2lInferenceJobs'; -import { W2lTemplateUploadJob } from '@storyteller/components/src/jobs/W2lTemplateUploadJobs'; -import { v4 as uuidv4 } from 'uuid'; -import { ListTtsModels, TtsModelListItem } from '@storyteller/components/src/api/tts/ListTtsModels'; -import { GenerateTtsAudio, GenerateTtsAudioErrorType, GenerateTtsAudioIsError, GenerateTtsAudioIsOk } from '@storyteller/components/src/api/tts/GenerateTtsAudio'; -import { VocodesNotice } from './notices/VocodesNotice'; -import { ListTtsCategories, ListTtsCategoriesIsError, ListTtsCategoriesIsOk } from '../../../api/category/ListTtsCategories'; -import { MultiDropdownSearch } from './MultiDropdownSearch'; -import { SyntheticCategory, TtsCategoryType } from '../../../../AppWrapper'; -import { AutocompleteSearch } from './AutocompleteSearch'; -import { LanguageNotice } from './notices/LanguageNotice'; -import { Language } from '@storyteller/components/src/i18n/Language'; -import { t } from 'i18next'; -import { Trans } from 'react-i18next'; -import { TwitchTtsNotice } from './notices/TwitchTtsNotice'; -import { PleaseFollowNotice } from './notices/PleaseFollowNotice'; +import React, { useEffect, useCallback, useState } from "react"; +import { Link } from "react-router-dom"; +import { SessionTtsInferenceResultListFc } from "../../_common/SessionTtsInferenceResultsListFc"; +import { SessionTtsModelUploadResultListFc } from "../../_common/SessionTtsModelUploadResultsListFc"; +import { SessionW2lInferenceResultListFc } from "../../_common/SessionW2lInferenceResultsListFc"; +import { SessionW2lTemplateUploadResultListFc } from "../../_common/SessionW2lTemplateUploadResultsListFc"; +import { SessionWrapper } from "@storyteller/components/src/session/SessionWrapper"; +import { Gravatar } from "@storyteller/components/src/elements/Gravatar"; +import { TtsInferenceJob } from "@storyteller/components/src/jobs/TtsInferenceJobs"; +import { TtsModelUploadJob } from "@storyteller/components/src/jobs/TtsModelUploadJobs"; +import { W2lInferenceJob } from "@storyteller/components/src/jobs/W2lInferenceJobs"; +import { W2lTemplateUploadJob } from "@storyteller/components/src/jobs/W2lTemplateUploadJobs"; +import { v4 as uuidv4 } from "uuid"; +import { + ListTtsModels, + TtsModelListItem, +} from "@storyteller/components/src/api/tts/ListTtsModels"; +import { + GenerateTtsAudio, + GenerateTtsAudioErrorType, + GenerateTtsAudioIsError, + GenerateTtsAudioIsOk, +} from "@storyteller/components/src/api/tts/GenerateTtsAudio"; +import { VocodesNotice } from "./notices/VocodesNotice"; +import { + ListTtsCategories, + ListTtsCategoriesIsError, + ListTtsCategoriesIsOk, +} from "../../../api/category/ListTtsCategories"; +import { MultiDropdownSearch } from "./MultiDropdownSearch"; +import { SyntheticCategory, TtsCategoryType } from "../../../../AppWrapper"; +import { AutocompleteSearch } from "./AutocompleteSearch"; +import { LanguageNotice } from "./notices/LanguageNotice"; +import { Language } from "@storyteller/components/src/i18n/Language"; +import { t } from "i18next"; +import { Trans } from "react-i18next"; +import { TwitchTtsNotice } from "./notices/TwitchTtsNotice"; +import { PleaseFollowNotice } from "./notices/PleaseFollowNotice"; export interface EnqueueJobResponsePayload { - success: boolean, - inference_job_token?: string, + success: boolean; + inference_job_token?: string; } interface Props { - sessionWrapper: SessionWrapper, + sessionWrapper: SessionWrapper; - isShowingVocodesNotice: boolean, - clearVocodesNotice: () => void, + isShowingVocodesNotice: boolean; + clearVocodesNotice: () => void; - isShowingLanguageNotice: boolean, - clearLanguageNotice: () => void, - displayLanguage: Language, + isShowingLanguageNotice: boolean; + clearLanguageNotice: () => void; + displayLanguage: Language; - isShowingTwitchTtsNotice: boolean, - clearTwitchTtsNotice: () => void, + isShowingTwitchTtsNotice: boolean; + clearTwitchTtsNotice: () => void; - isShowingPleaseFollowNotice: boolean, - clearPleaseFollowNotice: () => void, + isShowingPleaseFollowNotice: boolean; + clearPleaseFollowNotice: () => void; - enqueueTtsJob: (jobToken: string) => void, - ttsInferenceJobs: Array, - ttsModelUploadJobs: Array, - w2lInferenceJobs: Array, - w2lTemplateUploadJobs: Array, - textBuffer: string, - setTextBuffer: (textBuffer: string) => void, - clearTextBuffer: () => void, + enqueueTtsJob: (jobToken: string) => void; + ttsInferenceJobs: Array; + ttsModelUploadJobs: Array; + w2lInferenceJobs: Array; + w2lTemplateUploadJobs: Array; + textBuffer: string; + setTextBuffer: (textBuffer: string) => void; + clearTextBuffer: () => void; - ttsModels: Array, - setTtsModels: (ttsVoices: Array) => void, + ttsModels: Array; + setTtsModels: (ttsVoices: Array) => void; - allTtsCategories: TtsCategoryType[], - setAllTtsCategories: (allTtsCategories: TtsCategoryType[]) => void, + allTtsCategories: TtsCategoryType[]; + setAllTtsCategories: (allTtsCategories: TtsCategoryType[]) => void; - allTtsCategoriesByTokenMap: Map, - allTtsModelsByTokenMap: Map, - ttsModelsByCategoryToken: Map>, + allTtsCategoriesByTokenMap: Map; + allTtsModelsByTokenMap: Map; + ttsModelsByCategoryToken: Map>; - dropdownCategories: TtsCategoryType[][], - setDropdownCategories: (dropdownCategories: TtsCategoryType[][]) => void, - selectedCategories: TtsCategoryType[], - setSelectedCategories: (selectedCategories: TtsCategoryType[]) => void, + dropdownCategories: TtsCategoryType[][]; + setDropdownCategories: (dropdownCategories: TtsCategoryType[][]) => void; + selectedCategories: TtsCategoryType[]; + setSelectedCategories: (selectedCategories: TtsCategoryType[]) => void; - maybeSelectedTtsModel?: TtsModelListItem, - setMaybeSelectedTtsModel: (maybeSelectedTtsModel: TtsModelListItem) => void, + maybeSelectedTtsModel?: TtsModelListItem; + setMaybeSelectedTtsModel: (maybeSelectedTtsModel: TtsModelListItem) => void; } function TtsModelListFc(props: Props) { - - let { - setTtsModels, - setAllTtsCategories, - ttsModels, + let { + setTtsModels, + setAllTtsCategories, + ttsModels, allTtsCategories, maybeSelectedTtsModel, setMaybeSelectedTtsModel, } = props; - const [maybeTtsError, setMaybeTtsError] = useState(undefined); + const [maybeTtsError, setMaybeTtsError] = useState< + GenerateTtsAudioErrorType | undefined + >(undefined); const ttsModelsLoaded = ttsModels.length > 0; const ttsCategoriesLoaded = allTtsCategories.length > 0; @@ -100,17 +113,21 @@ function TtsModelListFc(props: Props) { setTtsModels(models); if (!maybeSelectedTtsModel && models.length > 0) { let model = models[0]; - const featuredModels = models.filter(m => m.is_front_page_featured); + const featuredModels = models.filter((m) => m.is_front_page_featured); if (featuredModels.length > 0) { // Random featured model - model = featuredModels[ - Math.floor(Math.random()*featuredModels.length) - ]; + model = + featuredModels[Math.floor(Math.random() * featuredModels.length)]; } setMaybeSelectedTtsModel(model); } } - }, [setTtsModels, maybeSelectedTtsModel, setMaybeSelectedTtsModel, ttsModelsLoaded]); + }, [ + setTtsModels, + maybeSelectedTtsModel, + setMaybeSelectedTtsModel, + ttsModelsLoaded, + ]); const listTtsCategories = useCallback(async () => { if (ttsCategoriesLoaded) { @@ -118,11 +135,12 @@ function TtsModelListFc(props: Props) { } const categoryList = await ListTtsCategories(); if (ListTtsCategoriesIsOk(categoryList)) { - const serverCategories : TtsCategoryType[] = categoryList.categories; - const dynamicCategories : TtsCategoryType[] = generateSyntheticCategories(); + const serverCategories: TtsCategoryType[] = categoryList.categories; + const dynamicCategories: TtsCategoryType[] = + generateSyntheticCategories(); const allCategories = serverCategories.concat(dynamicCategories); setAllTtsCategories(allCategories); - } else if (ListTtsCategoriesIsError(categoryList)) { + } else if (ListTtsCategoriesIsError(categoryList)) { // TODO: Retry on decay function } }, [setAllTtsCategories, ttsCategoriesLoaded]); @@ -135,12 +153,12 @@ function TtsModelListFc(props: Props) { // TODO: I never did anything with this. let remainingCharactersButtonDisabled = false; - const handleChangeText = (ev: React.FormEvent) => { + const handleChangeText = (ev: React.FormEvent) => { const textValue = (ev.target as HTMLTextAreaElement).value; props.setTextBuffer(textValue); }; - const handleFormSubmit = async (ev: React.FormEvent) => { + const handleFormSubmit = async (ev: React.FormEvent) => { ev.preventDefault(); if (!props.maybeSelectedTtsModel) { @@ -157,9 +175,9 @@ function TtsModelListFc(props: Props) { uuid_idempotency_token: uuidv4(), tts_model_token: modelToken, inference_text: props.textBuffer, - } + }; - const response = await GenerateTtsAudio(request) + const response = await GenerateTtsAudio(request); if (GenerateTtsAudioIsOk(response)) { setMaybeTtsError(undefined); @@ -171,7 +189,7 @@ function TtsModelListFc(props: Props) { return false; }; - const handleClearClick = (ev: React.FormEvent) => { + const handleClearClick = (ev: React.FormEvent) => { ev.preventDefault(); props.clearTextBuffer(); return false; @@ -185,60 +203,69 @@ function TtsModelListFc(props: Props) { let userName = props.maybeSelectedTtsModel.creator_display_name; directViewLink = ( - - See more details about the "{{modelName}}" model - by {{userName}}  + + See more details about the "{{ modelName }}" model + by {{ userName }}  - + ); } - const vocodesNotice = props.isShowingVocodesNotice ? - : - undefined; + const vocodesNotice = props.isShowingVocodesNotice ? ( + + ) : undefined; - const languageNotice = props.isShowingLanguageNotice? - : - undefined; + const languageNotice = props.isShowingLanguageNotice ? ( + + ) : undefined; - const twitchTtsNotice = props.isShowingTwitchTtsNotice ? - : - undefined; + const twitchTtsNotice = props.isShowingTwitchTtsNotice ? ( + + ) : undefined; - - const pleaseFollowNotice = props.isShowingPleaseFollowNotice ? - : - undefined; + const pleaseFollowNotice = props.isShowingPleaseFollowNotice ? ( + + ) : undefined; // Show errors on TTS failure let maybeError = <>; if (!!maybeTtsError) { let hasMessage = false; let message = <>; - switch(maybeTtsError) { + switch (maybeTtsError) { case GenerateTtsAudioErrorType.TooManyRequests: hasMessage = true; message = ( - You're sending too many requests! - Slow down a little. We have to slow things down a little when the server gets busy. + You're sending too many requests! + Slow down a little. We have to slow things down a little when the + server gets busy. - ) + ); break; - case GenerateTtsAudioErrorType.ServerError | - GenerateTtsAudioErrorType.BadRequest | - GenerateTtsAudioErrorType.NotFound: + case GenerateTtsAudioErrorType.ServerError | + GenerateTtsAudioErrorType.BadRequest | + GenerateTtsAudioErrorType.NotFound: break; } if (hasMessage) { maybeError = (
- + {message}
); @@ -247,36 +274,48 @@ function TtsModelListFc(props: Props) { return (
- -
-
- -
- -
-
- FakeYou's mascot! +
+
+
+
+ +
+
+
+
+

+ Text to Speech +

+
+

+ + Use FakeYou's deepfake tech to say stuff with your favorite + characters. + +

-
-

- {t('pages.ttsList.heroTitle')} -

-

- - Use FakeYou deep fake tech to say stuff with your - favorite characters. - -

+
+ + + + + +
-
-
-
- -
+
{pleaseFollowNotice} @@ -286,136 +325,157 @@ function TtsModelListFc(props: Props) { {twitchTtsNotice} -
+
+
+

Create TTS

+
+
+ + - + - + {directViewLink} - {directViewLink} +
+
+ +
+
-
-
+ {maybeError} -
-
- -
-
- - {maybeError} - -
-
-
- -
-
- +
+
+
+ +
+
+ +
+
+
+
- - +


- +

+ />

+ />

- + />
- ) + ); } -function generateSyntheticCategories() : SyntheticCategory[] { +function generateSyntheticCategories(): SyntheticCategory[] { return [ // Under-categorized - new SyntheticCategory('Under-categorized Models', 'syn:under'), - new SyntheticCategory('With 0 categories', 'syn:uncategorized', 'syn:under'), - new SyntheticCategory('With 1 category', 'syn:one-category', 'syn:under'), + new SyntheticCategory("Under-categorized Models", "syn:under"), + new SyntheticCategory( + "With 0 categories", + "syn:uncategorized", + "syn:under" + ), + new SyntheticCategory("With 1 category", "syn:one-category", "syn:under"), // Most recent - new SyntheticCategory('Most Recent Voices', 'syn:most-recent'), - ] + new SyntheticCategory("Most Recent Voices", "syn:most-recent"), + ]; } // Directly mutate the model records function dynamicallyCategorizeModels(models: TtsModelListItem[]) { // NB: Sorting by creation date will involve more refactoring, so this is fine for now. - const mostRecentModelTokens = new Set([...models].sort((modelA, modelB) => { - const dateA = new Date(modelA.created_at); - const dateB = new Date(modelB.created_at); - if (dateA > dateB) { - return -1; - } else if (dateA < dateB) { - return 1; - } else { - return 0; - } - }).map(model => model.model_token).slice(0, 25)); + const mostRecentModelTokens = new Set( + [...models] + .sort((modelA, modelB) => { + const dateA = new Date(modelA.created_at); + const dateB = new Date(modelB.created_at); + if (dateA > dateB) { + return -1; + } else if (dateA < dateB) { + return 1; + } else { + return 0; + } + }) + .map((model) => model.model_token) + .slice(0, 25) + ); - models.forEach(model => { + models.forEach((model) => { if (!model.category_tokens) { model.category_tokens = []; } if (model.category_tokens.length === 1) { - model.category_tokens.push('syn:one-category'); + model.category_tokens.push("syn:one-category"); } else if (model.category_tokens.length === 0) { - model.category_tokens.push('syn:uncategorized'); + model.category_tokens.push("syn:uncategorized"); } if (mostRecentModelTokens.has(model.model_token)) { - model.category_tokens.push('syn:most-recent'); + model.category_tokens.push("syn:most-recent"); } - }) + }); } export { TtsModelListFc };