Represents a SpeechTranslationService
Inheritance
$protobuf.rpc.Service > protos.google.cloud.mediatranslation.v1beta1.SpeechTranslationServicePackage
@google-cloud/media-translation!Constructors
(constructor)(rpcImpl, requestDelimited, responseDelimited)
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
Constructs a new SpeechTranslationService service.
Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
Methods
create(rpcImpl, requestDelimited, responseDelimited)
public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SpeechTranslationService;
Creates new SpeechTranslationService service using the specified rpc implementation.
Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
Type | Description |
SpeechTranslationService | RPC service. Useful where requests and/or responses are streamed. |
streamingTranslateSpeech(request, callback)
public streamingTranslateSpeech(request: google.cloud.mediatranslation.v1beta1.IStreamingTranslateSpeechRequest, callback: google.cloud.mediatranslation.v1beta1.SpeechTranslationService.StreamingTranslateSpeechCallback): void;
Calls StreamingTranslateSpeech.
Name | Description |
request |
IStreamingTranslateSpeechRequest
StreamingTranslateSpeechRequest message or plain object |
callback |
google.cloud.mediatranslation.v1beta1.SpeechTranslationService.StreamingTranslateSpeechCallback
Node-style callback called with the error, if any, and StreamingTranslateSpeechResponse |
Type | Description |
void |
streamingTranslateSpeech(request)
public streamingTranslateSpeech(request: google.cloud.mediatranslation.v1beta1.IStreamingTranslateSpeechRequest): Promise<google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse>;
Calls StreamingTranslateSpeech.
Name | Description |
request |
IStreamingTranslateSpeechRequest
StreamingTranslateSpeechRequest message or plain object |
Type | Description |
Promise<google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse> | Promise |