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 voice provider that will be used.
17    #[serde(rename = "provider")]
18    pub provider: Provider,
19    /// This is the model that will be used.
20    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
21    pub model: Option<Model>,
22    /// The ID of the particular voice you want to use.
23    #[serde(rename = "voiceId")]
24    pub voice_id: String,
25    /// Indicates whether the chosen voice is a preset Hume AI voice or a custom voice.
26    #[serde(rename = "isCustomHumeVoice", skip_serializing_if = "Option::is_none")]
27    pub is_custom_hume_voice: Option<bool>,
28    /// This is the plan for chunking the model output before it is sent to the voice provider.
29    #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
30    pub chunk_plan: Option<models::ChunkPlan>,
31    /// 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.
32    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
33    pub description: Option<String>,
34    /// This is the plan for voice provider fallbacks in the event that the primary voice provider fails.
35    #[serde(rename = "fallbackPlan", skip_serializing_if = "Option::is_none")]
36    pub fallback_plan: Option<models::FallbackPlan>,
37}
38
39impl HumeVoice {
40    pub fn new(provider: Provider, voice_id: String) -> HumeVoice {
41        HumeVoice {
42            provider,
43            model: None,
44            voice_id,
45            is_custom_hume_voice: None,
46            chunk_plan: None,
47            description: None,
48            fallback_plan: None,
49        }
50    }
51}
52/// This is the voice provider that will be used.
53#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
54pub enum Provider {
55    #[serde(rename = "hume")]
56    Hume,
57}
58
59impl Default for Provider {
60    fn default() -> Provider {
61        Self::Hume
62    }
63}
64/// This is the model that will be used.
65#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
66pub enum Model {
67    #[serde(rename = "octave")]
68    Octave,
69}
70
71impl Default for Model {
72    fn default() -> Model {
73        Self::Octave
74    }
75}
76