- 4.48.0 (latest)
- 4.47.0
- 4.46.0
- 4.44.0
- 4.43.0
- 4.42.0
- 4.41.0
- 4.40.0
- 4.39.0
- 4.38.0
- 4.37.0
- 4.36.0
- 4.35.0
- 4.34.0
- 4.32.0
- 4.31.0
- 4.30.0
- 4.29.0
- 4.28.0
- 4.27.0
- 4.26.0
- 4.25.0
- 4.24.0
- 4.23.0
- 4.22.0
- 4.19.0
- 4.18.0
- 4.17.0
- 4.16.0
- 4.15.0
- 4.14.0
- 4.13.0
- 4.12.0
- 4.11.0
- 4.10.0
- 4.9.0
- 4.8.0
- 4.7.0
- 4.6.0
- 4.4.0
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.0
- 3.0.0
- 2.6.1
- 2.5.9
- 2.4.0
- 2.3.0
- 2.2.15
A client to Cloud Speech-to-Text API
The interfaces provided are listed below, along with usage samples.
SpeechClient
Service Description: Enables speech transcription and resource management.
Sample for SpeechClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpeechClient speechClient = SpeechClient.create()) {
RecognizerName name = RecognizerName.of("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
Recognizer response = speechClient.getRecognizer(name);
}
Classes
AutoDetectDecodingConfig
Automatically detected decoding parameters. Supported for the following encodings:
WAV_LINEAR16: 16-bit signed little-endian PCM samples in a WAV container.
WAV_MULAW: 8-bit companded mulaw samples in a WAV container.
WAV_ALAW: 8-bit companded alaw samples in a WAV container.
RFC4867_5_AMR: AMR frames with an rfc4867.5 header.
RFC4867_5_AMRWB: AMR-WB frames with an rfc4867.5 header.
FLAC: FLAC frames in the "native FLAC" container format.
MP3: MPEG audio frames with optional (ignored) ID3 metadata.
OGG_OPUS: Opus audio frames in an Ogg container.
WEBM_OPUS: Opus audio frames in a WebM container.
Protobuf type google.cloud.speech.v2.AutoDetectDecodingConfig
AutoDetectDecodingConfig.Builder
Automatically detected decoding parameters. Supported for the following encodings:
WAV_LINEAR16: 16-bit signed little-endian PCM samples in a WAV container.
WAV_MULAW: 8-bit companded mulaw samples in a WAV container.
WAV_ALAW: 8-bit companded alaw samples in a WAV container.
RFC4867_5_AMR: AMR frames with an rfc4867.5 header.
RFC4867_5_AMRWB: AMR-WB frames with an rfc4867.5 header.
FLAC: FLAC frames in the "native FLAC" container format.
MP3: MPEG audio frames with optional (ignored) ID3 metadata.
OGG_OPUS: Opus audio frames in an Ogg container.
WEBM_OPUS: Opus audio frames in a WebM container.
Protobuf type google.cloud.speech.v2.AutoDetectDecodingConfig
BatchRecognizeFileMetadata
Metadata about a single file in a batch for BatchRecognize.
Protobuf type google.cloud.speech.v2.BatchRecognizeFileMetadata
BatchRecognizeFileMetadata.Builder
Metadata about a single file in a batch for BatchRecognize.
Protobuf type google.cloud.speech.v2.BatchRecognizeFileMetadata
BatchRecognizeFileResult
Final results for a single file.
Protobuf type google.cloud.speech.v2.BatchRecognizeFileResult
BatchRecognizeFileResult.Builder
Final results for a single file.
Protobuf type google.cloud.speech.v2.BatchRecognizeFileResult
BatchRecognizeMetadata
Operation metadata for BatchRecognize.
Protobuf type google.cloud.speech.v2.BatchRecognizeMetadata
BatchRecognizeMetadata.Builder
Operation metadata for BatchRecognize.
Protobuf type google.cloud.speech.v2.BatchRecognizeMetadata
BatchRecognizeRequest
Request message for the BatchRecognize method.
Protobuf type google.cloud.speech.v2.BatchRecognizeRequest
BatchRecognizeRequest.Builder
Request message for the BatchRecognize method.
Protobuf type google.cloud.speech.v2.BatchRecognizeRequest
BatchRecognizeResponse
Response message for BatchRecognize that is packaged into a longrunning Operation.
Protobuf type google.cloud.speech.v2.BatchRecognizeResponse
BatchRecognizeResponse.Builder
Response message for BatchRecognize that is packaged into a longrunning Operation.
Protobuf type google.cloud.speech.v2.BatchRecognizeResponse
BatchRecognizeResults
Output type for Cloud Storage of BatchRecognize transcripts. Though this proto isn't returned in this API anywhere, the Cloud Storage transcripts will be this proto serialized and should be parsed as such.
Protobuf type google.cloud.speech.v2.BatchRecognizeResults
BatchRecognizeResults.Builder
Output type for Cloud Storage of BatchRecognize transcripts. Though this proto isn't returned in this API anywhere, the Cloud Storage transcripts will be this proto serialized and should be parsed as such.
Protobuf type google.cloud.speech.v2.BatchRecognizeResults
BatchRecognizeTranscriptionMetadata
Metadata about transcription for a single file (for example, progress percent).
Protobuf type google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata
BatchRecognizeTranscriptionMetadata.Builder
Metadata about transcription for a single file (for example, progress percent).
Protobuf type google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata
CloudSpeechProto
Config
Message representing the config for the Speech-to-Text API. This includes an optional KMS key with which incoming data will be encrypted.
Protobuf type google.cloud.speech.v2.Config
Config.Builder
Message representing the config for the Speech-to-Text API. This includes an optional KMS key with which incoming data will be encrypted.
Protobuf type google.cloud.speech.v2.Config
ConfigName
ConfigName.Builder
Builder for projects/{project}/locations/{location}/config.
CreateCustomClassRequest
Request message for the CreateCustomClass method.
Protobuf type google.cloud.speech.v2.CreateCustomClassRequest
CreateCustomClassRequest.Builder
Request message for the CreateCustomClass method.
Protobuf type google.cloud.speech.v2.CreateCustomClassRequest
CreatePhraseSetRequest
Request message for the CreatePhraseSet method.
Protobuf type google.cloud.speech.v2.CreatePhraseSetRequest
CreatePhraseSetRequest.Builder
Request message for the CreatePhraseSet method.
Protobuf type google.cloud.speech.v2.CreatePhraseSetRequest
CreateRecognizerRequest
Request message for the CreateRecognizer method.
Protobuf type google.cloud.speech.v2.CreateRecognizerRequest
CreateRecognizerRequest.Builder
Request message for the CreateRecognizer method.
Protobuf type google.cloud.speech.v2.CreateRecognizerRequest
CustomClass
CustomClass for biasing in speech recognition. Used to define a set of words or phrases that represents a common concept or theme likely to appear in your audio, for example a list of passenger ship names.
Protobuf type google.cloud.speech.v2.CustomClass
CustomClass.Builder
CustomClass for biasing in speech recognition. Used to define a set of words or phrases that represents a common concept or theme likely to appear in your audio, for example a list of passenger ship names.
Protobuf type google.cloud.speech.v2.CustomClass
CustomClass.ClassItem
An item of the class.
Protobuf type google.cloud.speech.v2.CustomClass.ClassItem
CustomClass.ClassItem.Builder
An item of the class.
Protobuf type google.cloud.speech.v2.CustomClass.ClassItem
CustomClassName
CustomClassName.Builder
Builder for projects/{project}/locations/{location}/customClasses/{custom_class}.
DeleteCustomClassRequest
Request message for the DeleteCustomClass method.
Protobuf type google.cloud.speech.v2.DeleteCustomClassRequest
DeleteCustomClassRequest.Builder
Request message for the DeleteCustomClass method.
Protobuf type google.cloud.speech.v2.DeleteCustomClassRequest
DeletePhraseSetRequest
Request message for the DeletePhraseSet method.
Protobuf type google.cloud.speech.v2.DeletePhraseSetRequest
DeletePhraseSetRequest.Builder
Request message for the DeletePhraseSet method.
Protobuf type google.cloud.speech.v2.DeletePhraseSetRequest
DeleteRecognizerRequest
Request message for the DeleteRecognizer method.
Protobuf type google.cloud.speech.v2.DeleteRecognizerRequest
DeleteRecognizerRequest.Builder
Request message for the DeleteRecognizer method.
Protobuf type google.cloud.speech.v2.DeleteRecognizerRequest
ExplicitDecodingConfig
Explicitly specified decoding parameters.
Protobuf type google.cloud.speech.v2.ExplicitDecodingConfig
ExplicitDecodingConfig.Builder
Explicitly specified decoding parameters.
Protobuf type google.cloud.speech.v2.ExplicitDecodingConfig
GcsOutputConfig
Output configurations for Cloud Storage.
Protobuf type google.cloud.speech.v2.GcsOutputConfig
GcsOutputConfig.Builder
Output configurations for Cloud Storage.
Protobuf type google.cloud.speech.v2.GcsOutputConfig
GetConfigRequest
Request message for the GetConfig method.
Protobuf type google.cloud.speech.v2.GetConfigRequest
GetConfigRequest.Builder
Request message for the GetConfig method.
Protobuf type google.cloud.speech.v2.GetConfigRequest
GetCustomClassRequest
Request message for the GetCustomClass method.
Protobuf type google.cloud.speech.v2.GetCustomClassRequest
GetCustomClassRequest.Builder
Request message for the GetCustomClass method.
Protobuf type google.cloud.speech.v2.GetCustomClassRequest
GetPhraseSetRequest
Request message for the GetPhraseSet method.
Protobuf type google.cloud.speech.v2.GetPhraseSetRequest
GetPhraseSetRequest.Builder
Request message for the GetPhraseSet method.
Protobuf type google.cloud.speech.v2.GetPhraseSetRequest
GetRecognizerRequest
Request message for the GetRecognizer method.
Protobuf type google.cloud.speech.v2.GetRecognizerRequest
GetRecognizerRequest.Builder
Request message for the GetRecognizer method.
Protobuf type google.cloud.speech.v2.GetRecognizerRequest
InlineOutputConfig
Output configurations for inline response.
Protobuf type google.cloud.speech.v2.InlineOutputConfig
InlineOutputConfig.Builder
Output configurations for inline response.
Protobuf type google.cloud.speech.v2.InlineOutputConfig
ListCustomClassesRequest
Request message for the ListCustomClasses method.
Protobuf type google.cloud.speech.v2.ListCustomClassesRequest
ListCustomClassesRequest.Builder
Request message for the ListCustomClasses method.
Protobuf type google.cloud.speech.v2.ListCustomClassesRequest
ListCustomClassesResponse
Response message for the ListCustomClasses method.
Protobuf type google.cloud.speech.v2.ListCustomClassesResponse
ListCustomClassesResponse.Builder
Response message for the ListCustomClasses method.
Protobuf type google.cloud.speech.v2.ListCustomClassesResponse
ListPhraseSetsRequest
Request message for the ListPhraseSets method.
Protobuf type google.cloud.speech.v2.ListPhraseSetsRequest
ListPhraseSetsRequest.Builder
Request message for the ListPhraseSets method.
Protobuf type google.cloud.speech.v2.ListPhraseSetsRequest
ListPhraseSetsResponse
Response message for the ListPhraseSets method.
Protobuf type google.cloud.speech.v2.ListPhraseSetsResponse
ListPhraseSetsResponse.Builder
Response message for the ListPhraseSets method.
Protobuf type google.cloud.speech.v2.ListPhraseSetsResponse
ListRecognizersRequest
Request message for the ListRecognizers method.
Protobuf type google.cloud.speech.v2.ListRecognizersRequest
ListRecognizersRequest.Builder
Request message for the ListRecognizers method.
Protobuf type google.cloud.speech.v2.ListRecognizersRequest
ListRecognizersResponse
Response message for the ListRecognizers method.
Protobuf type google.cloud.speech.v2.ListRecognizersResponse
ListRecognizersResponse.Builder
Response message for the ListRecognizers method.
Protobuf type google.cloud.speech.v2.ListRecognizersResponse
LocationName
LocationName.Builder
Builder for projects/{project}/locations/{location}.
OperationMetadata
Represents the metadata of a long-running operation.
Protobuf type google.cloud.speech.v2.OperationMetadata
OperationMetadata.Builder
Represents the metadata of a long-running operation.
Protobuf type google.cloud.speech.v2.OperationMetadata
PhraseSet
PhraseSet for biasing in speech recognition. A PhraseSet is used to provide "hints" to the speech recognizer to favor specific words and phrases in the results.
Protobuf type google.cloud.speech.v2.PhraseSet
PhraseSet.Builder
PhraseSet for biasing in speech recognition. A PhraseSet is used to provide "hints" to the speech recognizer to favor specific words and phrases in the results.
Protobuf type google.cloud.speech.v2.PhraseSet
PhraseSet.Phrase
A Phrase contains words and phrase "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer.
List items can also include CustomClass references containing groups of words that represent common concepts that occur in natural language.
Protobuf type google.cloud.speech.v2.PhraseSet.Phrase
PhraseSet.Phrase.Builder
A Phrase contains words and phrase "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer.
List items can also include CustomClass references containing groups of words that represent common concepts that occur in natural language.
Protobuf type google.cloud.speech.v2.PhraseSet.Phrase
PhraseSetName
PhraseSetName.Builder
Builder for projects/{project}/locations/{location}/phraseSets/{phrase_set}.
RecognitionConfig
Provides information to the Recognizer that specifies how to process the recognition request.
Protobuf type google.cloud.speech.v2.RecognitionConfig
RecognitionConfig.Builder
Provides information to the Recognizer that specifies how to process the recognition request.
Protobuf type google.cloud.speech.v2.RecognitionConfig
RecognitionFeatures
Available recognition features.
Protobuf type google.cloud.speech.v2.RecognitionFeatures
RecognitionFeatures.Builder
Available recognition features.
Protobuf type google.cloud.speech.v2.RecognitionFeatures
RecognitionOutputConfig
Configuration options for the output(s) of recognition.
Protobuf type google.cloud.speech.v2.RecognitionOutputConfig
RecognitionOutputConfig.Builder
Configuration options for the output(s) of recognition.
Protobuf type google.cloud.speech.v2.RecognitionOutputConfig
RecognitionResponseMetadata
Metadata about the recognition request and response.
Protobuf type google.cloud.speech.v2.RecognitionResponseMetadata
RecognitionResponseMetadata.Builder
Metadata about the recognition request and response.
Protobuf type google.cloud.speech.v2.RecognitionResponseMetadata
RecognizeRequest
Request message for the
Recognize method. Either
content
or uri
must be supplied. Supplying both or neither returns
INVALID_ARGUMENT. See content
limits.
Protobuf type google.cloud.speech.v2.RecognizeRequest
RecognizeRequest.Builder
Request message for the
Recognize method. Either
content
or uri
must be supplied. Supplying both or neither returns
INVALID_ARGUMENT. See content
limits.
Protobuf type google.cloud.speech.v2.RecognizeRequest
RecognizeResponse
Response message for the Recognize method.
Protobuf type google.cloud.speech.v2.RecognizeResponse
RecognizeResponse.Builder
Response message for the Recognize method.
Protobuf type google.cloud.speech.v2.RecognizeResponse
Recognizer
A Recognizer message. Stores recognition configuration and metadata.
Protobuf type google.cloud.speech.v2.Recognizer
Recognizer.Builder
A Recognizer message. Stores recognition configuration and metadata.
Protobuf type google.cloud.speech.v2.Recognizer
RecognizerName
RecognizerName.Builder
Builder for projects/{project}/locations/{location}/recognizers/{recognizer}.
SpeakerDiarizationConfig
Configuration to enable speaker diarization.
Protobuf type google.cloud.speech.v2.SpeakerDiarizationConfig
SpeakerDiarizationConfig.Builder
Configuration to enable speaker diarization.
Protobuf type google.cloud.speech.v2.SpeakerDiarizationConfig
SpeechAdaptation
Provides "hints" to the speech recognizer to favor specific words and phrases in the results. PhraseSets can be specified as an inline resource, or a reference to an existing PhraseSet resource.
Protobuf type google.cloud.speech.v2.SpeechAdaptation
SpeechAdaptation.AdaptationPhraseSet
A biasing PhraseSet, which can be either a string referencing the name of an existing PhraseSets resource, or an inline definition of a PhraseSet.
Protobuf type google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet
SpeechAdaptation.AdaptationPhraseSet.Builder
A biasing PhraseSet, which can be either a string referencing the name of an existing PhraseSets resource, or an inline definition of a PhraseSet.
Protobuf type google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet
SpeechAdaptation.Builder
Provides "hints" to the speech recognizer to favor specific words and phrases in the results. PhraseSets can be specified as an inline resource, or a reference to an existing PhraseSet resource.
Protobuf type google.cloud.speech.v2.SpeechAdaptation
SpeechClient
Service Description: Enables speech transcription and resource management.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpeechClient speechClient = SpeechClient.create()) {
RecognizerName name = RecognizerName.of("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
Recognizer response = speechClient.getRecognizer(name);
}
Note: close() needs to be called on the SpeechClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of SpeechSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
SpeechSettings speechSettings =
SpeechSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
SpeechClient speechClient = SpeechClient.create(speechSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
SpeechSettings speechSettings = SpeechSettings.newBuilder().setEndpoint(myEndpoint).build();
SpeechClient speechClient = SpeechClient.create(speechSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
SpeechSettings speechSettings = SpeechSettings.newHttpJsonBuilder().build();
SpeechClient speechClient = SpeechClient.create(speechSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
SpeechClient.ListCustomClassesFixedSizeCollection
SpeechClient.ListCustomClassesPage
SpeechClient.ListCustomClassesPagedResponse
SpeechClient.ListLocationsFixedSizeCollection
SpeechClient.ListLocationsPage
SpeechClient.ListLocationsPagedResponse
SpeechClient.ListPhraseSetsFixedSizeCollection
SpeechClient.ListPhraseSetsPage
SpeechClient.ListPhraseSetsPagedResponse
SpeechClient.ListRecognizersFixedSizeCollection
SpeechClient.ListRecognizersPage
SpeechClient.ListRecognizersPagedResponse
SpeechGrpc
Enables speech transcription and resource management.
SpeechGrpc.SpeechBlockingStub
A stub to allow clients to do synchronous rpc calls to service Speech.
Enables speech transcription and resource management.
SpeechGrpc.SpeechFutureStub
A stub to allow clients to do ListenableFuture-style rpc calls to service Speech.
Enables speech transcription and resource management.
SpeechGrpc.SpeechImplBase
Base class for the server implementation of the service Speech.
Enables speech transcription and resource management.
SpeechGrpc.SpeechStub
A stub to allow clients to do asynchronous rpc calls to service Speech.
Enables speech transcription and resource management.
SpeechRecognitionAlternative
Alternative hypotheses (a.k.a. n-best list).
Protobuf type google.cloud.speech.v2.SpeechRecognitionAlternative
SpeechRecognitionAlternative.Builder
Alternative hypotheses (a.k.a. n-best list).
Protobuf type google.cloud.speech.v2.SpeechRecognitionAlternative
SpeechRecognitionResult
A speech recognition result corresponding to a portion of the audio.
Protobuf type google.cloud.speech.v2.SpeechRecognitionResult
SpeechRecognitionResult.Builder
A speech recognition result corresponding to a portion of the audio.
Protobuf type google.cloud.speech.v2.SpeechRecognitionResult
SpeechSettings
Settings class to configure an instance of SpeechClient.
The default instance has everything set to sensible defaults:
- The default service address (speech.googleapis.com) and default port (443) are used.
- Credentials are acquired automatically through Application Default Credentials.
- Retries are configured for idempotent methods but not for non-idempotent methods.
The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.
For example, to set the total timeout of getRecognizer to 30 seconds:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
SpeechSettings.Builder speechSettingsBuilder = SpeechSettings.newBuilder();
speechSettingsBuilder
.getRecognizerSettings()
.setRetrySettings(
speechSettingsBuilder
.getRecognizerSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
SpeechSettings speechSettings = speechSettingsBuilder.build();
SpeechSettings.Builder
Builder for SpeechSettings.
StreamingRecognitionConfig
Provides configuration information for the StreamingRecognize request.
Protobuf type google.cloud.speech.v2.StreamingRecognitionConfig
StreamingRecognitionConfig.Builder
Provides configuration information for the StreamingRecognize request.
Protobuf type google.cloud.speech.v2.StreamingRecognitionConfig
StreamingRecognitionFeatures
Available recognition features specific to streaming recognition requests.
Protobuf type google.cloud.speech.v2.StreamingRecognitionFeatures
StreamingRecognitionFeatures.Builder
Available recognition features specific to streaming recognition requests.
Protobuf type google.cloud.speech.v2.StreamingRecognitionFeatures
StreamingRecognitionFeatures.VoiceActivityTimeout
Events that a timeout can be set on for voice activity.
Protobuf type google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout
StreamingRecognitionFeatures.VoiceActivityTimeout.Builder
Events that a timeout can be set on for voice activity.
Protobuf type
google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout
StreamingRecognitionResult
A streaming speech recognition result corresponding to a portion of the audio that is currently being processed.
Protobuf type google.cloud.speech.v2.StreamingRecognitionResult
StreamingRecognitionResult.Builder
A streaming speech recognition result corresponding to a portion of the audio that is currently being processed.
Protobuf type google.cloud.speech.v2.StreamingRecognitionResult
StreamingRecognizeRequest
Request message for the StreamingRecognize method. Multiple StreamingRecognizeRequest messages are sent. The first message must contain a recognizer and optionally a streaming_config message and must not contain audio. All subsequent messages must contain audio and must not contain a streaming_config message.
Protobuf type google.cloud.speech.v2.StreamingRecognizeRequest
StreamingRecognizeRequest.Builder
Request message for the StreamingRecognize method. Multiple StreamingRecognizeRequest messages are sent. The first message must contain a recognizer and optionally a streaming_config message and must not contain audio. All subsequent messages must contain audio and must not contain a streaming_config message.
Protobuf type google.cloud.speech.v2.StreamingRecognizeRequest
StreamingRecognizeResponse
StreamingRecognizeResponse
is the only message returned to the client by
StreamingRecognize
. A series of zero or more StreamingRecognizeResponse
messages are streamed back to the client. If there is no recognizable
audio then no messages are streamed back to the client.
Here are some examples of StreamingRecognizeResponse
s that might
be returned while processing audio:
results { alternatives { transcript: "tube" } stability: 0.01 }
results { alternatives { transcript: "to be a" } stability: 0.01 }
results { alternatives { transcript: "to be" } stability: 0.9 } results { alternatives { transcript: " or not to be" } stability: 0.01 }
results { alternatives { transcript: "to be or not to be" confidence: 0.92 } alternatives { transcript: "to bee or not to bee" } is_final: true }
results { alternatives { transcript: " that's" } stability: 0.01 }
results { alternatives { transcript: " that is" } stability: 0.9 } results { alternatives { transcript: " the question" } stability: 0.01 }
results { alternatives { transcript: " that is the question" confidence: 0.98 } alternatives { transcript: " that was the question" } is_final: true }
Notes:
Only two of the above responses #4 and #7 contain final results; they are indicated by
is_final: true
. Concatenating these together generates the full transcript: "to be or not to be that is the question".The others contain interim
results
. #3 and #6 contain two interimresults
: the first portion has a high stability and is less likely to change; the second portion has a low stability and is very likely to change. A UI designer might choose to show only high stabilityresults
.The specific
stability
andconfidence
values shown above are only for illustrative purposes. Actual values may vary.In each response, only one of these fields will be set:
error
,speech_event_type
, or one or more (repeated)results
.
Protobuf type google.cloud.speech.v2.StreamingRecognizeResponse
StreamingRecognizeResponse.Builder
StreamingRecognizeResponse
is the only message returned to the client by
StreamingRecognize
. A series of zero or more StreamingRecognizeResponse
messages are streamed back to the client. If there is no recognizable
audio then no messages are streamed back to the client.
Here are some examples of StreamingRecognizeResponse
s that might
be returned while processing audio:
results { alternatives { transcript: "tube" } stability: 0.01 }
results { alternatives { transcript: "to be a" } stability: 0.01 }
results { alternatives { transcript: "to be" } stability: 0.9 } results { alternatives { transcript: " or not to be" } stability: 0.01 }
results { alternatives { transcript: "to be or not to be" confidence: 0.92 } alternatives { transcript: "to bee or not to bee" } is_final: true }
results { alternatives { transcript: " that's" } stability: 0.01 }
results { alternatives { transcript: " that is" } stability: 0.9 } results { alternatives { transcript: " the question" } stability: 0.01 }
results { alternatives { transcript: " that is the question" confidence: 0.98 } alternatives { transcript: " that was the question" } is_final: true }
Notes:
Only two of the above responses #4 and #7 contain final results; they are indicated by
is_final: true
. Concatenating these together generates the full transcript: "to be or not to be that is the question".The others contain interim
results
. #3 and #6 contain two interimresults
: the first portion has a high stability and is less likely to change; the second portion has a low stability and is very likely to change. A UI designer might choose to show only high stabilityresults
.The specific
stability
andconfidence
values shown above are only for illustrative purposes. Actual values may vary.In each response, only one of these fields will be set:
error
,speech_event_type
, or one or more (repeated)results
.
Protobuf type google.cloud.speech.v2.StreamingRecognizeResponse
UndeleteCustomClassRequest
Request message for the UndeleteCustomClass method.
Protobuf type google.cloud.speech.v2.UndeleteCustomClassRequest
UndeleteCustomClassRequest.Builder
Request message for the UndeleteCustomClass method.
Protobuf type google.cloud.speech.v2.UndeleteCustomClassRequest
UndeletePhraseSetRequest
Request message for the UndeletePhraseSet method.
Protobuf type google.cloud.speech.v2.UndeletePhraseSetRequest
UndeletePhraseSetRequest.Builder
Request message for the UndeletePhraseSet method.
Protobuf type google.cloud.speech.v2.UndeletePhraseSetRequest
UndeleteRecognizerRequest
Request message for the UndeleteRecognizer method.
Protobuf type google.cloud.speech.v2.UndeleteRecognizerRequest
UndeleteRecognizerRequest.Builder
Request message for the UndeleteRecognizer method.
Protobuf type google.cloud.speech.v2.UndeleteRecognizerRequest
UpdateConfigRequest
Request message for the UpdateConfig method.
Protobuf type google.cloud.speech.v2.UpdateConfigRequest
UpdateConfigRequest.Builder
Request message for the UpdateConfig method.
Protobuf type google.cloud.speech.v2.UpdateConfigRequest
UpdateCustomClassRequest
Request message for the UpdateCustomClass method.
Protobuf type google.cloud.speech.v2.UpdateCustomClassRequest
UpdateCustomClassRequest.Builder
Request message for the UpdateCustomClass method.
Protobuf type google.cloud.speech.v2.UpdateCustomClassRequest
UpdatePhraseSetRequest
Request message for the UpdatePhraseSet method.
Protobuf type google.cloud.speech.v2.UpdatePhraseSetRequest
UpdatePhraseSetRequest.Builder
Request message for the UpdatePhraseSet method.
Protobuf type google.cloud.speech.v2.UpdatePhraseSetRequest
UpdateRecognizerRequest
Request message for the UpdateRecognizer method.
Protobuf type google.cloud.speech.v2.UpdateRecognizerRequest
UpdateRecognizerRequest.Builder
Request message for the UpdateRecognizer method.
Protobuf type google.cloud.speech.v2.UpdateRecognizerRequest
WordInfo
Word-specific information for recognized words.
Protobuf type google.cloud.speech.v2.WordInfo
WordInfo.Builder
Word-specific information for recognized words.
Protobuf type google.cloud.speech.v2.WordInfo
Interfaces
AutoDetectDecodingConfigOrBuilder
BatchRecognizeFileMetadataOrBuilder
BatchRecognizeFileResultOrBuilder
BatchRecognizeMetadataOrBuilder
BatchRecognizeRequestOrBuilder
BatchRecognizeResponseOrBuilder
BatchRecognizeResultsOrBuilder
BatchRecognizeTranscriptionMetadataOrBuilder
ConfigOrBuilder
CreateCustomClassRequestOrBuilder
CreatePhraseSetRequestOrBuilder
CreateRecognizerRequestOrBuilder
CustomClass.ClassItemOrBuilder
CustomClassOrBuilder
DeleteCustomClassRequestOrBuilder
DeletePhraseSetRequestOrBuilder
DeleteRecognizerRequestOrBuilder
ExplicitDecodingConfigOrBuilder
GcsOutputConfigOrBuilder
GetConfigRequestOrBuilder
GetCustomClassRequestOrBuilder
GetPhraseSetRequestOrBuilder
GetRecognizerRequestOrBuilder
InlineOutputConfigOrBuilder
ListCustomClassesRequestOrBuilder
ListCustomClassesResponseOrBuilder
ListPhraseSetsRequestOrBuilder
ListPhraseSetsResponseOrBuilder
ListRecognizersRequestOrBuilder
ListRecognizersResponseOrBuilder
OperationMetadataOrBuilder
PhraseSet.PhraseOrBuilder
PhraseSetOrBuilder
RecognitionConfigOrBuilder
RecognitionFeaturesOrBuilder
RecognitionOutputConfigOrBuilder
RecognitionResponseMetadataOrBuilder
RecognizeRequestOrBuilder
RecognizeResponseOrBuilder
RecognizerOrBuilder
SpeakerDiarizationConfigOrBuilder
SpeechAdaptation.AdaptationPhraseSetOrBuilder
SpeechAdaptationOrBuilder
SpeechGrpc.AsyncService
Enables speech transcription and resource management.
SpeechRecognitionAlternativeOrBuilder
SpeechRecognitionResultOrBuilder
StreamingRecognitionConfigOrBuilder
StreamingRecognitionFeatures.VoiceActivityTimeoutOrBuilder
StreamingRecognitionFeaturesOrBuilder
StreamingRecognitionResultOrBuilder
StreamingRecognizeRequestOrBuilder
StreamingRecognizeResponseOrBuilder
UndeleteCustomClassRequestOrBuilder
UndeletePhraseSetRequestOrBuilder
UndeleteRecognizerRequestOrBuilder
UpdateConfigRequestOrBuilder
UpdateCustomClassRequestOrBuilder
UpdatePhraseSetRequestOrBuilder
UpdateRecognizerRequestOrBuilder
WordInfoOrBuilder
Enums
BatchRecognizeFileMetadata.AudioSourceCase
BatchRecognizeRequest.ProcessingStrategy
Possible processing strategies for batch requests.
Protobuf enum google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy
CustomClass.State
Set of states that define the lifecycle of a CustomClass.
Protobuf enum google.cloud.speech.v2.CustomClass.State
ExplicitDecodingConfig.AudioEncoding
Supported audio data encodings.
Protobuf enum google.cloud.speech.v2.ExplicitDecodingConfig.AudioEncoding
OperationMetadata.MetadataCase
OperationMetadata.RequestCase
PhraseSet.State
Set of states that define the lifecycle of a PhraseSet.
Protobuf enum google.cloud.speech.v2.PhraseSet.State
RecognitionConfig.DecodingConfigCase
RecognitionFeatures.MultiChannelMode
Options for how to recognize multi-channel audio.
Protobuf enum google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode
RecognitionOutputConfig.OutputCase
RecognizeRequest.AudioSourceCase
Recognizer.State
Set of states that define the lifecycle of a Recognizer.
Protobuf enum google.cloud.speech.v2.Recognizer.State
SpeechAdaptation.AdaptationPhraseSet.ValueCase
StreamingRecognizeRequest.StreamingRequestCase
StreamingRecognizeResponse.SpeechEventType
Indicates the type of speech event.
Protobuf enum google.cloud.speech.v2.StreamingRecognizeResponse.SpeechEventType