mirror of
https://github.com/mii443/ncb-tts-r2.git
synced 2025-08-22 16:15:29 +00:00
add VOICEVOX structs
This commit is contained in:
@ -0,0 +1 @@
|
||||
pub mod structs;
|
11
src/tts/voicevox/structs/accent_phrase.rs
Normal file
11
src/tts/voicevox/structs/accent_phrase.rs
Normal file
@ -0,0 +1,11 @@
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
use super::mora::Mora;
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||
pub struct AccentPhrase {
|
||||
pub moras: Vec<Mora>,
|
||||
pub accent: f64,
|
||||
pub pause_mora: Option<Mora>,
|
||||
pub is_interrogative: bool
|
||||
}
|
18
src/tts/voicevox/structs/audio_query.rs
Normal file
18
src/tts/voicevox/structs/audio_query.rs
Normal file
@ -0,0 +1,18 @@
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
use super::accent_phrase::AccentPhrase;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||
pub struct AudioQuery {
|
||||
pub accent_phrases: Vec<AccentPhrase>,
|
||||
pub speedScale: f64,
|
||||
pub pitchScale: f64,
|
||||
pub intonationScale: f64,
|
||||
pub volumeScale: f64,
|
||||
pub prePhonemeLength: f64,
|
||||
pub postPhonemeLength: f64,
|
||||
pub outputSamplingRate: f64,
|
||||
pub outputStereo: bool,
|
||||
pub kana: Option<String>
|
||||
}
|
3
src/tts/voicevox/structs/mod.rs
Normal file
3
src/tts/voicevox/structs/mod.rs
Normal file
@ -0,0 +1,3 @@
|
||||
pub mod mora;
|
||||
pub mod audio_query;
|
||||
pub mod accent_phrase;
|
11
src/tts/voicevox/structs/mora.rs
Normal file
11
src/tts/voicevox/structs/mora.rs
Normal file
@ -0,0 +1,11 @@
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||
pub struct Mora {
|
||||
pub text: String,
|
||||
pub consonant: Option<String>,
|
||||
pub consonant_length: Option<f64>,
|
||||
pub vowel: String,
|
||||
pub vowel_length: f64,
|
||||
pub pitch: f64
|
||||
}
|
Reference in New Issue
Block a user