Struct googapis::google::cloud::speech::v1::speech_client::SpeechClient [−][src]
pub struct SpeechClient<T> { /* fields omitted */ }
Expand description
Service that implements Google Cloud Speech API.
Implementations
impl<T> SpeechClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> SpeechClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> SpeechClient<InterceptedService<T, F>> where
F: Interceptor,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Compress requests with gzip
.
This requires the server to support it otherwise it might respond with an error.
Enable decompressing responses with gzip
.
pub async fn recognize(
&mut self,
request: impl IntoRequest<RecognizeRequest>
) -> Result<Response<RecognizeResponse>, Status>
pub async fn recognize(
&mut self,
request: impl IntoRequest<RecognizeRequest>
) -> Result<Response<RecognizeResponse>, Status>
Performs synchronous speech recognition: receive results after all audio has been sent and processed.
pub async fn long_running_recognize(
&mut self,
request: impl IntoRequest<LongRunningRecognizeRequest>
) -> Result<Response<Operation>, Status>
pub async fn long_running_recognize(
&mut self,
request: impl IntoRequest<LongRunningRecognizeRequest>
) -> Result<Response<Operation>, Status>
Performs asynchronous speech recognition: receive results via the
google.longrunning.Operations interface. Returns either an
Operation.error
or an Operation.response
which contains
a LongRunningRecognizeResponse
message.
For more information on asynchronous speech recognition, see the
how-to.
pub async fn streaming_recognize(
&mut self,
request: impl IntoStreamingRequest<Message = StreamingRecognizeRequest>
) -> Result<Response<Streaming<StreamingRecognizeResponse>>, Status>
pub async fn streaming_recognize(
&mut self,
request: impl IntoStreamingRequest<Message = StreamingRecognizeRequest>
) -> Result<Response<Streaming<StreamingRecognizeResponse>>, Status>
Performs bidirectional streaming speech recognition: receive results while sending audio. This method is only available via the gRPC API (not REST).
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for SpeechClient<T> where
T: RefUnwindSafe,
impl<T> Send for SpeechClient<T> where
T: Send,
impl<T> Sync for SpeechClient<T> where
T: Sync,
impl<T> Unpin for SpeechClient<T> where
T: Unpin,
impl<T> UnwindSafe for SpeechClient<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more