vapi_client/models/
fallback_hume_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::ToSchema;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
18pub struct FallbackHumeVoice {
19    /// This is the voice provider that will be used.
20    #[serde(rename = "provider")]
21    pub provider: Provider,
22    /// This is the model that will be used.
23    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
24    pub model: Option<Model>,
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    /// 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 chunking the model output before it is sent to the voice provider.
35    #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
36    pub chunk_plan: Option<models::ChunkPlan>,
37}
38
39impl FallbackHumeVoice {
40    pub fn new(provider: Provider, voice_id: String) -> FallbackHumeVoice {
41        FallbackHumeVoice {
42            provider,
43            model: None,
44            voice_id,
45            is_custom_hume_voice: None,
46            description: None,
47            chunk_plan: None,
48        }
49    }
50}
51/// This is the voice provider that will be used.
52#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
53pub enum Provider {
54    #[serde(rename = "hume")]
55    Hume,
56}
57
58impl Default for Provider {
59    fn default() -> Provider {
60        Self::Hume
61    }
62}
63/// This is the model that will be used.
64#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
65pub enum Model {
66    #[serde(rename = "octave")]
67    Octave,
68}
69
70impl Default for Model {
71    fn default() -> Model {
72        Self::Octave
73    }
74}