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
|
||||
/Cargo.lock
|
||||
*.wav
|
@ -1,4 +1,5 @@
|
||||
use voicevox_client::Client;
|
||||
use std::{io::Write, fs::File};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
@ -8,5 +9,6 @@ async fn main() {
|
||||
.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 {
|
||||
text: String,
|
||||
#[serde(default)]
|
||||
consonant: String,
|
||||
consonant: Option<String>,
|
||||
#[serde(default)]
|
||||
consonant_length: f32,
|
||||
consonant_length: Option<f32>,
|
||||
vowel: String,
|
||||
vowel_length: f32,
|
||||
pitch: f32,
|
||||
@ -14,13 +14,11 @@ pub struct Mora {
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct AccentPhrase {
|
||||
// moras: Vec<Mora>,
|
||||
moras: Vec<Mora>,
|
||||
accent: i32,
|
||||
// pause_mora: Mora,
|
||||
/*
|
||||
#[serde(default)]
|
||||
is_interrogative: bool,
|
||||
*/
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
Reference in New Issue
Block a user