@maxim_mazurok/gapi.client.texttospeech-v1beta1
Advanced tools
Comparing version 0.0.20221128 to 0.0.20221201
111
index.d.ts
@@ -12,3 +12,3 @@ /* Type definitions for non-npm package Cloud Text-to-Speech API v1beta1 0.0 */ | ||
// Generated from: https://texttospeech.googleapis.com/$discovery/rest?version=v1beta1 | ||
// Revision: 20221128 | ||
// Revision: 20221201 | ||
@@ -65,2 +65,35 @@ /// <reference types="gapi.client" /> | ||
} | ||
interface Operation { | ||
/** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */ | ||
done?: boolean; | ||
/** The error result of the operation in case of failure or cancellation. */ | ||
error?: Status; | ||
/** | ||
* Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such | ||
* metadata. Any method that returns a long-running operation should document the metadata type, if any. | ||
*/ | ||
metadata?: { [P in string]: any }; | ||
/** | ||
* The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending | ||
* with `operations/{unique_id}`. | ||
*/ | ||
name?: string; | ||
/** | ||
* The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the | ||
* original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the | ||
* original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. | ||
*/ | ||
response?: { [P in string]: any }; | ||
} | ||
interface Status { | ||
/** The status code, which should be an enum value of google.rpc.Code. */ | ||
code?: number; | ||
/** A list of messages that carry the error details. There is a common set of message types for APIs to use. */ | ||
details?: Array<{ [P in string]: any }>; | ||
/** | ||
* A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the | ||
* client. | ||
*/ | ||
message?: string; | ||
} | ||
interface SynthesisInput { | ||
@@ -75,2 +108,12 @@ /** | ||
} | ||
interface SynthesizeLongAudioRequest { | ||
/** Required. The configuration of the synthesized audio. */ | ||
audioConfig?: AudioConfig; | ||
/** Required. The Synthesizer requires either plain text or SSML as input. */ | ||
input?: SynthesisInput; | ||
/** Specifies a Cloud Storage URI for the synthesis results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist. */ | ||
outputGcsUri?: string; | ||
/** The desired voice of the synthesized audio. */ | ||
voice?: VoiceSelectionParams; | ||
} | ||
interface SynthesizeSpeechRequest { | ||
@@ -132,2 +175,66 @@ /** Required. The configuration of the synthesized audio. */ | ||
} | ||
interface VoicesResource { | ||
/** Synthesizes long form text asynchronously. */ | ||
synthesizeLongAudio(request: { | ||
/** V1 error format. */ | ||
"$.xgafv"?: string; | ||
/** OAuth access token. */ | ||
access_token?: string; | ||
/** Data format for response. */ | ||
alt?: string; | ||
/** JSONP */ | ||
callback?: string; | ||
/** Selector specifying which fields to include in a partial response. */ | ||
fields?: string; | ||
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ | ||
key?: string; | ||
/** OAuth 2.0 token for the current user. */ | ||
oauth_token?: string; | ||
/** The resource states of the request in the form of projects/*/locations/*/voices/*. */ | ||
parent: string; | ||
/** Returns response with indentations and line breaks. */ | ||
prettyPrint?: boolean; | ||
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ | ||
quotaUser?: string; | ||
/** Upload protocol for media (e.g. "raw", "multipart"). */ | ||
upload_protocol?: string; | ||
/** Legacy upload protocol for media (e.g. "media", "multipart"). */ | ||
uploadType?: string; | ||
/** Request body */ | ||
resource: SynthesizeLongAudioRequest; | ||
}): Request<Operation>; | ||
synthesizeLongAudio(request: { | ||
/** V1 error format. */ | ||
"$.xgafv"?: string; | ||
/** OAuth access token. */ | ||
access_token?: string; | ||
/** Data format for response. */ | ||
alt?: string; | ||
/** JSONP */ | ||
callback?: string; | ||
/** Selector specifying which fields to include in a partial response. */ | ||
fields?: string; | ||
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ | ||
key?: string; | ||
/** OAuth 2.0 token for the current user. */ | ||
oauth_token?: string; | ||
/** The resource states of the request in the form of projects/*/locations/*/voices/*. */ | ||
parent: string; | ||
/** Returns response with indentations and line breaks. */ | ||
prettyPrint?: boolean; | ||
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ | ||
quotaUser?: string; | ||
/** Upload protocol for media (e.g. "raw", "multipart"). */ | ||
upload_protocol?: string; | ||
/** Legacy upload protocol for media (e.g. "media", "multipart"). */ | ||
uploadType?: string; | ||
}, | ||
body: SynthesizeLongAudioRequest): Request<Operation>; | ||
} | ||
interface LocationsResource { | ||
voices: VoicesResource; | ||
} | ||
interface ProjectsResource { | ||
locations: LocationsResource; | ||
} | ||
interface TextResource { | ||
@@ -221,2 +328,4 @@ /** Synthesizes speech synchronously: receive results after all text input has been processed. */ | ||
const projects: ProjectsResource; | ||
const text: TextResource; | ||
@@ -223,0 +332,0 @@ |
{ | ||
"name": "@maxim_mazurok/gapi.client.texttospeech-v1beta1", | ||
"version": "0.0.20221128", | ||
"version": "0.0.20221201", | ||
"description": "TypeScript typings for Cloud Text-to-Speech API v1beta1", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
31
tests.ts
@@ -6,3 +6,3 @@ /* This is stub file for gapi.client.texttospeech-v1beta1 definition tests */ | ||
// Revision: 20221128 | ||
// Revision: 20221201 | ||
@@ -33,2 +33,31 @@ gapi.load('client', async () => { | ||
async function run() { | ||
/** Synthesizes long form text asynchronously. */ | ||
await gapi.client.texttospeech.projects.locations.voices.synthesizeLongAudio({ | ||
parent: "Test string", | ||
}, { | ||
audioConfig: { | ||
audioEncoding: "Test string", | ||
effectsProfileId: [ | ||
"Test string" | ||
], | ||
pitch: 42, | ||
sampleRateHertz: 42, | ||
speakingRate: 42, | ||
volumeGainDb: 42, | ||
}, | ||
input: { | ||
ssml: "Test string", | ||
text: "Test string", | ||
}, | ||
outputGcsUri: "Test string", | ||
voice: { | ||
customVoice: { | ||
model: "Test string", | ||
reportedUsage: "Test string", | ||
}, | ||
languageCode: "Test string", | ||
name: "Test string", | ||
ssmlGender: "Test string", | ||
}, | ||
}); | ||
/** Synthesizes speech synchronously: receive results after all text input has been processed. */ | ||
@@ -35,0 +64,0 @@ await gapi.client.texttospeech.text.synthesize({ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26656
438