Class protos.google.cloud.mediatranslation.v1beta1.SpeechTranslationService (2.3.4)

Represents a SpeechTranslationService

Inheritance

$protobuf.rpc.Service > protos.google.cloud.mediatranslation.v1beta1.SpeechTranslationService

Package

@google-cloud/media-translation!

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);

Constructs a new SpeechTranslationService service.

Parameters
NameDescription
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.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
TypeDescription
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.

Parameters
NameDescription
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

Returns
TypeDescription
void

streamingTranslateSpeech(request)

public streamingTranslateSpeech(request: google.cloud.mediatranslation.v1beta1.IStreamingTranslateSpeechRequest): Promise<google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse>;

Calls StreamingTranslateSpeech.

Parameter
NameDescription
request IStreamingTranslateSpeechRequest

StreamingTranslateSpeechRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse>

Promise