vapi_client/models/
voice_library.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::ToSchema;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
18pub struct VoiceLibrary {
19    /// This is the voice provider that will be used.
20    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
21    pub provider: Option<Provider>,
22    /// The ID of the voice provided by the provider.
23    #[serde(rename = "providerId", skip_serializing_if = "Option::is_none")]
24    pub provider_id: Option<String>,
25    /// The unique slug of the voice.
26    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
27    pub slug: Option<String>,
28    /// The name of the voice.
29    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
30    pub name: Option<String>,
31    /// The language of the voice.
32    #[serde(rename = "language", skip_serializing_if = "Option::is_none")]
33    pub language: Option<String>,
34    /// The language code of the voice.
35    #[serde(rename = "languageCode", skip_serializing_if = "Option::is_none")]
36    pub language_code: Option<String>,
37    /// The model of the voice.
38    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
39    pub model: Option<String>,
40    /// The supported models of the voice.
41    #[serde(rename = "supportedModels", skip_serializing_if = "Option::is_none")]
42    pub supported_models: Option<String>,
43    /// The gender of the voice.
44    #[serde(rename = "gender", skip_serializing_if = "Option::is_none")]
45    pub gender: Option<Gender>,
46    /// The accent of the voice.
47    #[serde(rename = "accent", skip_serializing_if = "Option::is_none")]
48    pub accent: Option<String>,
49    /// The preview URL of the voice.
50    #[serde(rename = "previewUrl", skip_serializing_if = "Option::is_none")]
51    pub preview_url: Option<String>,
52    /// The description of the voice.
53    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
54    pub description: Option<String>,
55    /// The credential ID of the voice.
56    #[serde(rename = "credentialId", skip_serializing_if = "Option::is_none")]
57    pub credential_id: Option<String>,
58    /// The unique identifier for the voice library.
59    #[serde(rename = "id")]
60    pub id: String,
61    /// The unique identifier for the organization that this voice library belongs to.
62    #[serde(rename = "orgId")]
63    pub org_id: String,
64    /// The Public voice is shared accross all the organizations.
65    #[serde(rename = "isPublic")]
66    pub is_public: bool,
67    /// The deletion status of the voice.
68    #[serde(rename = "isDeleted")]
69    pub is_deleted: bool,
70    /// The ISO 8601 date-time string of when the voice library was created.
71    #[serde(rename = "createdAt")]
72    pub created_at: String,
73    /// The ISO 8601 date-time string of when the voice library was last updated.
74    #[serde(rename = "updatedAt")]
75    pub updated_at: String,
76}
77
78impl VoiceLibrary {
79    pub fn new(
80        id: String,
81        org_id: String,
82        is_public: bool,
83        is_deleted: bool,
84        created_at: String,
85        updated_at: String,
86    ) -> VoiceLibrary {
87        VoiceLibrary {
88            provider: None,
89            provider_id: None,
90            slug: None,
91            name: None,
92            language: None,
93            language_code: None,
94            model: None,
95            supported_models: None,
96            gender: None,
97            accent: None,
98            preview_url: None,
99            description: None,
100            credential_id: None,
101            id,
102            org_id,
103            is_public,
104            is_deleted,
105            created_at,
106            updated_at,
107        }
108    }
109}
110/// This is the voice provider that will be used.
111#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
112pub enum Provider {
113    #[serde(rename = "vapi")]
114    Vapi,
115    #[serde(rename = "11labs")]
116    Variant11labs,
117    #[serde(rename = "azure")]
118    Azure,
119    #[serde(rename = "cartesia")]
120    Cartesia,
121    #[serde(rename = "custom-voice")]
122    CustomVoice,
123    #[serde(rename = "deepgram")]
124    Deepgram,
125    #[serde(rename = "hume")]
126    Hume,
127    #[serde(rename = "lmnt")]
128    Lmnt,
129    #[serde(rename = "neets")]
130    Neets,
131    #[serde(rename = "neuphonic")]
132    Neuphonic,
133    #[serde(rename = "openai")]
134    Openai,
135    #[serde(rename = "playht")]
136    Playht,
137    #[serde(rename = "rime-ai")]
138    RimeAi,
139    #[serde(rename = "smallest-ai")]
140    SmallestAi,
141    #[serde(rename = "tavus")]
142    Tavus,
143}
144
145impl Default for Provider {
146    fn default() -> Provider {
147        Self::Vapi
148    }
149}
150/// The gender of the voice.
151#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
152pub enum Gender {
153    #[serde(rename = "male")]
154    Male,
155    #[serde(rename = "female")]
156    Female,
157}
158
159impl Default for Gender {
160    fn default() -> Gender {
161        Self::Male
162    }
163}