voicevox_api 0.14.4

VOICEVOX API binding
Documentation
/*
 * VOICEVOX Engine
 *
 * VOICEVOXの音声合成エンジンです。
 *
 * The version of the OpenAPI document: 0.14.4
 *
 * Generated by: https://openapi-generator.tech
 */

/// Preset : プリセット情報

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Preset {
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "speaker_uuid")]
    pub speaker_uuid: String,
    #[serde(rename = "style_id")]
    pub style_id: i32,
    #[serde(rename = "speedScale")]
    pub speed_scale: f32,
    #[serde(rename = "pitchScale")]
    pub pitch_scale: f32,
    #[serde(rename = "intonationScale")]
    pub intonation_scale: f32,
    #[serde(rename = "volumeScale")]
    pub volume_scale: f32,
    #[serde(rename = "prePhonemeLength")]
    pub pre_phoneme_length: f32,
    #[serde(rename = "postPhonemeLength")]
    pub post_phoneme_length: f32,
}

impl Preset {
    /// プリセット情報
    pub fn new(
        id: i32,
        name: String,
        speaker_uuid: String,
        style_id: i32,
        speed_scale: f32,
        pitch_scale: f32,
        intonation_scale: f32,
        volume_scale: f32,
        pre_phoneme_length: f32,
        post_phoneme_length: f32,
    ) -> Preset {
        Preset {
            id,
            name,
            speaker_uuid,
            style_id,
            speed_scale,
            pitch_scale,
            intonation_scale,
            volume_scale,
            pre_phoneme_length,
            post_phoneme_length,
        }
    }
}