vapi_client/models/
neets_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};
12use utoipa::OpenApi;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, OpenApi)]
18pub struct NeetsVoice {
19    /// This is the voice provider that will be used.
20    #[serde(rename = "provider")]
21    pub provider: Provider,
22    #[serde(rename = "voiceId")]
23    pub voice_id: models::NeetsVoiceVoiceId,
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<models::ChunkPlan>,
27    /// This is the plan for voice provider fallbacks in the event that the primary voice provider fails.
28    #[serde(rename = "fallbackPlan", skip_serializing_if = "Option::is_none")]
29    pub fallback_plan: Option<models::FallbackPlan>,
30}
31
32impl NeetsVoice {
33    pub fn new(provider: Provider, voice_id: models::NeetsVoiceVoiceId) -> NeetsVoice {
34        NeetsVoice {
35            provider,
36            voice_id,
37            chunk_plan: None,
38            fallback_plan: None,
39        }
40    }
41}
42/// This is the voice provider that will be used.
43#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, OpenApi)]
44pub enum Provider {
45    #[serde(rename = "neets")]
46    Neets,
47}
48
49impl Default for Provider {
50    fn default() -> Provider {
51        Self::Neets
52    }
53}