vapi_client/models/
hume_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 HumeVoice {
16    /// This is the flag to toggle voice caching for the assistant.
17    #[serde(rename = "cachingEnabled", skip_serializing_if = "Option::is_none")]
18    pub caching_enabled: Option<bool>,
19    /// This is the voice provider that will be used.
20    #[serde(rename = "provider")]
21    pub provider: ProviderTrue,
22    /// This is the model that will be used.
23    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
24    pub model: Option<ModelTrue>,
25    /// The ID of the particular voice you want to use.
26    #[serde(rename = "voiceId")]
27    pub voice_id: String,
28    /// Indicates whether the chosen voice is a preset Hume AI voice or a custom voice.
29    #[serde(rename = "isCustomHumeVoice", skip_serializing_if = "Option::is_none")]
30    pub is_custom_hume_voice: Option<bool>,
31    /// This is the plan for chunking the model output before it is sent to the voice provider.
32    #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
33    pub chunk_plan: Option<models::ChunkPlan>,
34    /// Natural language instructions describing how the synthesized speech should sound, including but not limited to tone, intonation, pacing, and accent (e.g., 'a soft, gentle voice with a strong British accent').  If a Voice is specified in the request, this description serves as acting instructions. If no Voice is specified, a new voice is generated based on this description.
35    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
36    pub description: Option<String>,
37    /// This is the plan for voice provider fallbacks in the event that the primary voice provider fails.
38    #[serde(rename = "fallbackPlan", skip_serializing_if = "Option::is_none")]
39    pub fallback_plan: Option<models::FallbackPlan>,
40}
41
42impl HumeVoice {
43    pub fn new(provider: ProviderTrue, voice_id: String) -> HumeVoice {
44        HumeVoice {
45            caching_enabled: None,
46            provider,
47            model: None,
48            voice_id,
49            is_custom_hume_voice: None,
50            chunk_plan: None,
51            description: None,
52            fallback_plan: None,
53        }
54    }
55}
56/// This is the voice provider that will be used.
57#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
58pub enum ProviderTrue {
59    #[serde(rename = "hume")]
60    Hume,
61}
62
63impl Default for ProviderTrue {
64    fn default() -> ProviderTrue {
65        Self::Hume
66    }
67}
68/// This is the model that will be used.
69#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
70pub enum ModelTrue {
71    #[serde(rename = "octave")]
72    Octave,
73}
74
75impl Default for ModelTrue {
76    fn default() -> ModelTrue {
77        Self::Octave
78    }
79}