This commit is contained in:
mc_fdc
2023-04-08 18:49:54 +00:00
parent 126f4b7d7b
commit d7e51ed671
5 changed files with 9 additions and 14 deletions

View File

@ -1,15 +1,13 @@
use reqwest::{header::HeaderMap, Result};
use std::{fs::File, io::Write};
use voicevox_client::Client;
use reqwest::{Result, header::HeaderMap};
use std::{io::Write, fs::File};
#[tokio::main]
async fn main() -> Result<()> {
let client = Client::new("http://localhost:50021".to_string(), None);
let audio_query = client
.create_audio_query("こんにちは", 1, None)
.await?;
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(())
}
}