vapi_client/models/
transcription_endpointing_plan.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 TranscriptionEndpointingPlan {
16    /// The minimum number of seconds to wait after transcription ending with punctuation before sending a request to the model. Defaults to 0.1.  This setting exists because the transcriber punctuates the transcription when it's more confident that customer has completed a thought.  @default 0.1
17    #[serde(
18        rename = "onPunctuationSeconds",
19        skip_serializing_if = "Option::is_none"
20    )]
21    pub on_punctuation_seconds: Option<f64>,
22    /// The minimum number of seconds to wait after transcription ending without punctuation before sending a request to the model. Defaults to 1.5.  This setting exists to catch the cases where the transcriber was not confident enough to punctuate the transcription, but the customer is done and has been silent for a long time.  @default 1.5
23    #[serde(
24        rename = "onNoPunctuationSeconds",
25        skip_serializing_if = "Option::is_none"
26    )]
27    pub on_no_punctuation_seconds: Option<f64>,
28    /// The minimum number of seconds to wait after transcription ending with a number before sending a request to the model. Defaults to 0.4.  This setting exists because the transcriber will sometimes punctuate the transcription ending with a number, even though the customer hasn't uttered the full number. This happens commonly for long numbers when the customer reads the number in chunks.  @default 0.5
29    #[serde(rename = "onNumberSeconds", skip_serializing_if = "Option::is_none")]
30    pub on_number_seconds: Option<f64>,
31}
32
33impl TranscriptionEndpointingPlan {
34    pub fn new() -> TranscriptionEndpointingPlan {
35        TranscriptionEndpointingPlan {
36            on_punctuation_seconds: None,
37            on_no_punctuation_seconds: None,
38            on_number_seconds: None,
39        }
40    }
41}