mirror of
https://github.com/mii443/rust.git
synced 2025-08-22 16:25:37 +00:00
bump version
This commit is contained in:
@ -1,11 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "voicevox-client"
|
name = "voicevox-client"
|
||||||
description = "Unofficial voicevox engine wrapper"
|
description = "Unofficial voicevox engine wrapper"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/voicevox-client/rust"
|
repository = "https://github.com/voicevox-client/rust"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
license-file = "LICENSE"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
@ -3,17 +3,18 @@
|
|||||||
## Example
|
## Example
|
||||||
```rust
|
```rust
|
||||||
use voicevox_client::Client;
|
use voicevox_client::Client;
|
||||||
|
use reqwest::Result;
|
||||||
use std::{io::Write, fs::File};
|
use std::{io::Write, fs::File};
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() -> Result<()> {
|
||||||
let client = Client::new("http://localhost:50021".to_string());
|
let client = Client::new("http://localhost:50021".to_string());
|
||||||
let audio_query = client
|
let audio_query = client
|
||||||
.create_audio_query("こんにちは", 1, None)
|
.create_audio_query("こんにちは", 1, None)
|
||||||
.await
|
.await?;
|
||||||
.unwrap();
|
let audio = audio_query.synthesis(1).await?;
|
||||||
let audio = audio_query.synthesis(1).await.unwrap();
|
|
||||||
let mut file = File::create("examples/hello.wav").unwrap();
|
let mut file = File::create("examples/hello.wav").unwrap();
|
||||||
file.write_all(&audio).unwrap();
|
file.write_all(&audio).unwrap();
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
```
|
```
|
@ -1,14 +1,15 @@
|
|||||||
use voicevox_client::Client;
|
use voicevox_client::Client;
|
||||||
|
use reqwest::Result;
|
||||||
use std::{io::Write, fs::File};
|
use std::{io::Write, fs::File};
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() -> Result<()> {
|
||||||
let client = Client::new("http://localhost:50021".to_string());
|
let client = Client::new("http://localhost:50021".to_string());
|
||||||
let audio_query = client
|
let audio_query = client
|
||||||
.create_audio_query("こんにちは", 1, None)
|
.create_audio_query("こんにちは", 1, None)
|
||||||
.await
|
.await?;
|
||||||
.unwrap();
|
let audio = audio_query.synthesis(1).await?;
|
||||||
let audio = audio_query.synthesis(1).await.unwrap();
|
|
||||||
let mut file = File::create("examples/hello.wav").unwrap();
|
let mut file = File::create("examples/hello.wav").unwrap();
|
||||||
file.write_all(&audio).unwrap();
|
file.write_all(&audio).unwrap();
|
||||||
|
Ok(())
|
||||||
}
|
}
|
Reference in New Issue
Block a user