vapi_client/models/
fallback_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 FallbackHumeVoice {
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    /// 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.
29    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
30    pub description: Option<String>,
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<Box<models::ChunkPlan>>,
34}
35
36impl FallbackHumeVoice {
37    pub fn new(provider: Provider, voice_id: String) -> FallbackHumeVoice {
38        FallbackHumeVoice {
39            provider,
40            model: None,
41            voice_id,
42            is_custom_hume_voice: None,
43            description: None,
44            chunk_plan: None,
45        }
46    }
47}
48/// This is the voice provider that will be used.
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum Provider {
51    #[serde(rename = "hume")]
52    Hume,
53}
54
55impl Default for Provider {
56    fn default() -> Provider {
57        Self::Hume
58    }
59}
60/// This is the model that will be used.
61#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
62pub enum Model {
63    #[serde(rename = "octave")]
64    Octave,
65}
66
67impl Default for Model {
68    fn default() -> Model {
69        Self::Octave
70    }
71}
72