Provides translation from/to media types. v1beta1
Package
@google-cloud/media-translation!
Constructors
constructor(opts?: ClientOptions);
Construct an instance of SpeechTranslationServiceClient.
Parameter
Name | Description |
opts |
ClientOptions
|
Properties
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Value
Property Value
Type | Description |
gax.GoogleAuth | |
descriptors: Descriptors;
Property Value
Type | Description |
Descriptors | |
innerApiCalls: {
[name: string]: Function;
};
Property Value
Type | Description |
{
[name: string]: Function;
} | |
static get port(): number;
The port for this API service.
Property Value
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
Property Value
static get servicePath(): string;
The DNS address for this API service.
Property Value
speechTranslationServiceStub?: Promise<{
[name: string]: Function;
}>;
Property Value
Type | Description |
Promise<{
[name: string]: Function;
}> | |
Methods
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed.
|
getProjectId(): Promise<string>;
Returns
Type | Description |
Promise<string> | |
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns
initialize(): Promise<{
[name: string]: Function;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns
Type | Description |
Promise<{
[name: string]: Function;
}> | {Promise} A promise that resolves to an authenticated service stub.
|
streamingTranslateSpeech(options?: CallOptions): gax.CancellableStream;
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 |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
gax.CancellableStream | {Stream} An object stream which is both readable and writable. It accepts objects representing [StreamingTranslateSpeechRequest] for write() method, and will emit objects representing [StreamingTranslateSpeechResponse] on 'data' event asynchronously. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) for more details and examples.
|