csharp-fakeyounet

Use Fakeyou.com from C# with FakeYouNet

  • 2 min

FakeYouNET is a .NET library that allows you to interact with the Fakeyou.com API from an application written in C#.

FakeYou.com is a platform that uses artificial intelligence to generate audio from text by imitating famous characters, which has caught the attention of many users due to its ability to generate audio with the voices of famous characters.

The technology behind this website is artificial intelligence (AI), which allows for voice synthesis that mimics a person’s voice. This website is a fun tool for creating fictional dialogues and hearing them in the voices of celebrities like Donald Trump, Barack Obama, Elon Musk, and many more.

The FakeYouNET library allows us to interact with the FakeYou.Com API to generate audio from a C# application. We can choose the voice and download the audio, or even play it directly in our application.

FakeYou.Com is free, with the option to have a premium account. If you have a premium account, the wait time to get the audio is significantly reduced.

FakeYouNET is developed in NET6, so it is compatible with Windows, Linux, Android, and macOS.

How to use FakeYouNET

We can easily add the library to a .NET project through the corresponding Nuget package.

Install-Package FakeYouNet

Here are some examples of how to use FakeYouNET, extracted from the library’s documentation.

var client = new Client();
var voice = await client.FindVoiceByTitle("mario");

var bytes = await client.MakeTTS(voice, "testing 1, 2, 3, testing");
Copied!
var client = new Client();
var voice = await client.FindVoiceByTitle("mario");

await client.DownloadMakeTTS(voice, "testing 1, 2, 3, testing", "test.wav");
Copied!