elevenlabs_rs

Crates.ioelevenlabs_rs
lib.rselevenlabs_rs
version0.3.2
sourcesrc
created_at2023-08-07 03:28:27.179557
updated_at2024-11-03 15:46:36.448714
descriptionA lib crate for ElevenLabs
homepage
repositoryhttps://github.com/rwxbytes/elevenlabs_rs
max_upload_size
id937617
size268,994
(rwxbytes)

documentation

README

An unofficial lib crate for ElevenLabs

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(())
}
Commit count: 59

cargo fmt