pub struct StreamingConfig {
pub language: Option<String>,
pub mode: i32,
pub output_contract: i32,
pub context_terms: Vec<String>,
}Expand description
Streaming input is always headerless signed PCM16 little-endian mono 16 kHz; the format is not configurable.
Fields§
§language: Option<String>Under either output contract, language is a required BCP-47 tag (an
omitted tag or und is rejected) and mode selects the written or
verbatim prompt.
mode: i32§output_contract: i32Explicitly selects the output contract. The service confirms the selection before accepting audio; an unrecognized value is rejected rather than silently downgraded.
context_terms: Vec<String>Recognition terms under either output contract. Same validation, budgets and composition as TranscriptionOptions.context_terms; an empty list adds no bias.
Implementations§
Source§impl StreamingConfig
impl StreamingConfig
Sourcepub fn language(&self) -> &str
pub fn language(&self) -> &str
Returns the value of language, or the default value if language is unset.
Sourcepub fn mode(&self) -> TranscriptionMode
pub fn mode(&self) -> TranscriptionMode
Returns the enum value of mode, or the default if the field is set to an invalid enum value.
Sourcepub fn set_mode(&mut self, value: TranscriptionMode)
pub fn set_mode(&mut self, value: TranscriptionMode)
Sets mode to the provided enum value.
Sourcepub fn output_contract(&self) -> StreamingOutputContract
pub fn output_contract(&self) -> StreamingOutputContract
Returns the enum value of output_contract, or the default if the field is set to an invalid enum value.
Sourcepub fn set_output_contract(&mut self, value: StreamingOutputContract)
pub fn set_output_contract(&mut self, value: StreamingOutputContract)
Sets output_contract to the provided enum value.
Trait Implementations§
Source§impl Clone for StreamingConfig
impl Clone for StreamingConfig
Source§impl Debug for StreamingConfig
impl Debug for StreamingConfig
Source§impl Default for StreamingConfig
impl Default for StreamingConfig
§impl<'de> Deserialize<'de> for StreamingConfig
impl<'de> Deserialize<'de> for StreamingConfig
§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>,
impl Eq for StreamingConfig
Source§impl Hash for StreamingConfig
impl Hash for StreamingConfig
Source§impl Message for StreamingConfig
impl Message for StreamingConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for StreamingConfig
impl PartialEq for StreamingConfig
§impl Serialize for StreamingConfig
impl Serialize for StreamingConfig
impl StructuralPartialEq for StreamingConfig
Auto Trait Implementations§
impl Freeze for StreamingConfig
impl RefUnwindSafe for StreamingConfig
impl Send for StreamingConfig
impl Sync for StreamingConfig
impl Unpin for StreamingConfig
impl UnsafeUnpin for StreamingConfig
impl UnwindSafe for StreamingConfig
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request