vapi_client/models/
fallback_assembly_ai_transcriber.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 FallbackAssemblyAiTranscriber {
16    /// This is the transcription provider that will be used.
17    #[serde(rename = "provider")]
18    pub provider: Provider,
19    /// This is the language that will be set for the transcription.
20    #[serde(rename = "language", skip_serializing_if = "Option::is_none")]
21    pub language: Option<Language>,
22    /// Transcripts below this confidence threshold will be discarded.  @default 0.4
23    #[serde(rename = "confidenceThreshold", skip_serializing_if = "Option::is_none")]
24    pub confidence_threshold: Option<f64>,
25    /// The WebSocket URL that the transcriber connects to.
26    #[serde(rename = "realtimeUrl", skip_serializing_if = "Option::is_none")]
27    pub realtime_url: Option<String>,
28    /// Add up to 2500 characters of custom vocabulary.
29    #[serde(rename = "wordBoost", skip_serializing_if = "Option::is_none")]
30    pub word_boost: Option<Vec<String>>,
31    /// The duration of the end utterance silence threshold in milliseconds.
32    #[serde(rename = "endUtteranceSilenceThreshold", skip_serializing_if = "Option::is_none")]
33    pub end_utterance_silence_threshold: Option<f64>,
34    /// Disable partial transcripts. Set to `true` to not receive partial transcripts. Defaults to `false`.
35    #[serde(rename = "disablePartialTranscripts", skip_serializing_if = "Option::is_none")]
36    pub disable_partial_transcripts: Option<bool>,
37}
38
39impl FallbackAssemblyAiTranscriber {
40    pub fn new(provider: Provider) -> FallbackAssemblyAiTranscriber {
41        FallbackAssemblyAiTranscriber {
42            provider,
43            language: None,
44            confidence_threshold: None,
45            realtime_url: None,
46            word_boost: None,
47            end_utterance_silence_threshold: None,
48            disable_partial_transcripts: None,
49        }
50    }
51}
52/// This is the transcription provider that will be used.
53#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
54pub enum Provider {
55    #[serde(rename = "assembly-ai")]
56    AssemblyAi,
57}
58
59impl Default for Provider {
60    fn default() -> Provider {
61        Self::AssemblyAi
62    }
63}
64/// This is the language that will be set for the transcription.
65#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
66pub enum Language {
67    #[serde(rename = "en")]
68    En,
69}
70
71impl Default for Language {
72    fn default() -> Language {
73        Self::En
74    }
75}
76