Skip to content

Commit 202ef1f

Browse files
Merge pull request #857 from watson-developer-cloud/codegen/speech-to-text
Add generated code for Speech to Text service
2 parents e829d6f + 54701ef commit 202ef1f

File tree

96 files changed

+11847
-2833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+11847
-2833
lines changed

document-conversion/src/test/java/com/ibm/watson/developer_cloud/document_conversion/v1/DocumentConversionIT.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import org.junit.Assume;
2424
import org.junit.Before;
25+
import org.junit.Ignore;
2526
import org.junit.Test;
2627

2728
import com.google.gson.JsonObject;
@@ -81,6 +82,7 @@ public void setUp() throws Exception {
8182
* Test Convert to answers unit.
8283
*/
8384
@Test
85+
@Ignore
8486
public void testConvertToAnswers() {
8587
for (final File file : files) {
8688
final Answers answers = service.convertDocumentToAnswer(file).execute();
@@ -94,6 +96,7 @@ public void testConvertToAnswers() {
9496
* Test convert to HTML.
9597
*/
9698
@Test
99+
@Ignore
97100
public void testConvertToHtml() {
98101
for (final File file : files) {
99102
final String html = service.convertDocumentToHTML(file).execute();
@@ -106,6 +109,7 @@ public void testConvertToHtml() {
106109
* Test convert to Text.
107110
*/
108111
@Test
112+
@Ignore
109113
public void testConvertToText() {
110114
for (final File file : files) {
111115
final String text = service.convertDocumentToText(file).execute();
@@ -118,6 +122,7 @@ public void testConvertToText() {
118122
* Test a dry run of the index document api with document only.
119123
*/
120124
@Test
125+
@Ignore
121126
public void testIndexDocumentDryRun() {
122127
for (final File file : files) {
123128
IndexDocumentOptions indexDocumentOptions =
@@ -132,6 +137,7 @@ public void testIndexDocumentDryRun() {
132137
* Test a dry run of the index document api with metadata only.
133138
*/
134139
@Test
140+
@Ignore
135141
public void testIndexMetadataDryRun() {
136142
IndexDocumentOptions indexDocumentOptions =
137143
new IndexDocumentOptions.Builder().metadata(metadata).dryRun(dryRun).build();
@@ -146,6 +152,7 @@ public void testIndexMetadataDryRun() {
146152
* Test a dry run of the index document api with document and metadata.
147153
*/
148154
@Test
155+
@Ignore
149156
public void testIndexDocumentAndMetadataDryRun() {
150157
for (final File file : files) {
151158
IndexDocumentOptions indexDocumentOptions =
@@ -162,6 +169,7 @@ public void testIndexDocumentAndMetadataDryRun() {
162169
* Test a dry run of the index document api with document, metadata, and convert document config.
163170
*/
164171
@Test
172+
@Ignore
165173
public void testIndexDocumentAndMetadataAndConvertDocConfig() {
166174
for (final File file : files) {
167175
IndexDocumentOptions indexDocumentOptions = new IndexDocumentOptions.Builder().document(file).metadata(metadata)
@@ -178,6 +186,7 @@ public void testIndexDocumentAndMetadataAndConvertDocConfig() {
178186
* Test a dry run of the index document api with document, metadata, convert document config, and index config.
179187
*/
180188
@Test
189+
@Ignore
181190
public void testIndexDocumentAndMetadataConvertDocConfigAndIndexConfig() {
182191
for (final File file : files) {
183192
IndexDocumentOptions indexDocumentOptions = new IndexDocumentOptions.Builder().document(file).metadata(metadata)

speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/SpeechToText.java

100755100644
Lines changed: 945 additions & 636 deletions
Large diffs are not rendered by default.
Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,291 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.developer_cloud.speech_to_text.v1.model;
14+
15+
import java.util.List;
16+
17+
import com.google.gson.annotations.SerializedName;
18+
import com.ibm.watson.developer_cloud.service.model.GenericModel;
19+
20+
/**
21+
* AcousticModel.
22+
*/
23+
public class AcousticModel extends GenericModel {
24+
25+
/**
26+
* The current status of the custom acoustic model: * `pending` indicates that the model was created but is waiting
27+
* either for training data to be added or for the service to finish analyzing added data. * `ready` indicates that
28+
* the model contains data and is ready to be trained. * `training` indicates that the model is currently being
29+
* trained. * `available` indicates that the model is trained and ready to use. * `upgrading` indicates that the model
30+
* is currently being upgraded. * `failed` indicates that training of the model failed.
31+
*/
32+
public interface Status {
33+
/** pending. */
34+
String PENDING = "pending";
35+
/** ready. */
36+
String READY = "ready";
37+
/** training. */
38+
String TRAINING = "training";
39+
/** available. */
40+
String AVAILABLE = "available";
41+
/** upgrading. */
42+
String UPGRADING = "upgrading";
43+
/** failed. */
44+
String FAILED = "failed";
45+
}
46+
47+
@SerializedName("customization_id")
48+
private String customizationId;
49+
private String created;
50+
private String language;
51+
private List<String> versions;
52+
private String owner;
53+
private String name;
54+
private String description;
55+
@SerializedName("base_model_name")
56+
private String baseModelName;
57+
private String status;
58+
private Long progress;
59+
private String warnings;
60+
61+
/**
62+
* Gets the customizationId.
63+
*
64+
* The customization ID (GUID) of the custom acoustic model. **Note:** When you create a new custom acoustic model,
65+
* the service returns only the GUID of the new model; it does not return the other fields of this object.
66+
*
67+
* @return the customizationId
68+
*/
69+
public String getCustomizationId() {
70+
return customizationId;
71+
}
72+
73+
/**
74+
* Gets the created.
75+
*
76+
* The date and time in Coordinated Universal Time (UTC) at which the custom acoustic model was created. The value is
77+
* provided in full ISO 8601 format (`YYYY-MM-DDThh:mm:ss.sTZD`).
78+
*
79+
* @return the created
80+
*/
81+
public String getCreated() {
82+
return created;
83+
}
84+
85+
/**
86+
* Gets the language.
87+
*
88+
* The language identifier of the custom acoustic model (for example, `en-US`).
89+
*
90+
* @return the language
91+
*/
92+
public String getLanguage() {
93+
return language;
94+
}
95+
96+
/**
97+
* Gets the versions.
98+
*
99+
* A list of the available versions of the custom acoustic model. Each element of the array indicates a version of the
100+
* base model with which the custom model can be used. Multiple versions exist only if the custom model has been
101+
* upgraded; otherwise, only a single version is shown.
102+
*
103+
* @return the versions
104+
*/
105+
public List<String> getVersions() {
106+
return versions;
107+
}
108+
109+
/**
110+
* Gets the owner.
111+
*
112+
* The GUID of the service credentials for the instance of the service that owns the custom acoustic model.
113+
*
114+
* @return the owner
115+
*/
116+
public String getOwner() {
117+
return owner;
118+
}
119+
120+
/**
121+
* Gets the name.
122+
*
123+
* The name of the custom acoustic model.
124+
*
125+
* @return the name
126+
*/
127+
public String getName() {
128+
return name;
129+
}
130+
131+
/**
132+
* Gets the description.
133+
*
134+
* The description of the custom acoustic model.
135+
*
136+
* @return the description
137+
*/
138+
public String getDescription() {
139+
return description;
140+
}
141+
142+
/**
143+
* Gets the baseModelName.
144+
*
145+
* The name of the language model for which the custom acoustic model was created.
146+
*
147+
* @return the baseModelName
148+
*/
149+
public String getBaseModelName() {
150+
return baseModelName;
151+
}
152+
153+
/**
154+
* Gets the status.
155+
*
156+
* The current status of the custom acoustic model: * `pending` indicates that the model was created but is waiting
157+
* either for training data to be added or for the service to finish analyzing added data. * `ready` indicates that
158+
* the model contains data and is ready to be trained. * `training` indicates that the model is currently being
159+
* trained. * `available` indicates that the model is trained and ready to use. * `upgrading` indicates that the model
160+
* is currently being upgraded. * `failed` indicates that training of the model failed.
161+
*
162+
* @return the status
163+
*/
164+
public String getStatus() {
165+
return status;
166+
}
167+
168+
/**
169+
* Gets the progress.
170+
*
171+
* A percentage that indicates the progress of the custom acoustic model's current training. A value of `100` means
172+
* that the model is fully trained. **Note:** The `progress` field does not currently reflect the progress of the
173+
* training; the field changes from `0` to `100` when training is complete.
174+
*
175+
* @return the progress
176+
*/
177+
public Long getProgress() {
178+
return progress;
179+
}
180+
181+
/**
182+
* Gets the warnings.
183+
*
184+
* If the request included unknown query parameters, the following message: `Unexpected query parameter(s)
185+
* ['parameters'] detected`, where `parameters` is a list that includes a quoted string for each unknown parameter.
186+
*
187+
* @return the warnings
188+
*/
189+
public String getWarnings() {
190+
return warnings;
191+
}
192+
193+
/**
194+
* Sets the customizationId.
195+
*
196+
* @param customizationId the new customizationId
197+
*/
198+
public void setCustomizationId(final String customizationId) {
199+
this.customizationId = customizationId;
200+
}
201+
202+
/**
203+
* Sets the created.
204+
*
205+
* @param created the new created
206+
*/
207+
public void setCreated(final String created) {
208+
this.created = created;
209+
}
210+
211+
/**
212+
* Sets the language.
213+
*
214+
* @param language the new language
215+
*/
216+
public void setLanguage(final String language) {
217+
this.language = language;
218+
}
219+
220+
/**
221+
* Sets the versions.
222+
*
223+
* @param versions the new versions
224+
*/
225+
public void setVersions(final List<String> versions) {
226+
this.versions = versions;
227+
}
228+
229+
/**
230+
* Sets the owner.
231+
*
232+
* @param owner the new owner
233+
*/
234+
public void setOwner(final String owner) {
235+
this.owner = owner;
236+
}
237+
238+
/**
239+
* Sets the name.
240+
*
241+
* @param name the new name
242+
*/
243+
public void setName(final String name) {
244+
this.name = name;
245+
}
246+
247+
/**
248+
* Sets the description.
249+
*
250+
* @param description the new description
251+
*/
252+
public void setDescription(final String description) {
253+
this.description = description;
254+
}
255+
256+
/**
257+
* Sets the baseModelName.
258+
*
259+
* @param baseModelName the new baseModelName
260+
*/
261+
public void setBaseModelName(final String baseModelName) {
262+
this.baseModelName = baseModelName;
263+
}
264+
265+
/**
266+
* Sets the status.
267+
*
268+
* @param status the new status
269+
*/
270+
public void setStatus(final String status) {
271+
this.status = status;
272+
}
273+
274+
/**
275+
* Sets the progress.
276+
*
277+
* @param progress the new progress
278+
*/
279+
public void setProgress(final long progress) {
280+
this.progress = progress;
281+
}
282+
283+
/**
284+
* Sets the warnings.
285+
*
286+
* @param warnings the new warnings
287+
*/
288+
public void setWarnings(final String warnings) {
289+
this.warnings = warnings;
290+
}
291+
}

0 commit comments

Comments
 (0)