mirror of
https://github.com/mii443/rust.git
synced 2025-08-22 16:25:37 +00:00
ok
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/target
|
/target
|
||||||
/Cargo.lock
|
/Cargo.lock
|
||||||
|
*.wav
|
@ -1,4 +1,5 @@
|
|||||||
use voicevox_client::Client;
|
use voicevox_client::Client;
|
||||||
|
use std::{io::Write, fs::File};
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
@ -8,5 +9,6 @@ async fn main() {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let audio = audio_query.synthesis(1).await.unwrap();
|
let audio = audio_query.synthesis(1).await.unwrap();
|
||||||
println!("audio: {:?}", audio);
|
let mut file = File::create("examples/hello.wav").unwrap();
|
||||||
|
file.write_all(&audio).unwrap();
|
||||||
}
|
}
|
@ -4,9 +4,9 @@ use serde::{Deserialize, Serialize};
|
|||||||
pub struct Mora {
|
pub struct Mora {
|
||||||
text: String,
|
text: String,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
consonant: String,
|
consonant: Option<String>,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
consonant_length: f32,
|
consonant_length: Option<f32>,
|
||||||
vowel: String,
|
vowel: String,
|
||||||
vowel_length: f32,
|
vowel_length: f32,
|
||||||
pitch: f32,
|
pitch: f32,
|
||||||
@ -14,13 +14,11 @@ pub struct Mora {
|
|||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
pub struct AccentPhrase {
|
pub struct AccentPhrase {
|
||||||
// moras: Vec<Mora>,
|
moras: Vec<Mora>,
|
||||||
accent: i32,
|
accent: i32,
|
||||||
// pause_mora: Mora,
|
// pause_mora: Mora,
|
||||||
/*
|
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
is_interrogative: bool,
|
is_interrogative: bool,
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
|
Reference in New Issue
Block a user