pub struct AudioTranslationParameters {
pub file: FileUpload,
pub model: String,
pub prompt: Option<String>,
pub response_format: Option<AudioOutputFormat>,
pub temperature: Option<f32>,
}Fields§
§file: FileUploadThe audio file object to translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
model: StringID of the model to use. Only whisper-1 is currently available.
prompt: Option<String>An optional text to guide the model’s style or continue a previous audio segment. The prompt should be in English.
response_format: Option<AudioOutputFormat>The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
temperature: Option<f32>The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
Trait Implementations§
Source§impl Clone for AudioTranslationParameters
impl Clone for AudioTranslationParameters
Source§fn clone(&self) -> AudioTranslationParameters
fn clone(&self) -> AudioTranslationParameters
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AudioTranslationParameters
impl Debug for AudioTranslationParameters
Source§impl Default for AudioTranslationParameters
impl Default for AudioTranslationParameters
Source§fn default() -> AudioTranslationParameters
fn default() -> AudioTranslationParameters
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AudioTranslationParameters
impl<'de> Deserialize<'de> for AudioTranslationParameters
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for AudioTranslationParameters
Auto Trait Implementations§
impl !Freeze for AudioTranslationParameters
impl RefUnwindSafe for AudioTranslationParameters
impl Send for AudioTranslationParameters
impl Sync for AudioTranslationParameters
impl Unpin for AudioTranslationParameters
impl UnwindSafe for AudioTranslationParameters
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more