public class SpeechTranslationService.SpeechTranslationServiceClient : ClientBase<SpeechTranslationService.SpeechTranslationServiceClient>Reference documentation and code samples for the Media Translation v1beta1 API class SpeechTranslationService.SpeechTranslationServiceClient.
Client for SpeechTranslationService
Inheritance
object > ClientBase > ClientBaseSpeechTranslationServiceSpeechTranslationServiceClient > SpeechTranslationService.SpeechTranslationServiceClientNamespace
Google.Cloud.MediaTranslation.V1Beta1Assembly
Google.Cloud.MediaTranslation.V1Beta1.dll
Constructors
SpeechTranslationServiceClient()
protected SpeechTranslationServiceClient()Protected parameterless constructor to allow creation of test doubles.
SpeechTranslationServiceClient(CallInvoker)
public SpeechTranslationServiceClient(CallInvoker callInvoker)Creates a new client for SpeechTranslationService that uses a custom CallInvoker.
| Parameter | |
|---|---|
| Name | Description |
callInvoker |
CallInvokerThe callInvoker to use to make remote calls. |
SpeechTranslationServiceClient(ChannelBase)
public SpeechTranslationServiceClient(ChannelBase channel)Creates a new client for SpeechTranslationService
| Parameter | |
|---|---|
| Name | Description |
channel |
ChannelBaseThe channel to use to make remote calls. |
SpeechTranslationServiceClient(ClientBaseConfiguration)
protected SpeechTranslationServiceClient(ClientBase.ClientBaseConfiguration configuration)Protected constructor to allow creation of configured clients.
| Parameter | |
|---|---|
| Name | Description |
configuration |
ClientBaseClientBaseConfigurationThe client configuration. |
Methods
NewInstance(ClientBaseConfiguration)
protected override SpeechTranslationService.SpeechTranslationServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)Creates a new instance of client from given ClientBaseConfiguration.
| Parameter | |
|---|---|
| Name | Description |
configuration |
ClientBaseClientBaseConfiguration |
| Returns | |
|---|---|
| Type | Description |
SpeechTranslationServiceSpeechTranslationServiceClient |
|
StreamingTranslateSpeech(CallOptions)
public virtual AsyncDuplexStreamingCall<StreamingTranslateSpeechRequest, StreamingTranslateSpeechResponse> StreamingTranslateSpeech(CallOptions options)Performs bidirectional streaming speech translation: receive results while sending audio. This method is only available via the gRPC API (not REST).
| Parameter | |
|---|---|
| Name | Description |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncDuplexStreamingCallStreamingTranslateSpeechRequestStreamingTranslateSpeechResponse |
The call object. |
StreamingTranslateSpeech(Metadata, DateTime?, CancellationToken)
public virtual AsyncDuplexStreamingCall<StreamingTranslateSpeechRequest, StreamingTranslateSpeechResponse> StreamingTranslateSpeech(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)Performs bidirectional streaming speech translation: receive results while sending audio. This method is only available via the gRPC API (not REST).
| Parameters | |
|---|---|
| Name | Description |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncDuplexStreamingCallStreamingTranslateSpeechRequestStreamingTranslateSpeechResponse |
The call object. |