openai_struct/models/
transcription_segment.rs

1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11#[allow(unused_imports)]
12use serde_json::Value;
13
14#[derive(Debug, Serialize, Deserialize)]
15pub struct TranscriptionSegment {
16    /// Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.
17    #[serde(rename = "avg_logprob")]
18    pub avg_logprob: f32,
19    /// Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.
20    #[serde(rename = "compression_ratio")]
21    pub compression_ratio: f32,
22    /// End time of the segment in seconds.
23    #[serde(rename = "end")]
24    pub end: f32,
25    /// Unique identifier of the segment.
26    #[serde(rename = "id")]
27    pub id: i32,
28    /// Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.
29    #[serde(rename = "no_speech_prob")]
30    pub no_speech_prob: f32,
31    /// Seek offset of the segment.
32    #[serde(rename = "seek")]
33    pub seek: i32,
34    /// Start time of the segment in seconds.
35    #[serde(rename = "start")]
36    pub start: f32,
37    /// Temperature parameter used for generating the segment.
38    #[serde(rename = "temperature")]
39    pub temperature: f32,
40    /// Text content of the segment.
41    #[serde(rename = "text")]
42    pub text: String,
43    /// Array of token IDs for the text content.
44    #[serde(rename = "tokens")]
45    pub tokens: Vec<i32>,
46}