pub struct Recognizer { /* private fields */ }
Expand description

Google Speech API recognizer

Implementations

Creates new speech recognizer from provided Google credentials and google speech configuration. This kind of recognizer can be used for streaming recognition.

Creates new speech recognizer from provided Google credentials. This kind of recognizer can be used for long running recognition.

Creates new speech recognizer from provided Google credentials. This kind of recognizer can be used for synchronous recognition.

Returns sender than can be used to stream in audio bytes. This method can be called multiple times to retrieve multiple senders.

Returns sender than can be used to stream in audio bytes. This method will take the sender out of the option leaving None in its place. No additional sender can be retrieved from recognizer after this call. When sender is dropped respective stream will be closed.

Drops audio sender so that respective stream can be closed.

Returns receiver that can be used to receive speech-to-text results used with streaming_recognize function.

Convenience function so that client does not have to create full StreamingRecognizeRequest and can just pass audio bytes vector instead.

Initiates bidirectional streaming. Returns asynchronous stream of streaming recognition results Audio data must be fed into recognizer via channel sender returned by function get_audio_sink.

Initiates bidirectional streaming. This call should be spawned into separate tokio task. Results can be then retrieved via channel receiver returned by method get_streaming_result_receiver.

Initiates asynchronous recognition. Returns long running operation representing asynchronous computation performed by Google Cloud Platform. Use long_running_wait to wait until operation is done.

Waits for completion of long running operation returned by long_running_recognize function. Long running operation result is then casted into LongRunningRecognizeResponse struct. Function checks operation status regularly using get_operation which is called every check_interval_ms ms. If check_interval_ms is not specified default interval check is 1 sec.

Performs synchronous speech recognition.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.