public sealed class StreamingRecognizeRequest : IMessage<StreamingRecognizeRequest>, IEquatable<StreamingRecognizeRequest>, IDeepCloneable<StreamingRecognizeRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Speech-to-Text v2 API class StreamingRecognizeRequest.
Request message for the [StreamingRecognize][google.cloud.speech.v2.Speech.StreamingRecognize] method. Multiple [StreamingRecognizeRequest][google.cloud.speech.v2.StreamingRecognizeRequest] messages are sent. The first message must contain a [recognizer][google.cloud.speech.v2.StreamingRecognizeRequest.recognizer] and optionally a [streaming_config][google.cloud.speech.v2.StreamingRecognizeRequest.streaming_config] message and must not contain [audio][google.cloud.speech.v2.StreamingRecognizeRequest.audio]. All subsequent messages must contain [audio][google.cloud.speech.v2.StreamingRecognizeRequest.audio] and must not contain a [streaming_config][google.cloud.speech.v2.StreamingRecognizeRequest.streaming_config] message.
Implements
IMessageStreamingRecognizeRequest, IEquatableStreamingRecognizeRequest, IDeepCloneableStreamingRecognizeRequest, IBufferMessage, IMessageNamespace
Google.Cloud.Speech.V2Assembly
Google.Cloud.Speech.V2.dll
Constructors
StreamingRecognizeRequest()
public StreamingRecognizeRequest()
StreamingRecognizeRequest(StreamingRecognizeRequest)
public StreamingRecognizeRequest(StreamingRecognizeRequest other)
Parameter | |
---|---|
Name | Description |
other | StreamingRecognizeRequest |
Properties
Audio
public ByteString Audio { get; set; }
Inline audio bytes to be Recognized. Maximum size for this field is 15 KB per request.
Property Value | |
---|---|
Type | Description |
ByteString |
Recognizer
public string Recognizer { get; set; }
Required. Streaming recognition should start with an initial request having
a recognizer
. Subsequent requests carry the audio data to be recognized.
The initial request with configuration can be omitted if the Recognizer being used has a [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config].
Property Value | |
---|---|
Type | Description |
string |
RecognizerAsRecognizerName
public RecognizerName RecognizerAsRecognizerName { get; set; }
RecognizerName-typed view over the Recognizer resource name property.
Property Value | |
---|---|
Type | Description |
RecognizerName |
StreamingConfig
public StreamingRecognitionConfig StreamingConfig { get; set; }
StreamingRecognitionConfig to be used in this recognition attempt. If provided, it will override the default RecognitionConfig stored in the Recognizer.
Property Value | |
---|---|
Type | Description |
StreamingRecognitionConfig |
StreamingRequestCase
public StreamingRecognizeRequest.StreamingRequestOneofCase StreamingRequestCase { get; }
Property Value | |
---|---|
Type | Description |
StreamingRecognizeRequestStreamingRequestOneofCase |