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