1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* OpenAI API
*
* The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
*
* The version of the OpenAPI document: 2.3.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// AudioResponseFormat : The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.
/// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AudioResponseFormat {
#[serde(rename = "json")]
Json,
#[serde(rename = "text")]
Text,
#[serde(rename = "srt")]
Srt,
#[serde(rename = "verbose_json")]
VerboseJson,
#[serde(rename = "vtt")]
Vtt,
#[serde(rename = "diarized_json")]
DiarizedJson,
}
impl std::fmt::Display for AudioResponseFormat {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Json => write!(f, "json"),
Self::Text => write!(f, "text"),
Self::Srt => write!(f, "srt"),
Self::VerboseJson => write!(f, "verbose_json"),
Self::Vtt => write!(f, "vtt"),
Self::DiarizedJson => write!(f, "diarized_json"),
}
}
}
impl Default for AudioResponseFormat {
fn default() -> AudioResponseFormat {
Self::Json
}
}