1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
use serde::Deserialize;
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct Voices {
pub(crate) voices: Vec<Voice>,
}
/// Details about a specific voice.
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Voice {
/// The gender of the voice: male or female.
pub gender: String,
/// Additional service features that are supported with the voice.
#[serde(rename = "supported_features")]
pub supported_features: SupportedFeatures,
/// The name of the voice. Used as the voice identifier in all requests.
pub name: String,
/// If true, the voice can be customized; if false, the voice cannot be customized. (Same as custom_pronunciation; maintained for backward compatibility.)
pub customizable: bool,
/// A textual description of the voice.
pub description: String,
/// The language and region of the voice (for example, `en-US`).
pub language: String,
/// The URI of the voice.
pub url: String,
}
/// Additional service features that are supported with the voice.
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SupportedFeatures {
/// If true, the voice can be customized; if false, the voice cannot be customized. (Same as [customizable](Voice::customizable))
#[serde(rename = "custom_pronunciation")]
pub custom_pronunciation: bool,
/// If true, the voice can be transformed by using the SSML <voice-transformation> element; if false, the voice cannot be transformed. The feature was available only for the now-deprecated standard voices. You cannot use the feature with neural voices.
#[serde(rename = "voice_transformation")]
pub voice_transformation: bool,
}
