Struct chlorate::SodaBuilder[][src]

pub struct SodaBuilder { /* fields omitted */ }

Implementations

impl SodaBuilder[src]

pub fn new() -> SodaBuilder[src]

pub fn channel_count<'b>(
    &'b mut self,
    channel_count: u32
) -> &'b mut SodaBuilder
[src]

Number of channels in RAW audio that will be provided to SODA.

pub fn sample_rate<'b>(&'b mut self, sample_rate: u32) -> &'b mut SodaBuilder[src]

Maximum size of buffer to use in PipeStream. By default, is 0, which means unlimited.

pub fn max_buffer_bytes<'b>(
    &'b mut self,
    max_buffer_bytes: u32
) -> &'b mut SodaBuilder
[src]

Maximum size of buffer to use in PipeStream. By default, is 0, which means unlimited.

pub fn simulate_realtime_testonly<'b>(
    &'b mut self,
    simulate_realtime_testonly: bool
) -> &'b mut SodaBuilder
[src]

If set to true, forces the audio provider to simulate realtime audio provision. This only makes sense during testing, to simulate realtime audio providing from a big chunk of audio. This slows down audio provided to SODA to a maximum of real-time, which means more accurate endpointer behavior, but is unsuitable for execution in real production environments. Set with caution!

pub fn language_pack_directory<'b>(
    &'b mut self,
    language_pack_directory: String
) -> &'b mut SodaBuilder
[src]

Directory of the language pack to use.

pub fn api_key<'b>(&'b mut self, api_key: String) -> &'b mut SodaBuilder[src]

API key used for call verification.

pub fn recognition_mode<'b>(
    &'b mut self,
    recognition_mode: RecognitionMode
) -> &'b mut SodaBuilder
[src]

What kind of recognition to execute here. Impacts model usage.

pub fn reset_on_final_result<'b>(
    &'b mut self,
    reset_on_final_result: bool
) -> &'b mut SodaBuilder
[src]

Whether terse_processor should force a new session after every final recognition result. This will cause the terse processor to stop processing new audio once an endpoint event is detected and wait for it to generate a final event using audio up to the endpoint. This will cause processing bursts when a new session starts.

pub fn include_timing_metrics<'b>(
    &'b mut self,
    include_timing_metrics: bool
) -> &'b mut SodaBuilder
[src]

Whether to populate the timing_metrics field on Recognition and Endpoint events.

pub fn enable_lang_id<'b>(
    &'b mut self,
    enable_lang_id: bool
) -> &'b mut SodaBuilder
[src]

Whether or not to request lang id events.

pub fn build<'soda>(
    &mut self,
    callback: impl Fn(SodaResponse) + Send + Sync + 'soda
) -> SodaClient<'soda>
[src]

Consumes SodaBuilder to create SodaClient.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.