Represents a SpeechTranslationService
Inheritance
$protobuf.rpc.Service > protos.google.cloud.mediatranslation.v1beta1.SpeechTranslationServicePackage
@google-cloud/media-translationConstructors
(constructor)(rpcImpl, requestDelimited, responseDelimited)
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);Constructs a new SpeechTranslationService service.
| Parameters | |
|---|---|
| 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.
| Parameters | |
|---|---|
| Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
| Returns | |
|---|---|
| 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.
| Parameters | |
|---|---|
| Name | Description |
request |
IStreamingTranslateSpeechRequest
StreamingTranslateSpeechRequest message or plain object |
callback |
StreamingTranslateSpeechCallback
Node-style callback called with the error, if any, and StreamingTranslateSpeechResponse |
| Returns | |
|---|---|
| Type | Description |
void |
|
streamingTranslateSpeech(request)
public streamingTranslateSpeech(request: google.cloud.mediatranslation.v1beta1.IStreamingTranslateSpeechRequest): Promise<google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse>;Calls StreamingTranslateSpeech.
| Parameter | |
|---|---|
| Name | Description |
request |
IStreamingTranslateSpeechRequest
StreamingTranslateSpeechRequest message or plain object |
| Returns | |
|---|---|
| Type | Description |
Promise<google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse> |
Promise |