public sealed class StreamingTranslateSpeechRequest : IMessage<StreamingTranslateSpeechRequest>, IEquatable<StreamingTranslateSpeechRequest>, IDeepCloneable<StreamingTranslateSpeechRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Media Translation v1beta1 API class StreamingTranslateSpeechRequest.
The top-level message sent by the client for the StreamingTranslateSpeech
method. Multiple StreamingTranslateSpeechRequest messages are sent. The
first message must contain a streaming_config message and must not contain
audio_content data. All subsequent messages must contain audio_content
data and must not contain a streaming_config message.
The audio data to be translated. Sequential chunks of audio data are sent
in sequential StreamingTranslateSpeechRequest messages. The first
StreamingTranslateSpeechRequest message must not contain
audio_content data and all subsequent StreamingTranslateSpeechRequest
messages must contain audio_content data. The audio bytes must be
encoded as specified in StreamingTranslateSpeechConfig. Note: as with
all bytes fields, protobuffers use a pure binary representation (not
base64).
public StreamingTranslateSpeechConfig StreamingConfig { get; set; }
Provides information to the recognizer that specifies how to process the
request. The first StreamingTranslateSpeechRequest message must contain
a streaming_config message.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eStreamingTranslateSpeechRequest\u003c/code\u003e class is used for sending streaming audio translation requests to the Media Translation API.\u003c/p\u003e\n"],["\u003cp\u003eThe first request message must include \u003ccode\u003estreaming_config\u003c/code\u003e while subsequent messages must contain \u003ccode\u003eaudio_content\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and has a \u003ccode\u003eStreamingRequestCase\u003c/code\u003e property to distinguish between configurations and content.\u003c/p\u003e\n"],["\u003cp\u003eThere are different versions of this class available, with the latest being \u003ccode\u003e2.0.0-beta05\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAudioContent\u003c/code\u003e property of the class holds the audio data for translation, represented as \u003ccode\u003eByteString\u003c/code\u003e, and \u003ccode\u003eStreamingConfig\u003c/code\u003e holds information about how to process the request.\u003c/p\u003e\n"]]],[],null,["# Media Translation v1beta1 API - Class StreamingTranslateSpeechRequest (2.0.0-beta05)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-beta05 (latest)](/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/latest/Google.Cloud.MediaTranslation.V1Beta1.StreamingTranslateSpeechRequest)\n- [2.0.0-beta04](/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/2.0.0-beta04/Google.Cloud.MediaTranslation.V1Beta1.StreamingTranslateSpeechRequest)\n- [1.0.0-beta03](/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/1.0.0-beta03/Google.Cloud.MediaTranslation.V1Beta1.StreamingTranslateSpeechRequest) \n\n public sealed class StreamingTranslateSpeechRequest : IMessage\u003cStreamingTranslateSpeechRequest\u003e, IEquatable\u003cStreamingTranslateSpeechRequest\u003e, IDeepCloneable\u003cStreamingTranslateSpeechRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Media Translation v1beta1 API class StreamingTranslateSpeechRequest.\n\nThe top-level message sent by the client for the `StreamingTranslateSpeech`\nmethod. Multiple `StreamingTranslateSpeechRequest` messages are sent. The\nfirst message must contain a `streaming_config` message and must not contain\n`audio_content` data. All subsequent messages must contain `audio_content`\ndata and must not contain a `streaming_config` message. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e StreamingTranslateSpeechRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[StreamingTranslateSpeechRequest](/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/latest/Google.Cloud.MediaTranslation.V1Beta1.StreamingTranslateSpeechRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[StreamingTranslateSpeechRequest](/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/latest/Google.Cloud.MediaTranslation.V1Beta1.StreamingTranslateSpeechRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[StreamingTranslateSpeechRequest](/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/latest/Google.Cloud.MediaTranslation.V1Beta1.StreamingTranslateSpeechRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.MediaTranslation.V1Beta1](/dotnet/docs/reference/Google.Cloud.MediaTranslation.V1Beta1/latest/Google.Cloud.MediaTranslation.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.MediaTranslation.V1Beta1.dll\n\nConstructors\n------------\n\n### StreamingTranslateSpeechRequest()\n\n public StreamingTranslateSpeechRequest()\n\n### StreamingTranslateSpeechRequest(StreamingTranslateSpeechRequest)\n\n public StreamingTranslateSpeechRequest(StreamingTranslateSpeechRequest other)\n\nProperties\n----------\n\n### AudioContent\n\n public ByteString AudioContent { get; set; }\n\nThe audio data to be translated. Sequential chunks of audio data are sent\nin sequential `StreamingTranslateSpeechRequest` messages. The first\n`StreamingTranslateSpeechRequest` message must not contain\n`audio_content` data and all subsequent `StreamingTranslateSpeechRequest`\nmessages must contain `audio_content` data. The audio bytes must be\nencoded as specified in `StreamingTranslateSpeechConfig`. Note: as with\nall bytes fields, protobuffers use a pure binary representation (not\nbase64).\n\n### HasAudioContent\n\n public bool HasAudioContent { get; }\n\nGets whether the \"audio_content\" field is set\n\n### StreamingConfig\n\n public StreamingTranslateSpeechConfig StreamingConfig { get; set; }\n\nProvides information to the recognizer that specifies how to process the\nrequest. The first `StreamingTranslateSpeechRequest` message must contain\na `streaming_config` message.\n\n### StreamingRequestCase\n\n public StreamingTranslateSpeechRequest.StreamingRequestOneofCase StreamingRequestCase { get; }"]]