Crate elevenlabs_rs
source ·Expand description
An unofficial lib crate for ElevenLabs.
ElevenLabs’ web app: https://elevenlabs.io/
ElevenLabs’ API documentation: https://docs.elevenlabs.io/api-reference/quick-start/introduction.
§Example
§Text to Speech
use elevenlabs_rs::*;
use elevenlabs_rs::utils::play;
#[tokio::main]
async fn main() -> Result<()> {
let client = ElevenLabsClient::default()?;
let body = TextToSpeechBody::new(
"This is the way the world ends, not with a bang but a whimper",
Model::ElevenMultilingualV2,
);
let endpoint = TextToSpeech::new(PreMadeVoiceID::Clyde, body);
let speech = client.hit(endpoint).await?;
play(speech)?;
Ok(())
}
Re-exports§
pub use crate::endpoints::audio_isolation::*;
pub use crate::endpoints::audio_native::*;
pub use crate::endpoints::dubbing::*;
pub use crate::endpoints::history::*;
pub use crate::endpoints::models::*;
pub use crate::endpoints::projects::*;
pub use crate::endpoints::pronunciation::*;
pub use crate::endpoints::samples::*;
pub use crate::endpoints::sound_generation::*;
pub use crate::endpoints::sts::*;
pub use crate::endpoints::tts::*;
pub use crate::endpoints::tts::ws::*;
pub use crate::endpoints::user::*;
pub use crate::endpoints::voice::*;
pub use crate::endpoints::voice_generation::*;
pub use crate::endpoints::voice_library::*;
Modules§
Macros§
- Pins a value on the stack.
Structs§
- A cheaply cloneable and sliceable chunk of contiguous memory.
Enums§
- See Elevenlabs documentation on supported output formats.
Traits§
- An extension trait for
Stream
s that provides a variety of convenient combinator functions.