vapi_client/models/
fallback_azure_voice.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FallbackAzureVoice {
17    /// This is the voice provider that will be used.
18    #[serde(rename = "provider")]
19    pub provider: Provider,
20    #[serde(rename = "voiceId")]
21    pub voice_id: models::AzureVoiceVoiceId,
22    /// This is the speed multiplier that will be used.
23    #[serde(rename = "speed", skip_serializing_if = "Option::is_none")]
24    pub speed: Option<f64>,
25    /// This is the plan for chunking the model output before it is sent to the voice provider.
26    #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
27    pub chunk_plan: Option<models::ChunkPlan>,
28}
29
30impl FallbackAzureVoice {
31    pub fn new(provider: Provider, voice_id: models::AzureVoiceVoiceId) -> FallbackAzureVoice {
32        FallbackAzureVoice {
33            provider,
34            voice_id,
35            speed: None,
36            chunk_plan: None,
37        }
38    }
39}
40/// This is the voice provider that will be used.
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
42pub enum Provider {
43    #[serde(rename = "azure")]
44    Azure,
45}
46
47impl Default for Provider {
48    fn default() -> Provider {
49        Self::Azure
50    }
51}