SpeechTranslationService

google.cloud.mediatranslation.v1beta1. SpeechTranslationService

Represents a SpeechTranslationService

Constructor

new SpeechTranslationService(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new SpeechTranslationService service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

streamingTranslateSpeech(request, callback) → {undefined}

Calls StreamingTranslateSpeech.

Parameters:
Name Type Description
request google.cloud.mediatranslation.v1beta1.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:
Type Description
undefined

streamingTranslateSpeech(request) → {Promise.<google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse>}

Calls StreamingTranslateSpeech.

Parameters:
Name Type Description
request google.cloud.mediatranslation.v1beta1.IStreamingTranslateSpeechRequest

StreamingTranslateSpeechRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse>

Promise

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {SpeechTranslationService}

Creates new SpeechTranslationService service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Returns:
Type Description
SpeechTranslationService

RPC service. Useful where requests and/or responses are streamed.

Type Definitions

StreamingTranslateSpeechCallback(error, responseopt)

Callback as used by streamingTranslateSpeech.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse <optional>

StreamingTranslateSpeechResponse