From 198d4b083ee953ebe76bb61afbe9b85c741fceb8 Mon Sep 17 00:00:00 2001 From: tuna2134 Date: Sat, 8 Apr 2023 16:18:38 +0900 Subject: [PATCH] pkay --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ce93d93..b7f8a91 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,17 @@ ## Example ```rust use voicevox_client::Client; - +use std::{io::Write, fs::File}; #[tokio::main] async fn main() { let client = Client::new("http://localhost:50021".to_string()); - let audio_query = client.create_audio_query("hello", 1) - .await - .unwrap(); - let bytes = audio_query.synthesis(1) + let audio_query = client + .create_audio_query("こんにちは", 1, None) .await .unwrap(); + let audio = audio_query.synthesis(1).await.unwrap(); + let mut file = File::create("examples/hello.wav").unwrap(); + file.write_all(&audio).unwrap(); } ``` \ No newline at end of file