pub struct WhisperMetadata {Show 23 fields
pub model_name: String,
pub model_alias: String,
pub model_path: PathBuf,
pub log_enable: bool,
pub debug_log: bool,
pub threads: u64,
pub translate: bool,
pub language: String,
pub processors: u64,
pub offset_time: u64,
pub duration: u64,
pub max_context: i32,
pub max_len: u64,
pub split_on_word: bool,
pub output_txt: bool,
pub output_vtt: bool,
pub output_srt: bool,
pub output_lrc: bool,
pub output_csv: bool,
pub output_json: bool,
pub temperature: f64,
pub detect_language: bool,
pub prompt: Option<String>,
}
whisper
only.Expand description
Metadata for whisper model
Fields§
§model_name: String
§model_alias: String
§model_path: PathBuf
§log_enable: bool
§debug_log: bool
Enable debug mode. Defaults to false.
threads: u64
Number of threads to use during computation. Defaults to 4.
translate: bool
Translate from source language to english. Defaults to false.
language: String
The language of the input audio. auto
for auto-detection. Defaults to en
.
Supplying the input language in ISO-639-1 format will improve accuracy and latency.
processors: u64
Number of processors to use during computation. Defaults to 1.
offset_time: u64
Time offset in milliseconds. Defaults to 0.
duration: u64
Duration of audio to process in milliseconds. Defaults to 0.
max_context: i32
Maximum number of text context tokens to store. Defaults to -1.
max_len: u64
Maximum segment length in characters. Defaults to 0.
split_on_word: bool
Split on word rather than on token. Defaults to false.
output_txt: bool
Output result in a text file. Defaults to false.
output_vtt: bool
Output result in a vtt file. Defaults to false.
output_srt: bool
Output result in a srt file. Defaults to false.
output_lrc: bool
Output result in a lrc file. Defaults to false.
output_csv: bool
Output result in a CSV file. Defaults to false.
output_json: bool
Output result in a JSON file. Defaults to false.
temperature: f64
Sampling temperature, between 0 and 1. Defaults to 0.00.
detect_language: bool
Automatically detect the spoken language in the provided audio input.
prompt: Option<String>
Text to guide the model. The max length is n_text_ctx/2 tokens.
Trait Implementations§
Source§impl BaseMetadata for WhisperMetadata
impl BaseMetadata for WhisperMetadata
fn model_name(&self) -> &str
fn model_alias(&self) -> &str
Source§impl Clone for WhisperMetadata
impl Clone for WhisperMetadata
Source§fn clone(&self) -> WhisperMetadata
fn clone(&self) -> WhisperMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for WhisperMetadata
impl Debug for WhisperMetadata
Source§impl Default for WhisperMetadata
impl Default for WhisperMetadata
Source§impl<'de> Deserialize<'de> for WhisperMetadata
impl<'de> Deserialize<'de> for WhisperMetadata
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>,
Auto Trait Implementations§
impl Freeze for WhisperMetadata
impl RefUnwindSafe for WhisperMetadata
impl Send for WhisperMetadata
impl Sync for WhisperMetadata
impl Unpin for WhisperMetadata
impl UnwindSafe for WhisperMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.