vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * Vapi API
 *
 * Voice AI for developers.
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FallbackHumeVoice {
    /// This is the flag to toggle voice caching for the assistant.
    #[serde(rename = "cachingEnabled", skip_serializing_if = "Option::is_none")]
    pub caching_enabled: Option<bool>,
    /// This is the voice provider that will be used.
    #[serde(rename = "provider")]
    pub provider: ProviderTrue,
    /// This is the model that will be used.
    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
    pub model: Option<ModelTrue>,
    /// The ID of the particular voice you want to use.
    #[serde(rename = "voiceId")]
    pub voice_id: String,
    /// Indicates whether the chosen voice is a preset Hume AI voice or a custom voice.
    #[serde(rename = "isCustomHumeVoice", skip_serializing_if = "Option::is_none")]
    pub is_custom_hume_voice: Option<bool>,
    /// 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.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// This is the plan for chunking the model output before it is sent to the voice provider.
    #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
    pub chunk_plan: Option<models::ChunkPlan>,
}

impl FallbackHumeVoice {
    pub fn new(provider: ProviderTrue, voice_id: String) -> FallbackHumeVoice {
        FallbackHumeVoice {
            caching_enabled: None,
            provider,
            model: None,
            voice_id,
            is_custom_hume_voice: None,
            description: None,
            chunk_plan: None,
        }
    }
}
/// This is the voice provider that will be used.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ProviderTrue {
    #[serde(rename = "hume")]
    Hume,
}

impl Default for ProviderTrue {
    fn default() -> ProviderTrue {
        Self::Hume
    }
}
/// This is the model that will be used.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ModelTrue {
    #[serde(rename = "octave")]
    Octave,
}

impl Default for ModelTrue {
    fn default() -> ModelTrue {
        Self::Octave
    }
}