vapi_client/models/
deepgram_voice.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct DeepgramVoice {
16 #[serde(rename = "provider")]
18 pub provider: Provider,
19 #[serde(rename = "voiceId")]
20 pub voice_id: Box<models::DeepgramVoiceVoiceId>,
21 #[serde(rename = "mipOptOut", skip_serializing_if = "Option::is_none")]
23 pub mip_opt_out: Option<bool>,
24 #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
26 pub chunk_plan: Option<Box<models::ChunkPlan>>,
27 #[serde(rename = "fallbackPlan", skip_serializing_if = "Option::is_none")]
29 pub fallback_plan: Option<Box<models::FallbackPlan>>,
30}
31
32impl DeepgramVoice {
33 pub fn new(provider: Provider, voice_id: models::DeepgramVoiceVoiceId) -> DeepgramVoice {
34 DeepgramVoice {
35 provider,
36 voice_id: Box::new(voice_id),
37 mip_opt_out: None,
38 chunk_plan: None,
39 fallback_plan: None,
40 }
41 }
42}
43#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
45pub enum Provider {
46 #[serde(rename = "deepgram")]
47 Deepgram,
48}
49
50impl Default for Provider {
51 fn default() -> Provider {
52 Self::Deepgram
53 }
54}
55