Skip to main content

openai_types/audio/
response.rs

1// Manual: audio response types (richer than generated — includes Optional fields).
2
3use serde::Deserialize;
4
5use super::Logprob;
6
7/// Response from `POST /audio/transcriptions` (json format).
8#[derive(Debug, Clone, Deserialize)]
9pub struct Transcription {
10    /// The transcribed text.
11    pub text: String,
12    /// The log probabilities of the tokens in the transcription.
13    #[serde(default)]
14    pub logprobs: Option<Vec<Logprob>>,
15    /// Token usage statistics for the request.
16    #[serde(default)]
17    pub usage: Option<serde_json::Value>,
18}
19
20/// Response from `POST /audio/translations` (json format).
21#[derive(Debug, Clone, Deserialize)]
22pub struct Translation {
23    pub text: String,
24}