Skip to content

Commit aa1e10a

Browse files
Anwesha NaskarAnwesha Naskar
authored andcommitted
fix(speech to text): makes audio required in recognize, removes transfer-encoding in recognize
audio param is required
1 parent 7c97754 commit aa1e10a

File tree

6 files changed

+80
-65
lines changed

6 files changed

+80
-65
lines changed

discovery/v1-generated.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ class DiscoveryV1 extends BaseService {
532532
* @param {string} [params.configuration] - The configuration to use to process the document. If this part is provided, then the provided configuration is used to process the document. If the `configuration_id` is also provided (both are present at the same time), then request is rejected. The maximum supported configuration size is 1 MB. Configuration parts larger than 1 MB are rejected. See the `GET /configurations/{configuration_id}` operation for an example configuration.
533533
* @param {string} [params.step] - Specify to only run the input document through the given step instead of running the input document through the entire ingestion workflow. Valid values are `convert`, `enrich`, and `normalize`.
534534
* @param {string} [params.configuration_id] - The ID of the configuration to use to process the document. If the `configuration` form part is also provided (both are present at the same time), then request will be rejected.
535-
* @param {ReadableStream|FileObject|Buffer} [params.file] - The content of the document to ingest. The maximum supported file size is 50 megabytes. Files larger than 50 megabytes is rejected.
535+
* @param {NodeJS.ReadableStream|FileObject|Buffer} [params.file] - The content of the document to ingest. The maximum supported file size is 50 megabytes. Files larger than 50 megabytes is rejected.
536536
* @param {string} [params.metadata] - If you're using the Data Crawler to upload your documents, you can test a document against the type of metadata that the Data Crawler might send. The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected. Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ```.
537537
* @param {string} [params.file_content_type] - The content type of file.
538538
* @param {Function} [callback] - The callback that handles the response.
@@ -967,7 +967,7 @@ class DiscoveryV1 extends BaseService {
967967
* @param {Object} params - The parameters to send to the service.
968968
* @param {string} params.environment_id - The ID of the environment.
969969
* @param {string} params.collection_id - The ID of the collection.
970-
* @param {ReadableStream|FileObject|Buffer} [params.file] - The content of the document to ingest. The maximum supported file size is 50 megabytes. Files larger than 50 megabytes is rejected.
970+
* @param {NodeJS.ReadableStream|FileObject|Buffer} [params.file] - The content of the document to ingest. The maximum supported file size is 50 megabytes. Files larger than 50 megabytes is rejected.
971971
* @param {string} [params.metadata] - If you're using the Data Crawler to upload your documents, you can test a document against the type of metadata that the Data Crawler might send. The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected. Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ```.
972972
* @param {string} [params.file_content_type] - The content type of file.
973973
* @param {Function} [callback] - The callback that handles the response.
@@ -1100,7 +1100,7 @@ class DiscoveryV1 extends BaseService {
11001100
* @param {string} params.environment_id - The ID of the environment.
11011101
* @param {string} params.collection_id - The ID of the collection.
11021102
* @param {string} params.document_id - The ID of the document.
1103-
* @param {ReadableStream|FileObject|Buffer} [params.file] - The content of the document to ingest. The maximum supported file size is 50 megabytes. Files larger than 50 megabytes is rejected.
1103+
* @param {NodeJS.ReadableStream|FileObject|Buffer} [params.file] - The content of the document to ingest. The maximum supported file size is 50 megabytes. Files larger than 50 megabytes is rejected.
11041104
* @param {string} [params.metadata] - If you're using the Data Crawler to upload your documents, you can test a document against the type of metadata that the Data Crawler might send. The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected. Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ```.
11051105
* @param {string} [params.file_content_type] - The content type of file.
11061106
* @param {Function} [callback] - The callback that handles the response.
@@ -2131,7 +2131,7 @@ namespace DiscoveryV1 {
21312131
/** The ID of the configuration to use to process the document. If the `configuration` form part is also provided (both are present at the same time), then request will be rejected. */
21322132
configuration_id?: string;
21332133
/** The content of the document to ingest. The maximum supported file size is 50 megabytes. Files larger than 50 megabytes is rejected. */
2134-
file?: ReadableStream|FileObject|Buffer;
2134+
file?: NodeJS.ReadableStream|FileObject|Buffer;
21352135
/** If you're using the Data Crawler to upload your documents, you can test a document against the type of metadata that the Data Crawler might send. The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected. Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ```. */
21362136
metadata?: string;
21372137
/** The content type of file. */
@@ -2269,7 +2269,7 @@ namespace DiscoveryV1 {
22692269
/** The ID of the collection. */
22702270
collection_id: string;
22712271
/** The content of the document to ingest. The maximum supported file size is 50 megabytes. Files larger than 50 megabytes is rejected. */
2272-
file?: ReadableStream|FileObject|Buffer;
2272+
file?: NodeJS.ReadableStream|FileObject|Buffer;
22732273
/** If you're using the Data Crawler to upload your documents, you can test a document against the type of metadata that the Data Crawler might send. The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected. Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ```. */
22742274
metadata?: string;
22752275
/** The content type of file. */
@@ -2318,7 +2318,7 @@ namespace DiscoveryV1 {
23182318
/** The ID of the document. */
23192319
document_id: string;
23202320
/** The content of the document to ingest. The maximum supported file size is 50 megabytes. Files larger than 50 megabytes is rejected. */
2321-
file?: ReadableStream|FileObject|Buffer;
2321+
file?: NodeJS.ReadableStream|FileObject|Buffer;
23222322
/** If you're using the Data Crawler to upload your documents, you can test a document against the type of metadata that the Data Crawler might send. The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected. Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ```. */
23232323
metadata?: string;
23242324
/** The content type of file. */

language-translator/v2-generated.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import { createRequest } from '../lib/requestwrapper';
2525
* Language Translator translates text from one language to another. The service offers multiple domain-specific models that you can customize based on your unique terminology and language. Use Language Translator to take news from across the globe and present it in your language, communicate with your customers in their own language, and more.
2626
*/
2727

28+
29+
2830
class LanguageTranslatorV2 extends BaseService {
2931

3032
static URL: string = 'https://gateway.watsonplatform.net/language-translator/api';
@@ -136,6 +138,7 @@ class LanguageTranslatorV2 extends BaseService {
136138
return createRequest(parameters, _callback);
137139
};
138140

141+
139142
/**
140143
* List identifiable languages.
141144
*
@@ -174,9 +177,9 @@ class LanguageTranslatorV2 extends BaseService {
174177
* @param {Object} params - The parameters to send to the service.
175178
* @param {string} params.base_model_id - The model ID of the model to use as the base for customization. To see available models, use the `List models` method.
176179
* @param {string} [params.name] - An optional model name that you can use to identify the model. Valid characters are letters, numbers, dashes, underscores, spaces and apostrophes. The maximum length is 32 characters.
177-
* @param {ReadableStream|FileObject|Buffer} [params.forced_glossary] - A TMX file with your customizations. The customizations in the file completely overwrite the domain translaton data, including high frequency or high confidence phrase translations. You can upload only one glossary with a file size less than 10 MB per call.
178-
* @param {ReadableStream|FileObject|Buffer} [params.parallel_corpus] - A TMX file that contains entries that are treated as a parallel corpus instead of a glossary.
179-
* @param {ReadableStream|FileObject|Buffer} [params.monolingual_corpus] - A UTF-8 encoded plain text file that is used to customize the target language model.
180+
* @param {NodeJS.ReadableStream|FileObject|Buffer} [params.forced_glossary] - A TMX file with your customizations. The customizations in the file completely overwrite the domain translaton data, including high frequency or high confidence phrase translations. You can upload only one glossary with a file size less than 10 MB per call.
181+
* @param {NodeJS.ReadableStream|FileObject|Buffer} [params.parallel_corpus] - A TMX file that contains entries that are treated as a parallel corpus instead of a glossary.
182+
* @param {NodeJS.ReadableStream|FileObject|Buffer} [params.monolingual_corpus] - A UTF-8 encoded plain text file that is used to customize the target language model.
180183
* @param {Function} [callback] - The callback that handles the response.
181184
* @returns {NodeJS.ReadableStream|void}
182185
*/
@@ -378,6 +381,12 @@ namespace LanguageTranslatorV2 {
378381
text: string;
379382
}
380383

384+
/** Parameters for the `identifyAsPlain` operation. */
385+
export interface IdentifyAsPlainParams {
386+
/** Input text in UTF-8 format. */
387+
text: string;
388+
}
389+
381390
/** Parameters for the `listIdentifiableLanguages` operation. */
382391
export interface ListIdentifiableLanguagesParams {
383392
}
@@ -389,11 +398,11 @@ namespace LanguageTranslatorV2 {
389398
/** An optional model name that you can use to identify the model. Valid characters are letters, numbers, dashes, underscores, spaces and apostrophes. The maximum length is 32 characters. */
390399
name?: string;
391400
/** A TMX file with your customizations. The customizations in the file completely overwrite the domain translaton data, including high frequency or high confidence phrase translations. You can upload only one glossary with a file size less than 10 MB per call. */
392-
forced_glossary?: ReadableStream|FileObject|Buffer;
401+
forced_glossary?: NodeJS.ReadableStream|FileObject|Buffer;
393402
/** A TMX file that contains entries that are treated as a parallel corpus instead of a glossary. */
394-
parallel_corpus?: ReadableStream|FileObject|Buffer;
403+
parallel_corpus?: NodeJS.ReadableStream|FileObject|Buffer;
395404
/** A UTF-8 encoded plain text file that is used to customize the target language model. */
396-
monolingual_corpus?: ReadableStream|FileObject|Buffer;
405+
monolingual_corpus?: NodeJS.ReadableStream|FileObject|Buffer;
397406
}
398407

399408
/** Parameters for the `deleteModel` operation. */

natural-language-classifier/v1-generated.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ class NaturalLanguageClassifierV1 extends BaseService {
107107
* Sends data to create and train a classifier and returns information about the new classifier.
108108
*
109109
* @param {Object} params - The parameters to send to the service.
110-
* @param {ReadableStream|FileObject|Buffer} params.metadata - Metadata in JSON format. The metadata identifies the language of the data, and an optional name to identify the classifier.
111-
* @param {ReadableStream|FileObject|Buffer} params.training_data - Training data in CSV format. Each text value must have at least one class. The data can include up to 15,000 records. For details, see [Using your own data](https://console.bluemix.net/docs/services/natural-language-classifier/using-your-data.html).
110+
* @param {NodeJS.ReadableStream|FileObject|Buffer} params.metadata - Metadata in JSON format. The metadata identifies the language of the data, and an optional name to identify the classifier.
111+
* @param {NodeJS.ReadableStream|FileObject|Buffer} params.training_data - Training data in CSV format. Each text value must have at least one class. The data can include up to 15,000 records. For details, see [Using your own data](https://console.bluemix.net/docs/services/natural-language-classifier/using-your-data.html).
112112
* @param {Function} [callback] - The callback that handles the response.
113113
* @returns {NodeJS.ReadableStream|void}
114114
*/
@@ -286,9 +286,9 @@ namespace NaturalLanguageClassifierV1 {
286286
/** Parameters for the `createClassifier` operation. */
287287
export interface CreateClassifierParams {
288288
/** Metadata in JSON format. The metadata identifies the language of the data, and an optional name to identify the classifier. */
289-
metadata: ReadableStream|FileObject|Buffer;
289+
metadata: NodeJS.ReadableStream|FileObject|Buffer;
290290
/** Training data in CSV format. Each text value must have at least one class. The data can include up to 15,000 records. For details, see [Using your own data](https://console.bluemix.net/docs/services/natural-language-classifier/using-your-data.html). */
291-
training_data: ReadableStream|FileObject|Buffer;
291+
training_data: NodeJS.ReadableStream|FileObject|Buffer;
292292
}
293293

294294
/** Parameters for the `deleteClassifier` operation. */

0 commit comments

Comments
 (0)