vapi_client/models/
fallback_smallest_ai_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 FallbackSmallestAiVoice {
16    /// This is the voice provider that will be used.
17    #[serde(rename = "provider")]
18    pub provider: Provider,
19    #[serde(rename = "voiceId")]
20    pub voice_id: Box<models::SmallestAiVoiceVoiceId>,
21    /// Smallest AI voice model to use. Defaults to 'lightning' when not specified.
22    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
23    pub model: Option<Model>,
24    /// This is the speed multiplier that will be used.
25    #[serde(rename = "speed", skip_serializing_if = "Option::is_none")]
26    pub speed: Option<f64>,
27    /// This is the plan for chunking the model output before it is sent to the voice provider.
28    #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
29    pub chunk_plan: Option<Box<models::ChunkPlan>>,
30}
31
32impl FallbackSmallestAiVoice {
33    pub fn new(provider: Provider, voice_id: models::SmallestAiVoiceVoiceId) -> FallbackSmallestAiVoice {
34        FallbackSmallestAiVoice {
35            provider,
36            voice_id: Box::new(voice_id),
37            model: None,
38            speed: None,
39            chunk_plan: None,
40        }
41    }
42}
43/// This is the voice provider that will be used.
44#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
45pub enum Provider {
46    #[serde(rename = "smallest-ai")]
47    SmallestAi,
48}
49
50impl Default for Provider {
51    fn default() -> Provider {
52        Self::SmallestAi
53    }
54}
55/// Smallest AI voice model to use. Defaults to 'lightning' when not specified.
56#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
57pub enum Model {
58    #[serde(rename = "lightning")]
59    Lightning,
60}
61
62impl Default for Model {
63    fn default() -> Model {
64        Self::Lightning
65    }
66}
67