Class SpeechGrpc.SpeechStub (4.36.0)

public static final class SpeechGrpc.SpeechStub extends AbstractAsyncStub<SpeechGrpc.SpeechStub>

A stub to allow clients to do asynchronous rpc calls to service Speech.

Enables speech transcription and resource management.

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractAsyncStub > SpeechGrpc.SpeechStub

Methods

batchRecognize(BatchRecognizeRequest request, StreamObserver<Operation> responseObserver)

public void batchRecognize(BatchRecognizeRequest request, StreamObserver<Operation> responseObserver)

Performs batch asynchronous speech recognition: send a request with N audio files and receive a long running operation that can be polled to see when the transcriptions are finished.

Parameters
NameDescription
requestBatchRecognizeRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

build(Channel channel, CallOptions callOptions)

protected SpeechGrpc.SpeechStub build(Channel channel, CallOptions callOptions)
Parameters
NameDescription
channelio.grpc.Channel
callOptionsio.grpc.CallOptions
Returns
TypeDescription
SpeechGrpc.SpeechStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

createCustomClass(CreateCustomClassRequest request, StreamObserver<Operation> responseObserver)

public void createCustomClass(CreateCustomClassRequest request, StreamObserver<Operation> responseObserver)

Creates a CustomClass.

Parameters
NameDescription
requestCreateCustomClassRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

createPhraseSet(CreatePhraseSetRequest request, StreamObserver<Operation> responseObserver)

public void createPhraseSet(CreatePhraseSetRequest request, StreamObserver<Operation> responseObserver)

Creates a PhraseSet.

Parameters
NameDescription
requestCreatePhraseSetRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

createRecognizer(CreateRecognizerRequest request, StreamObserver<Operation> responseObserver)

public void createRecognizer(CreateRecognizerRequest request, StreamObserver<Operation> responseObserver)

Creates a Recognizer.

Parameters
NameDescription
requestCreateRecognizerRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

deleteCustomClass(DeleteCustomClassRequest request, StreamObserver<Operation> responseObserver)

public void deleteCustomClass(DeleteCustomClassRequest request, StreamObserver<Operation> responseObserver)

Deletes the CustomClass.

Parameters
NameDescription
requestDeleteCustomClassRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

deletePhraseSet(DeletePhraseSetRequest request, StreamObserver<Operation> responseObserver)

public void deletePhraseSet(DeletePhraseSetRequest request, StreamObserver<Operation> responseObserver)

Deletes the PhraseSet.

Parameters
NameDescription
requestDeletePhraseSetRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

deleteRecognizer(DeleteRecognizerRequest request, StreamObserver<Operation> responseObserver)

public void deleteRecognizer(DeleteRecognizerRequest request, StreamObserver<Operation> responseObserver)

Deletes the Recognizer.

Parameters
NameDescription
requestDeleteRecognizerRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

getConfig(GetConfigRequest request, StreamObserver<Config> responseObserver)

public void getConfig(GetConfigRequest request, StreamObserver<Config> responseObserver)

Returns the requested Config.

Parameters
NameDescription
requestGetConfigRequest
responseObserverio.grpc.stub.StreamObserver<Config>

getCustomClass(GetCustomClassRequest request, StreamObserver<CustomClass> responseObserver)

public void getCustomClass(GetCustomClassRequest request, StreamObserver<CustomClass> responseObserver)

Returns the requested CustomClass.

Parameters
NameDescription
requestGetCustomClassRequest
responseObserverio.grpc.stub.StreamObserver<CustomClass>

getPhraseSet(GetPhraseSetRequest request, StreamObserver<PhraseSet> responseObserver)

public void getPhraseSet(GetPhraseSetRequest request, StreamObserver<PhraseSet> responseObserver)

Returns the requested PhraseSet.

Parameters
NameDescription
requestGetPhraseSetRequest
responseObserverio.grpc.stub.StreamObserver<PhraseSet>

getRecognizer(GetRecognizerRequest request, StreamObserver<Recognizer> responseObserver)

public void getRecognizer(GetRecognizerRequest request, StreamObserver<Recognizer> responseObserver)

Returns the requested Recognizer. Fails with NOT_FOUND if the requested Recognizer doesn't exist.

Parameters
NameDescription
requestGetRecognizerRequest
responseObserverio.grpc.stub.StreamObserver<Recognizer>

listCustomClasses(ListCustomClassesRequest request, StreamObserver<ListCustomClassesResponse> responseObserver)

public void listCustomClasses(ListCustomClassesRequest request, StreamObserver<ListCustomClassesResponse> responseObserver)

Lists CustomClasses.

Parameters
NameDescription
requestListCustomClassesRequest
responseObserverio.grpc.stub.StreamObserver<ListCustomClassesResponse>

listPhraseSets(ListPhraseSetsRequest request, StreamObserver<ListPhraseSetsResponse> responseObserver)

public void listPhraseSets(ListPhraseSetsRequest request, StreamObserver<ListPhraseSetsResponse> responseObserver)

Lists PhraseSets.

Parameters
NameDescription
requestListPhraseSetsRequest
responseObserverio.grpc.stub.StreamObserver<ListPhraseSetsResponse>

listRecognizers(ListRecognizersRequest request, StreamObserver<ListRecognizersResponse> responseObserver)

public void listRecognizers(ListRecognizersRequest request, StreamObserver<ListRecognizersResponse> responseObserver)

Lists Recognizers.

Parameters
NameDescription
requestListRecognizersRequest
responseObserverio.grpc.stub.StreamObserver<ListRecognizersResponse>

recognize(RecognizeRequest request, StreamObserver<RecognizeResponse> responseObserver)

public void recognize(RecognizeRequest request, StreamObserver<RecognizeResponse> responseObserver)

Performs synchronous Speech recognition: receive results after all audio has been sent and processed.

Parameters
NameDescription
requestRecognizeRequest
responseObserverio.grpc.stub.StreamObserver<RecognizeResponse>

streamingRecognize(StreamObserver<StreamingRecognizeResponse> responseObserver)

public StreamObserver<StreamingRecognizeRequest> streamingRecognize(StreamObserver<StreamingRecognizeResponse> responseObserver)

Performs bidirectional streaming speech recognition: receive results while sending audio. This method is only available via the gRPC API (not REST).

Parameter
NameDescription
responseObserverio.grpc.stub.StreamObserver<StreamingRecognizeResponse>
Returns
TypeDescription
io.grpc.stub.StreamObserver<StreamingRecognizeRequest>

undeleteCustomClass(UndeleteCustomClassRequest request, StreamObserver<Operation> responseObserver)

public void undeleteCustomClass(UndeleteCustomClassRequest request, StreamObserver<Operation> responseObserver)

Undeletes the CustomClass.

Parameters
NameDescription
requestUndeleteCustomClassRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

undeletePhraseSet(UndeletePhraseSetRequest request, StreamObserver<Operation> responseObserver)

public void undeletePhraseSet(UndeletePhraseSetRequest request, StreamObserver<Operation> responseObserver)

Undeletes the PhraseSet.

Parameters
NameDescription
requestUndeletePhraseSetRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

undeleteRecognizer(UndeleteRecognizerRequest request, StreamObserver<Operation> responseObserver)

public void undeleteRecognizer(UndeleteRecognizerRequest request, StreamObserver<Operation> responseObserver)

Undeletes the Recognizer.

Parameters
NameDescription
requestUndeleteRecognizerRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

updateConfig(UpdateConfigRequest request, StreamObserver<Config> responseObserver)

public void updateConfig(UpdateConfigRequest request, StreamObserver<Config> responseObserver)

Updates the Config.

Parameters
NameDescription
requestUpdateConfigRequest
responseObserverio.grpc.stub.StreamObserver<Config>

updateCustomClass(UpdateCustomClassRequest request, StreamObserver<Operation> responseObserver)

public void updateCustomClass(UpdateCustomClassRequest request, StreamObserver<Operation> responseObserver)

Updates the CustomClass.

Parameters
NameDescription
requestUpdateCustomClassRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

updatePhraseSet(UpdatePhraseSetRequest request, StreamObserver<Operation> responseObserver)

public void updatePhraseSet(UpdatePhraseSetRequest request, StreamObserver<Operation> responseObserver)

Updates the PhraseSet.

Parameters
NameDescription
requestUpdatePhraseSetRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

updateRecognizer(UpdateRecognizerRequest request, StreamObserver<Operation> responseObserver)

public void updateRecognizer(UpdateRecognizerRequest request, StreamObserver<Operation> responseObserver)

Updates the Recognizer.

Parameters
NameDescription
requestUpdateRecognizerRequest
responseObserverio.grpc.stub.StreamObserver<Operation>