vapi_client/models/
fallback_deepgram_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 FallbackDeepgramVoice {
17    /// This is the voice provider that will be used.
18    #[serde(rename = "provider")]
19    pub provider: Provider,
20    #[serde(rename = "voiceId")]
21    pub voice_id: models::DeepgramVoiceVoiceId,
22    /// If set to true, this will add mip_opt_out=true as a query parameter of all API requests. See https://developers.deepgram.com/docs/the-deepgram-model-improvement-partnership-program#want-to-opt-out  This will only be used if you are using your own Deepgram API key.  @default false
23    #[serde(rename = "mipOptOut", skip_serializing_if = "Option::is_none")]
24    pub mip_opt_out: Option<bool>,
25    /// This is the plan for chunking the model output before it is sent to the voice provider.
26    #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
27    pub chunk_plan: Option<models::ChunkPlan>,
28}
29
30impl FallbackDeepgramVoice {
31    pub fn new(
32        provider: Provider,
33        voice_id: models::DeepgramVoiceVoiceId,
34    ) -> FallbackDeepgramVoice {
35        FallbackDeepgramVoice {
36            provider,
37            voice_id,
38            mip_opt_out: 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 = "deepgram")]
47    Deepgram,
48}
49
50impl Default for Provider {
51    fn default() -> Provider {
52        Self::Deepgram
53    }
54}