d-id

Crates.iod-id
lib.rsd-id
version0.1.0
sourcesrc
created_at2023-11-17 16:30:03.990415
updated_at2023-11-17 16:30:03.990415
descriptionA library for interacting with D-ID's API
homepage
repositoryhttps://github.com/rwxbytes/d-id
max_upload_size
id1039224
size662,648
(rwxbytes)

documentation

README

A lib crate for interacting with D-ID's Api

API Support
Live Streaming

⚙️ Requirements

  • Set API key as environment variable D_ID_API_KEY

🗣️ Usage

Talks

  • Create talking head videos from just text or audio
use d_id::{get_talk, TalkRequestBodyBuilder, upload_image_by_file, Result};

#[tokio::main]
async fn main() -> Result<()> {
    let image = upload_image_by_file("img_test.jpg").await?;

    let req= TalkRequestBodyBuilder::with_text_script()
        .source_url(&image.url)?
        .input("Hello, world!")?
        .build()?;

    let new_talk = req.create_talk().await?;

    let talk = get_talk(&new_talk.id).await?;

    println!("{:#?}", talk);

    Ok(())

}
Commit count: 13

cargo fmt