Crates.io | voicevox-client |
lib.rs | voicevox-client |
version | 0.1.1 |
source | src |
created_at | 2023-04-08 07:30:19.0951 |
updated_at | 2023-04-08 07:37:43.650245 |
description | Unofficial voicevox engine wrapper |
homepage | |
repository | https://github.com/voicevox-client/rust |
max_upload_size | |
id | 833479 |
size | 30,532 |
use voicevox_client::Client;
use reqwest::Result;
use std::{io::Write, fs::File};
#[tokio::main]
async fn main() -> Result<()> {
let client = Client::new("http://localhost:50021".to_string());
let audio_query = client
.create_audio_query("こんにちは", 1, None)
.await?;
let audio = audio_query.synthesis(1).await?;
let mut file = File::create("examples/hello.wav").unwrap();
file.write_all(&audio).unwrap();
Ok(())
}