vapi_client/models/
fallback_vapi_voice.rs

1/*
2 * Vapi API
3 *
4 * Voice AI for developers.
5 *
6 * The version of the OpenAPI document: 1.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct FallbackVapiVoice {
16    /// This is the voice provider that will be used.
17    #[serde(rename = "provider")]
18    pub provider: Provider,
19    /// The voices provided by Vapi
20    #[serde(rename = "voiceId")]
21    pub voice_id: VoiceId,
22    /// This is the plan for chunking the model output before it is sent to the voice provider.
23    #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
24    pub chunk_plan: Option<Box<models::ChunkPlan>>,
25}
26
27impl FallbackVapiVoice {
28    pub fn new(provider: Provider, voice_id: VoiceId) -> FallbackVapiVoice {
29        FallbackVapiVoice {
30            provider,
31            voice_id,
32            chunk_plan: None,
33        }
34    }
35}
36/// This is the voice provider that will be used.
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum Provider {
39    #[serde(rename = "vapi")]
40    Vapi,
41}
42
43impl Default for Provider {
44    fn default() -> Provider {
45        Self::Vapi
46    }
47}
48/// The voices provided by Vapi
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum VoiceId {
51    #[serde(rename = "Elliot")]
52    Elliot,
53    #[serde(rename = "Rohan")]
54    Rohan,
55    #[serde(rename = "Lily")]
56    Lily,
57    #[serde(rename = "Savannah")]
58    Savannah,
59    #[serde(rename = "Hana")]
60    Hana,
61    #[serde(rename = "Neha")]
62    Neha,
63    #[serde(rename = "Cole")]
64    Cole,
65    #[serde(rename = "Harry")]
66    Harry,
67    #[serde(rename = "Paige")]
68    Paige,
69}
70
71impl Default for VoiceId {
72    fn default() -> VoiceId {
73        Self::Elliot
74    }
75}
76