vapi_client/models/
fallback_deepgram_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 FallbackDeepgramVoice {
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::DeepgramVoiceVoiceId>,
21    /// 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
22    #[serde(rename = "mipOptOut", skip_serializing_if = "Option::is_none")]
23    pub mip_opt_out: Option<bool>,
24    /// This is the plan for chunking the model output before it is sent to the voice provider.
25    #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
26    pub chunk_plan: Option<Box<models::ChunkPlan>>,
27}
28
29impl FallbackDeepgramVoice {
30    pub fn new(provider: Provider, voice_id: models::DeepgramVoiceVoiceId) -> FallbackDeepgramVoice {
31        FallbackDeepgramVoice {
32            provider,
33            voice_id: Box::new(voice_id),
34            mip_opt_out: None,
35            chunk_plan: None,
36        }
37    }
38}
39/// This is the voice provider that will be used.
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
41pub enum Provider {
42    #[serde(rename = "deepgram")]
43    Deepgram,
44}
45
46impl Default for Provider {
47    fn default() -> Provider {
48        Self::Deepgram
49    }
50}
51