Skip to content

Commit 603846a

Browse files
committed
chore(speech-to-text-v1): manual changes
1 parent e159c99 commit 603846a

3 files changed

Lines changed: 139 additions & 4 deletions

File tree

MIGRATION-V9.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,6 @@ This document should serve as a guide to breaking changes for users moving from
242242

243243
`RecognizeWithWebsocketsOptions`
244244

245-
#### Models Removed
246-
247-
`SpeechTimestamp`, `SpeechWordConfidence`
248-
249245
#### Model Properties Changed
250246

251247
`CheckJobsOptions`, `ListModelOptions`
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2019, 2020.
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.speech_to_text.v1.model;
14+
15+
import com.google.gson.annotations.JsonAdapter;
16+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
17+
import com.ibm.watson.speech_to_text.v1.util.SpeechTimestampTypeAdapter;
18+
19+
/** Transcription timestamp. */
20+
@JsonAdapter(SpeechTimestampTypeAdapter.class)
21+
public class SpeechTimestamp extends GenericModel {
22+
private Double endTime;
23+
private Double startTime;
24+
private String word;
25+
26+
/**
27+
* Gets the end time.
28+
*
29+
* @return The end time
30+
*/
31+
public Double getEndTime() {
32+
return endTime;
33+
}
34+
35+
/**
36+
* Gets the start time.
37+
*
38+
* @return The start time
39+
*/
40+
public Double getStartTime() {
41+
return startTime;
42+
}
43+
44+
/**
45+
* Gets the word.
46+
*
47+
* @return The word
48+
*/
49+
public String getWord() {
50+
return word;
51+
}
52+
53+
/**
54+
* Sets the end time.
55+
*
56+
* @param endTime The end time
57+
*/
58+
public void setEndTime(final Double endTime) {
59+
this.endTime = endTime;
60+
}
61+
62+
/**
63+
* Sets the start time.
64+
*
65+
* @param startTime The start time
66+
*/
67+
public void setStartTime(final Double startTime) {
68+
this.startTime = startTime;
69+
}
70+
71+
/**
72+
* Sets the word.
73+
*
74+
* @param word The word
75+
*/
76+
public void setWord(final String word) {
77+
this.word = word;
78+
}
79+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2019, 2020.
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.speech_to_text.v1.model;
14+
15+
import com.google.gson.annotations.JsonAdapter;
16+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
17+
import com.ibm.watson.speech_to_text.v1.util.SpeechWordConfidenceTypeAdapter;
18+
19+
/** Transcription word confidence. */
20+
@JsonAdapter(SpeechWordConfidenceTypeAdapter.class)
21+
public class SpeechWordConfidence extends GenericModel {
22+
private Double confidence;
23+
private String word;
24+
25+
/**
26+
* Gets the confidence.
27+
*
28+
* @return The confidence
29+
*/
30+
public Double getConfidence() {
31+
return confidence;
32+
}
33+
34+
/**
35+
* Gets the word.
36+
*
37+
* @return The word
38+
*/
39+
public String getWord() {
40+
return word;
41+
}
42+
43+
/**
44+
* Sets the confidence.
45+
*
46+
* @param confidence The confidence
47+
*/
48+
public void setConfidence(final Double confidence) {
49+
this.confidence = confidence;
50+
}
51+
52+
/**
53+
* Sets the word.
54+
*
55+
* @param word The word
56+
*/
57+
public void setWord(final String word) {
58+
this.word = word;
59+
}
60+
}

0 commit comments

Comments
 (0)