vapi_client/models/
fallback_vapi_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 FallbackVapiVoice {
17    /// This is the voice provider that will be used.
18    #[serde(rename = "provider")]
19    pub provider: Provider,
20    /// The voices provided by Vapi
21    #[serde(rename = "voiceId")]
22    pub voice_id: VoiceId,
23    /// This is the plan for chunking the model output before it is sent to the voice provider.
24    #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
25    pub chunk_plan: Option<models::ChunkPlan>,
26}
27
28impl FallbackVapiVoice {
29    pub fn new(provider: Provider, voice_id: VoiceId) -> FallbackVapiVoice {
30        FallbackVapiVoice {
31            provider,
32            voice_id,
33            chunk_plan: None,
34        }
35    }
36}
37/// This is the voice provider that will be used.
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
39pub enum Provider {
40    #[serde(rename = "vapi")]
41    Vapi,
42}
43
44impl Default for Provider {
45    fn default() -> Provider {
46        Self::Vapi
47    }
48}
49/// The voices provided by Vapi
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
51pub enum VoiceId {
52    #[serde(rename = "Jordan")]
53    Jordan,
54    #[serde(rename = "Adi")]
55    Adi,
56    #[serde(rename = "Julia")]
57    Julia,
58    #[serde(rename = "Maibri (Web)")]
59    MaibriLeftParenthesisWebRightParenthesis,
60    #[serde(rename = "Maibri (Phone)")]
61    MaibriLeftParenthesisPhoneRightParenthesis,
62    #[serde(rename = "Ashley")]
63    Ashley,
64}
65
66impl Default for VoiceId {
67    fn default() -> VoiceId {
68        Self::Jordan
69    }
70}