vapi_client/models/
fallback_sesame_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 FallbackSesameVoice {
16    /// This is the flag to toggle voice caching for the assistant.
17    #[serde(rename = "cachingEnabled", skip_serializing_if = "Option::is_none")]
18    pub caching_enabled: Option<bool>,
19    /// This is the voice provider that will be used.
20    #[serde(rename = "provider")]
21    pub provider: ProviderTrue,
22    /// This is the provider-specific ID that will be used.
23    #[serde(rename = "voiceId")]
24    pub voice_id: String,
25    /// This is the model that will be used.
26    #[serde(rename = "model")]
27    pub model: ModelTrue,
28    /// This is the plan for chunking the model output before it is sent to the voice provider.
29    #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
30    pub chunk_plan: Option<models::ChunkPlan>,
31}
32
33impl FallbackSesameVoice {
34    pub fn new(provider: ProviderTrue, voice_id: String, model: ModelTrue) -> FallbackSesameVoice {
35        FallbackSesameVoice {
36            caching_enabled: None,
37            provider,
38            voice_id,
39            model,
40            chunk_plan: None,
41        }
42    }
43}
44/// This is the voice provider that will be used.
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum ProviderTrue {
47    #[serde(rename = "sesame")]
48    Sesame,
49}
50
51impl Default for ProviderTrue {
52    fn default() -> ProviderTrue {
53        Self::Sesame
54    }
55}
56/// This is the model that will be used.
57#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
58pub enum ModelTrue {
59    #[serde(rename = "csm-1b")]
60    Csm1b,
61}
62
63impl Default for ModelTrue {
64    fn default() -> ModelTrue {
65        Self::Csm1b
66    }
67}