@google-cloud/text-to-speech
Version:
Cloud Text-to-Speech API client for Node.js
914 lines (760 loc) • 648 kB
TypeScript
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import type {protobuf as $protobuf} from "google-gax";
import Long = require("long");
/** Namespace google. */
export namespace google {
/** Namespace cloud. */
namespace cloud {
/** Namespace texttospeech. */
namespace texttospeech {
/** Namespace v1. */
namespace v1 {
/** Represents a TextToSpeech */
class TextToSpeech extends $protobuf.rpc.Service {
/**
* Constructs a new TextToSpeech service.
* @param rpcImpl RPC implementation
* @param [requestDelimited=false] Whether requests are length-delimited
* @param [responseDelimited=false] Whether responses are length-delimited
*/
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
/**
* Creates new TextToSpeech service using the specified rpc implementation.
* @param rpcImpl RPC implementation
* @param [requestDelimited=false] Whether requests are length-delimited
* @param [responseDelimited=false] Whether responses are length-delimited
* @returns RPC service. Useful where requests and/or responses are streamed.
*/
public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): TextToSpeech;
/**
* Calls ListVoices.
* @param request ListVoicesRequest message or plain object
* @param callback Node-style callback called with the error, if any, and ListVoicesResponse
*/
public listVoices(request: google.cloud.texttospeech.v1.IListVoicesRequest, callback: google.cloud.texttospeech.v1.TextToSpeech.ListVoicesCallback): void;
/**
* Calls ListVoices.
* @param request ListVoicesRequest message or plain object
* @returns Promise
*/
public listVoices(request: google.cloud.texttospeech.v1.IListVoicesRequest): Promise<google.cloud.texttospeech.v1.ListVoicesResponse>;
/**
* Calls SynthesizeSpeech.
* @param request SynthesizeSpeechRequest message or plain object
* @param callback Node-style callback called with the error, if any, and SynthesizeSpeechResponse
*/
public synthesizeSpeech(request: google.cloud.texttospeech.v1.ISynthesizeSpeechRequest, callback: google.cloud.texttospeech.v1.TextToSpeech.SynthesizeSpeechCallback): void;
/**
* Calls SynthesizeSpeech.
* @param request SynthesizeSpeechRequest message or plain object
* @returns Promise
*/
public synthesizeSpeech(request: google.cloud.texttospeech.v1.ISynthesizeSpeechRequest): Promise<google.cloud.texttospeech.v1.SynthesizeSpeechResponse>;
/**
* Calls StreamingSynthesize.
* @param request StreamingSynthesizeRequest message or plain object
* @param callback Node-style callback called with the error, if any, and StreamingSynthesizeResponse
*/
public streamingSynthesize(request: google.cloud.texttospeech.v1.IStreamingSynthesizeRequest, callback: google.cloud.texttospeech.v1.TextToSpeech.StreamingSynthesizeCallback): void;
/**
* Calls StreamingSynthesize.
* @param request StreamingSynthesizeRequest message or plain object
* @returns Promise
*/
public streamingSynthesize(request: google.cloud.texttospeech.v1.IStreamingSynthesizeRequest): Promise<google.cloud.texttospeech.v1.StreamingSynthesizeResponse>;
}
namespace TextToSpeech {
/**
* Callback as used by {@link google.cloud.texttospeech.v1.TextToSpeech|listVoices}.
* @param error Error, if any
* @param [response] ListVoicesResponse
*/
type ListVoicesCallback = (error: (Error|null), response?: google.cloud.texttospeech.v1.ListVoicesResponse) => void;
/**
* Callback as used by {@link google.cloud.texttospeech.v1.TextToSpeech|synthesizeSpeech}.
* @param error Error, if any
* @param [response] SynthesizeSpeechResponse
*/
type SynthesizeSpeechCallback = (error: (Error|null), response?: google.cloud.texttospeech.v1.SynthesizeSpeechResponse) => void;
/**
* Callback as used by {@link google.cloud.texttospeech.v1.TextToSpeech|streamingSynthesize}.
* @param error Error, if any
* @param [response] StreamingSynthesizeResponse
*/
type StreamingSynthesizeCallback = (error: (Error|null), response?: google.cloud.texttospeech.v1.StreamingSynthesizeResponse) => void;
}
/** SsmlVoiceGender enum. */
enum SsmlVoiceGender {
SSML_VOICE_GENDER_UNSPECIFIED = 0,
MALE = 1,
FEMALE = 2,
NEUTRAL = 3
}
/** AudioEncoding enum. */
enum AudioEncoding {
AUDIO_ENCODING_UNSPECIFIED = 0,
LINEAR16 = 1,
MP3 = 2,
OGG_OPUS = 3,
MULAW = 5,
ALAW = 6,
PCM = 7
}
/** Properties of a ListVoicesRequest. */
interface IListVoicesRequest {
/** ListVoicesRequest languageCode */
languageCode?: (string|null);
}
/** Represents a ListVoicesRequest. */
class ListVoicesRequest implements IListVoicesRequest {
/**
* Constructs a new ListVoicesRequest.
* @param [properties] Properties to set
*/
constructor(properties?: google.cloud.texttospeech.v1.IListVoicesRequest);
/** ListVoicesRequest languageCode. */
public languageCode: string;
/**
* Creates a new ListVoicesRequest instance using the specified properties.
* @param [properties] Properties to set
* @returns ListVoicesRequest instance
*/
public static create(properties?: google.cloud.texttospeech.v1.IListVoicesRequest): google.cloud.texttospeech.v1.ListVoicesRequest;
/**
* Encodes the specified ListVoicesRequest message. Does not implicitly {@link google.cloud.texttospeech.v1.ListVoicesRequest.verify|verify} messages.
* @param message ListVoicesRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.cloud.texttospeech.v1.IListVoicesRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified ListVoicesRequest message, length delimited. Does not implicitly {@link google.cloud.texttospeech.v1.ListVoicesRequest.verify|verify} messages.
* @param message ListVoicesRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.cloud.texttospeech.v1.IListVoicesRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a ListVoicesRequest message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ListVoicesRequest
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.texttospeech.v1.ListVoicesRequest;
/**
* Decodes a ListVoicesRequest message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ListVoicesRequest
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.texttospeech.v1.ListVoicesRequest;
/**
* Verifies a ListVoicesRequest message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a ListVoicesRequest message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ListVoicesRequest
*/
public static fromObject(object: { [k: string]: any }): google.cloud.texttospeech.v1.ListVoicesRequest;
/**
* Creates a plain object from a ListVoicesRequest message. Also converts values to other types if specified.
* @param message ListVoicesRequest
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.cloud.texttospeech.v1.ListVoicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this ListVoicesRequest to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for ListVoicesRequest
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a ListVoicesResponse. */
interface IListVoicesResponse {
/** ListVoicesResponse voices */
voices?: (google.cloud.texttospeech.v1.IVoice[]|null);
}
/** Represents a ListVoicesResponse. */
class ListVoicesResponse implements IListVoicesResponse {
/**
* Constructs a new ListVoicesResponse.
* @param [properties] Properties to set
*/
constructor(properties?: google.cloud.texttospeech.v1.IListVoicesResponse);
/** ListVoicesResponse voices. */
public voices: google.cloud.texttospeech.v1.IVoice[];
/**
* Creates a new ListVoicesResponse instance using the specified properties.
* @param [properties] Properties to set
* @returns ListVoicesResponse instance
*/
public static create(properties?: google.cloud.texttospeech.v1.IListVoicesResponse): google.cloud.texttospeech.v1.ListVoicesResponse;
/**
* Encodes the specified ListVoicesResponse message. Does not implicitly {@link google.cloud.texttospeech.v1.ListVoicesResponse.verify|verify} messages.
* @param message ListVoicesResponse message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.cloud.texttospeech.v1.IListVoicesResponse, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified ListVoicesResponse message, length delimited. Does not implicitly {@link google.cloud.texttospeech.v1.ListVoicesResponse.verify|verify} messages.
* @param message ListVoicesResponse message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.cloud.texttospeech.v1.IListVoicesResponse, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a ListVoicesResponse message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ListVoicesResponse
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.texttospeech.v1.ListVoicesResponse;
/**
* Decodes a ListVoicesResponse message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ListVoicesResponse
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.texttospeech.v1.ListVoicesResponse;
/**
* Verifies a ListVoicesResponse message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a ListVoicesResponse message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ListVoicesResponse
*/
public static fromObject(object: { [k: string]: any }): google.cloud.texttospeech.v1.ListVoicesResponse;
/**
* Creates a plain object from a ListVoicesResponse message. Also converts values to other types if specified.
* @param message ListVoicesResponse
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.cloud.texttospeech.v1.ListVoicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this ListVoicesResponse to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for ListVoicesResponse
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a Voice. */
interface IVoice {
/** Voice languageCodes */
languageCodes?: (string[]|null);
/** Voice name */
name?: (string|null);
/** Voice ssmlGender */
ssmlGender?: (google.cloud.texttospeech.v1.SsmlVoiceGender|keyof typeof google.cloud.texttospeech.v1.SsmlVoiceGender|null);
/** Voice naturalSampleRateHertz */
naturalSampleRateHertz?: (number|null);
}
/** Represents a Voice. */
class Voice implements IVoice {
/**
* Constructs a new Voice.
* @param [properties] Properties to set
*/
constructor(properties?: google.cloud.texttospeech.v1.IVoice);
/** Voice languageCodes. */
public languageCodes: string[];
/** Voice name. */
public name: string;
/** Voice ssmlGender. */
public ssmlGender: (google.cloud.texttospeech.v1.SsmlVoiceGender|keyof typeof google.cloud.texttospeech.v1.SsmlVoiceGender);
/** Voice naturalSampleRateHertz. */
public naturalSampleRateHertz: number;
/**
* Creates a new Voice instance using the specified properties.
* @param [properties] Properties to set
* @returns Voice instance
*/
public static create(properties?: google.cloud.texttospeech.v1.IVoice): google.cloud.texttospeech.v1.Voice;
/**
* Encodes the specified Voice message. Does not implicitly {@link google.cloud.texttospeech.v1.Voice.verify|verify} messages.
* @param message Voice message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.cloud.texttospeech.v1.IVoice, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Voice message, length delimited. Does not implicitly {@link google.cloud.texttospeech.v1.Voice.verify|verify} messages.
* @param message Voice message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.cloud.texttospeech.v1.IVoice, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Voice message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Voice
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.texttospeech.v1.Voice;
/**
* Decodes a Voice message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Voice
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.texttospeech.v1.Voice;
/**
* Verifies a Voice message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a Voice message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Voice
*/
public static fromObject(object: { [k: string]: any }): google.cloud.texttospeech.v1.Voice;
/**
* Creates a plain object from a Voice message. Also converts values to other types if specified.
* @param message Voice
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.cloud.texttospeech.v1.Voice, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Voice to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Voice
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of an AdvancedVoiceOptions. */
interface IAdvancedVoiceOptions {
/** AdvancedVoiceOptions lowLatencyJourneySynthesis */
lowLatencyJourneySynthesis?: (boolean|null);
}
/** Represents an AdvancedVoiceOptions. */
class AdvancedVoiceOptions implements IAdvancedVoiceOptions {
/**
* Constructs a new AdvancedVoiceOptions.
* @param [properties] Properties to set
*/
constructor(properties?: google.cloud.texttospeech.v1.IAdvancedVoiceOptions);
/** AdvancedVoiceOptions lowLatencyJourneySynthesis. */
public lowLatencyJourneySynthesis?: (boolean|null);
/** AdvancedVoiceOptions _lowLatencyJourneySynthesis. */
public _lowLatencyJourneySynthesis?: "lowLatencyJourneySynthesis";
/**
* Creates a new AdvancedVoiceOptions instance using the specified properties.
* @param [properties] Properties to set
* @returns AdvancedVoiceOptions instance
*/
public static create(properties?: google.cloud.texttospeech.v1.IAdvancedVoiceOptions): google.cloud.texttospeech.v1.AdvancedVoiceOptions;
/**
* Encodes the specified AdvancedVoiceOptions message. Does not implicitly {@link google.cloud.texttospeech.v1.AdvancedVoiceOptions.verify|verify} messages.
* @param message AdvancedVoiceOptions message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.cloud.texttospeech.v1.IAdvancedVoiceOptions, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified AdvancedVoiceOptions message, length delimited. Does not implicitly {@link google.cloud.texttospeech.v1.AdvancedVoiceOptions.verify|verify} messages.
* @param message AdvancedVoiceOptions message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.cloud.texttospeech.v1.IAdvancedVoiceOptions, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an AdvancedVoiceOptions message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns AdvancedVoiceOptions
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.texttospeech.v1.AdvancedVoiceOptions;
/**
* Decodes an AdvancedVoiceOptions message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns AdvancedVoiceOptions
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.texttospeech.v1.AdvancedVoiceOptions;
/**
* Verifies an AdvancedVoiceOptions message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates an AdvancedVoiceOptions message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns AdvancedVoiceOptions
*/
public static fromObject(object: { [k: string]: any }): google.cloud.texttospeech.v1.AdvancedVoiceOptions;
/**
* Creates a plain object from an AdvancedVoiceOptions message. Also converts values to other types if specified.
* @param message AdvancedVoiceOptions
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.cloud.texttospeech.v1.AdvancedVoiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this AdvancedVoiceOptions to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for AdvancedVoiceOptions
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a SynthesizeSpeechRequest. */
interface ISynthesizeSpeechRequest {
/** SynthesizeSpeechRequest input */
input?: (google.cloud.texttospeech.v1.ISynthesisInput|null);
/** SynthesizeSpeechRequest voice */
voice?: (google.cloud.texttospeech.v1.IVoiceSelectionParams|null);
/** SynthesizeSpeechRequest audioConfig */
audioConfig?: (google.cloud.texttospeech.v1.IAudioConfig|null);
/** SynthesizeSpeechRequest advancedVoiceOptions */
advancedVoiceOptions?: (google.cloud.texttospeech.v1.IAdvancedVoiceOptions|null);
}
/** Represents a SynthesizeSpeechRequest. */
class SynthesizeSpeechRequest implements ISynthesizeSpeechRequest {
/**
* Constructs a new SynthesizeSpeechRequest.
* @param [properties] Properties to set
*/
constructor(properties?: google.cloud.texttospeech.v1.ISynthesizeSpeechRequest);
/** SynthesizeSpeechRequest input. */
public input?: (google.cloud.texttospeech.v1.ISynthesisInput|null);
/** SynthesizeSpeechRequest voice. */
public voice?: (google.cloud.texttospeech.v1.IVoiceSelectionParams|null);
/** SynthesizeSpeechRequest audioConfig. */
public audioConfig?: (google.cloud.texttospeech.v1.IAudioConfig|null);
/** SynthesizeSpeechRequest advancedVoiceOptions. */
public advancedVoiceOptions?: (google.cloud.texttospeech.v1.IAdvancedVoiceOptions|null);
/** SynthesizeSpeechRequest _advancedVoiceOptions. */
public _advancedVoiceOptions?: "advancedVoiceOptions";
/**
* Creates a new SynthesizeSpeechRequest instance using the specified properties.
* @param [properties] Properties to set
* @returns SynthesizeSpeechRequest instance
*/
public static create(properties?: google.cloud.texttospeech.v1.ISynthesizeSpeechRequest): google.cloud.texttospeech.v1.SynthesizeSpeechRequest;
/**
* Encodes the specified SynthesizeSpeechRequest message. Does not implicitly {@link google.cloud.texttospeech.v1.SynthesizeSpeechRequest.verify|verify} messages.
* @param message SynthesizeSpeechRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.cloud.texttospeech.v1.ISynthesizeSpeechRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified SynthesizeSpeechRequest message, length delimited. Does not implicitly {@link google.cloud.texttospeech.v1.SynthesizeSpeechRequest.verify|verify} messages.
* @param message SynthesizeSpeechRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.cloud.texttospeech.v1.ISynthesizeSpeechRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a SynthesizeSpeechRequest message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns SynthesizeSpeechRequest
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.texttospeech.v1.SynthesizeSpeechRequest;
/**
* Decodes a SynthesizeSpeechRequest message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns SynthesizeSpeechRequest
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.texttospeech.v1.SynthesizeSpeechRequest;
/**
* Verifies a SynthesizeSpeechRequest message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a SynthesizeSpeechRequest message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns SynthesizeSpeechRequest
*/
public static fromObject(object: { [k: string]: any }): google.cloud.texttospeech.v1.SynthesizeSpeechRequest;
/**
* Creates a plain object from a SynthesizeSpeechRequest message. Also converts values to other types if specified.
* @param message SynthesizeSpeechRequest
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.cloud.texttospeech.v1.SynthesizeSpeechRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this SynthesizeSpeechRequest to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for SynthesizeSpeechRequest
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a CustomPronunciationParams. */
interface ICustomPronunciationParams {
/** CustomPronunciationParams phrase */
phrase?: (string|null);
/** CustomPronunciationParams phoneticEncoding */
phoneticEncoding?: (google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding|keyof typeof google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding|null);
/** CustomPronunciationParams pronunciation */
pronunciation?: (string|null);
}
/** Represents a CustomPronunciationParams. */
class CustomPronunciationParams implements ICustomPronunciationParams {
/**
* Constructs a new CustomPronunciationParams.
* @param [properties] Properties to set
*/
constructor(properties?: google.cloud.texttospeech.v1.ICustomPronunciationParams);
/** CustomPronunciationParams phrase. */
public phrase?: (string|null);
/** CustomPronunciationParams phoneticEncoding. */
public phoneticEncoding?: (google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding|keyof typeof google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding|null);
/** CustomPronunciationParams pronunciation. */
public pronunciation?: (string|null);
/** CustomPronunciationParams _phrase. */
public _phrase?: "phrase";
/** CustomPronunciationParams _phoneticEncoding. */
public _phoneticEncoding?: "phoneticEncoding";
/** CustomPronunciationParams _pronunciation. */
public _pronunciation?: "pronunciation";
/**
* Creates a new CustomPronunciationParams instance using the specified properties.
* @param [properties] Properties to set
* @returns CustomPronunciationParams instance
*/
public static create(properties?: google.cloud.texttospeech.v1.ICustomPronunciationParams): google.cloud.texttospeech.v1.CustomPronunciationParams;
/**
* Encodes the specified CustomPronunciationParams message. Does not implicitly {@link google.cloud.texttospeech.v1.CustomPronunciationParams.verify|verify} messages.
* @param message CustomPronunciationParams message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.cloud.texttospeech.v1.ICustomPronunciationParams, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified CustomPronunciationParams message, length delimited. Does not implicitly {@link google.cloud.texttospeech.v1.CustomPronunciationParams.verify|verify} messages.
* @param message CustomPronunciationParams message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.cloud.texttospeech.v1.ICustomPronunciationParams, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a CustomPronunciationParams message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns CustomPronunciationParams
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.texttospeech.v1.CustomPronunciationParams;
/**
* Decodes a CustomPronunciationParams message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns CustomPronunciationParams
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.texttospeech.v1.CustomPronunciationParams;
/**
* Verifies a CustomPronunciationParams message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a CustomPronunciationParams message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns CustomPronunciationParams
*/
public static fromObject(object: { [k: string]: any }): google.cloud.texttospeech.v1.CustomPronunciationParams;
/**
* Creates a plain object from a CustomPronunciationParams message. Also converts values to other types if specified.
* @param message CustomPronunciationParams
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.cloud.texttospeech.v1.CustomPronunciationParams, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this CustomPronunciationParams to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for CustomPronunciationParams
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace CustomPronunciationParams {
/** PhoneticEncoding enum. */
enum PhoneticEncoding {
PHONETIC_ENCODING_UNSPECIFIED = 0,
PHONETIC_ENCODING_IPA = 1,
PHONETIC_ENCODING_X_SAMPA = 2
}
}
/** Properties of a CustomPronunciations. */
interface ICustomPronunciations {
/** CustomPronunciations pronunciations */
pronunciations?: (google.cloud.texttospeech.v1.ICustomPronunciationParams[]|null);
}
/** Represents a CustomPronunciations. */
class CustomPronunciations implements ICustomPronunciations {
/**
* Constructs a new CustomPronunciations.
* @param [properties] Properties to set
*/
constructor(properties?: google.cloud.texttospeech.v1.ICustomPronunciations);
/** CustomPronunciations pronunciations. */
public pronunciations: google.cloud.texttospeech.v1.ICustomPronunciationParams[];
/**
* Creates a new CustomPronunciations instance using the specified properties.
* @param [properties] Properties to set
* @returns CustomPronunciations instance
*/
public static create(properties?: google.cloud.texttospeech.v1.ICustomPronunciations): google.cloud.texttospeech.v1.CustomPronunciations;
/**
* Encodes the specified CustomPronunciations message. Does not implicitly {@link google.cloud.texttospeech.v1.CustomPronunciations.verify|verify} messages.
* @param message CustomPronunciations message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.cloud.texttospeech.v1.ICustomPronunciations, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified CustomPronunciations message, length delimited. Does not implicitly {@link google.cloud.texttospeech.v1.CustomPronunciations.verify|verify} messages.
* @param message CustomPronunciations message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.cloud.texttospeech.v1.ICustomPronunciations, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a CustomPronunciations message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns CustomPronunciations
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.texttospeech.v1.CustomPronunciations;
/**
* Decodes a CustomPronunciations message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns CustomPronunciations
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.texttospeech.v1.CustomPronunciations;
/**
* Verifies a CustomPronunciations message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a CustomPronunciations message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns CustomPronunciations
*/
public static fromObject(object: { [k: string]: any }): google.cloud.texttospeech.v1.CustomPronunciations;
/**
* Creates a plain object from a CustomPronunciations message. Also converts values to other types if specified.
* @param message CustomPronunciations
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.cloud.texttospeech.v1.CustomPronunciations, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this CustomPronunciations to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for CustomPronunciations
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a MultiSpeakerMarkup. */
interface IMultiSpeakerMarkup {
/** MultiSpeakerMarkup turns */
turns?: (google.cloud.texttospeech.v1.MultiSpeakerMarkup.ITurn[]|null);
}
/** Represents a MultiSpeakerMarkup. */
class MultiSpeakerMarkup implements IMultiSpeakerMarkup {
/**
* Constructs a new MultiSpeakerMarkup.
* @param [properties] Properties to set
*/
constructor(properties?: google.cloud.texttospeech.v1.IMultiSpeakerMarkup);
/** MultiSpeakerMarkup turns. */
public turns: google.cloud.texttospeech.v1.MultiSpeakerMarkup.ITurn[];
/**
* Creates a new MultiSpeakerMarkup instance using the specified properties.
* @param [properties] Properties to set
* @returns MultiSpeakerMarkup instance
*/
public static create(properties?: google.cloud.texttospeech.v1.IMultiSpeakerMarkup): google.cloud.texttospeech.v1.MultiSpeakerMarkup;
/**
* Encodes the specified MultiSpeakerMarkup message. Does not implicitly {@link google.cloud.texttospeech.v1.MultiSpeaker