#[non_exhaustive]pub struct StreamingOptions {
pub language: Option<String>,
}Expand description
Per-chunk options for StreamingSession::transcribe_chunk.
Differs from TranscribeOptions in that timestamps are always
enabled (the consumer needs the partial-result location) and the
language cannot change mid-stream (set at
StreamingAsrEngine::begin_stream time).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.language: Option<String>Initial language hint (ISO 639-1). Locked for the duration of the stream.
Implementations§
Source§impl StreamingOptions
impl StreamingOptions
Sourcepub const fn new(language: Option<String>) -> Self
pub const fn new(language: Option<String>) -> Self
Construct a StreamingOptions from its single field.
Provided because StreamingOptions is #[non_exhaustive]
and so cannot be built with a struct expression outside this
crate; engines and tests use this constructor to pick a
non-default language.
Sourcepub fn as_transcribe_options(&self) -> TranscribeOptions
pub fn as_transcribe_options(&self) -> TranscribeOptions
Convert these streaming options into a matching
TranscribeOptions for the final TranscriptionResult.
Timestamps are forced on (a streaming consumer always needs segment locations to know what changed).
Trait Implementations§
Source§impl Clone for StreamingOptions
impl Clone for StreamingOptions
Source§fn clone(&self) -> StreamingOptions
fn clone(&self) -> StreamingOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more