fakeyou-api
A very simple Rust library for FakeYou API.
API
Check the official API reference.
| API | Support |
|---|---|
| Text to Speech | ✔️ |
| Voices | ❌ |
| Categories | ❌ |
Usage
Install the library using the Cargo.toml file or run the following command.
cargo add fakeyou-api
Export your API key into the environment variables (if you use the paid version).
export FAKEYOU_API_KEY=...
Then use the crate in your Rust code:
// Import the dependencies
// Import the dependencies
use ;
// You can create a default client without any api key.
// You can also load the API key from environment FAKEYOU_API_KEY.
// You can also hadcode through `Auth::new(<your_api_key>)`, but it is not recommended.
let auth = default;
let fakeyou = new;
// Create the TTS body
let inference_body = InferenceBody ;
// Call the TTS API
let inference_result = fakeyou.tts_inference.unwrap;
// Print the result
println!;
loop
License
This project is licensed under MIT