Skip to content

Commit 37db09e

Browse files
authored
Merge pull request #95 from AssemblyAI/fern-bot/04-01-2024-0352PM
🌿 Fern Regeneration -- April 1, 2024
2 parents 0910c58 + aad6028 commit 37db09e

9 files changed

+119
-46
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ publishing {
4747
maven(MavenPublication) {
4848
groupId = 'com.assemblyai'
4949
artifactId = 'assemblyai-java'
50-
version = '1.0.9'
50+
version = '1.0.10'
5151
from components.java
5252
}
5353
}

src/main/java/com/assemblyai/api/resources/realtime/RealtimeClient.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ public RealtimeClient(ClientOptions clientOptions) {
2626
}
2727

2828
/**
29-
* Create a temporary authentication token for real-time transcription
29+
* Create a temporary authentication token for Streaming Speech-to-Text
3030
*/
3131
public RealtimeTemporaryTokenResponse createTemporaryToken(CreateRealtimeTemporaryTokenParams request) {
3232
return createTemporaryToken(request, null);
3333
}
3434

3535
/**
36-
* Create a temporary authentication token for real-time transcription
36+
* Create a temporary authentication token for Streaming Speech-to-Text
3737
*/
3838
public RealtimeTemporaryTokenResponse createTemporaryToken(
3939
CreateRealtimeTemporaryTokenParams request, RequestOptions requestOptions) {

src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeTemporaryTokenResponse.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private RealtimeTemporaryTokenResponse(String token, Map<String, Object> additio
2828
}
2929

3030
/**
31-
* @return The temporary authentication token for real-time transcription
31+
* @return The temporary authentication token for Streaming Speech-to-Text
3232
*/
3333
@JsonProperty("token")
3434
public String getToken() {
@@ -90,7 +90,7 @@ public Builder from(RealtimeTemporaryTokenResponse other) {
9090
}
9191

9292
/**
93-
* <p>The temporary authentication token for real-time transcription</p>
93+
* <p>The temporary authentication token for Streaming Speech-to-Text</p>
9494
* @return Reference to {@code this} so that method calls can be chained together.
9595
*/
9696
@java.lang.Override

src/main/java/com/assemblyai/api/resources/realtime/types/TerminateSession.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private TerminateSession(boolean terminateSession, Map<String, Object> additiona
2828
}
2929

3030
/**
31-
* @return Set to true to end your real-time session forever
31+
* @return Set to true to end your streaming session forever
3232
*/
3333
@JsonProperty("terminate_session")
3434
public boolean getTerminateSession() {
@@ -90,7 +90,7 @@ public Builder from(TerminateSession other) {
9090
}
9191

9292
/**
93-
* <p>Set to true to end your real-time session forever</p>
93+
* <p>Set to true to end your streaming session forever</p>
9494
* @return Reference to {@code this} so that method calls can be chained together.
9595
*/
9696
@java.lang.Override

src/main/java/com/assemblyai/api/resources/transcripts/TranscriptsClient.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,24 @@ public TranscriptsClient(ClientOptions clientOptions) {
3535
}
3636

3737
/**
38-
* Retrieve a list of transcripts you created
38+
* Retrieve a list of transcripts you created.
39+
* Transcripts are sorted from newest to oldest. The previous URL always points to a page with older transcripts.
3940
*/
4041
public TranscriptList list() {
4142
return list(ListTranscriptParams.builder().build());
4243
}
4344

4445
/**
45-
* Retrieve a list of transcripts you created
46+
* Retrieve a list of transcripts you created.
47+
* Transcripts are sorted from newest to oldest. The previous URL always points to a page with older transcripts.
4648
*/
4749
public TranscriptList list(ListTranscriptParams request) {
4850
return list(request, null);
4951
}
5052

5153
/**
52-
* Retrieve a list of transcripts you created
54+
* Retrieve a list of transcripts you created.
55+
* Transcripts are sorted from newest to oldest. The previous URL always points to a page with older transcripts.
5356
*/
5457
public TranscriptList list(ListTranscriptParams request, RequestOptions requestOptions) {
5558
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())

src/main/java/com/assemblyai/api/resources/transcripts/types/PageDetails.java

+39-20
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public final class PageDetails {
2626

2727
private final String currentUrl;
2828

29-
private final String prevUrl;
29+
private final Optional<String> prevUrl;
3030

3131
private final Optional<String> nextUrl;
3232

@@ -36,7 +36,7 @@ private PageDetails(
3636
int limit,
3737
int resultCount,
3838
String currentUrl,
39-
String prevUrl,
39+
Optional<String> prevUrl,
4040
Optional<String> nextUrl,
4141
Map<String, Object> additionalProperties) {
4242
this.limit = limit;
@@ -62,11 +62,17 @@ public String getCurrentUrl() {
6262
return currentUrl;
6363
}
6464

65+
/**
66+
* @return The URL to the next page of transcripts. The previous URL always points to a page with older transcripts.
67+
*/
6568
@JsonProperty("prev_url")
66-
public String getPrevUrl() {
69+
public Optional<String> getPrevUrl() {
6770
return prevUrl;
6871
}
6972

73+
/**
74+
* @return The URL to the next page of transcripts. The next URL always points to a page with newer transcripts.
75+
*/
7076
@JsonProperty("next_url")
7177
public Optional<String> getNextUrl() {
7278
return nextUrl;
@@ -116,34 +122,33 @@ public interface ResultCountStage {
116122
}
117123

118124
public interface CurrentUrlStage {
119-
PrevUrlStage currentUrl(String currentUrl);
120-
}
121-
122-
public interface PrevUrlStage {
123-
_FinalStage prevUrl(String prevUrl);
125+
_FinalStage currentUrl(String currentUrl);
124126
}
125127

126128
public interface _FinalStage {
127129
PageDetails build();
128130

131+
_FinalStage prevUrl(Optional<String> prevUrl);
132+
133+
_FinalStage prevUrl(String prevUrl);
134+
129135
_FinalStage nextUrl(Optional<String> nextUrl);
130136

131137
_FinalStage nextUrl(String nextUrl);
132138
}
133139

134140
@JsonIgnoreProperties(ignoreUnknown = true)
135-
public static final class Builder
136-
implements LimitStage, ResultCountStage, CurrentUrlStage, PrevUrlStage, _FinalStage {
141+
public static final class Builder implements LimitStage, ResultCountStage, CurrentUrlStage, _FinalStage {
137142
private int limit;
138143

139144
private int resultCount;
140145

141146
private String currentUrl;
142147

143-
private String prevUrl;
144-
145148
private Optional<String> nextUrl = Optional.empty();
146149

150+
private Optional<String> prevUrl = Optional.empty();
151+
147152
@JsonAnySetter
148153
private Map<String, Object> additionalProperties = new HashMap<>();
149154

@@ -175,18 +180,15 @@ public CurrentUrlStage resultCount(int resultCount) {
175180

176181
@java.lang.Override
177182
@JsonSetter("current_url")
178-
public PrevUrlStage currentUrl(String currentUrl) {
183+
public _FinalStage currentUrl(String currentUrl) {
179184
this.currentUrl = currentUrl;
180185
return this;
181186
}
182187

183-
@java.lang.Override
184-
@JsonSetter("prev_url")
185-
public _FinalStage prevUrl(String prevUrl) {
186-
this.prevUrl = prevUrl;
187-
return this;
188-
}
189-
188+
/**
189+
* <p>The URL to the next page of transcripts. The next URL always points to a page with newer transcripts.</p>
190+
* @return Reference to {@code this} so that method calls can be chained together.
191+
*/
190192
@java.lang.Override
191193
public _FinalStage nextUrl(String nextUrl) {
192194
this.nextUrl = Optional.of(nextUrl);
@@ -200,6 +202,23 @@ public _FinalStage nextUrl(Optional<String> nextUrl) {
200202
return this;
201203
}
202204

205+
/**
206+
* <p>The URL to the next page of transcripts. The previous URL always points to a page with older transcripts.</p>
207+
* @return Reference to {@code this} so that method calls can be chained together.
208+
*/
209+
@java.lang.Override
210+
public _FinalStage prevUrl(String prevUrl) {
211+
this.prevUrl = Optional.of(prevUrl);
212+
return this;
213+
}
214+
215+
@java.lang.Override
216+
@JsonSetter(value = "prev_url", nulls = Nulls.SKIP)
217+
public _FinalStage prevUrl(Optional<String> prevUrl) {
218+
this.prevUrl = prevUrl;
219+
return this;
220+
}
221+
203222
@java.lang.Override
204223
public PageDetails build() {
205224
return new PageDetails(limit, resultCount, currentUrl, prevUrl, nextUrl, additionalProperties);

src/main/java/com/assemblyai/api/resources/transcripts/types/SpeechModel.java

+16-6
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
import com.fasterxml.jackson.annotation.JsonValue;
88

99
public final class SpeechModel {
10-
public static final SpeechModel CONFORMER2 = new SpeechModel(Value.CONFORMER2, "conformer-2");
11-
1210
public static final SpeechModel NANO = new SpeechModel(Value.NANO, "nano");
1311

12+
public static final SpeechModel BEST = new SpeechModel(Value.BEST, "best");
13+
14+
public static final SpeechModel CONFORMER2 = new SpeechModel(Value.CONFORMER2, "conformer-2");
15+
1416
private final Value value;
1517

1618
private final String string;
@@ -42,10 +44,12 @@ public int hashCode() {
4244

4345
public <T> T visit(Visitor<T> visitor) {
4446
switch (value) {
45-
case CONFORMER2:
46-
return visitor.visitConformer2();
4747
case NANO:
4848
return visitor.visitNano();
49+
case BEST:
50+
return visitor.visitBest();
51+
case CONFORMER2:
52+
return visitor.visitConformer2();
4953
case UNKNOWN:
5054
default:
5155
return visitor.visitUnknown(string);
@@ -55,16 +59,20 @@ public <T> T visit(Visitor<T> visitor) {
5559
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
5660
public static SpeechModel valueOf(String value) {
5761
switch (value) {
58-
case "conformer-2":
59-
return CONFORMER2;
6062
case "nano":
6163
return NANO;
64+
case "best":
65+
return BEST;
66+
case "conformer-2":
67+
return CONFORMER2;
6268
default:
6369
return new SpeechModel(Value.UNKNOWN, value);
6470
}
6571
}
6672

6773
public enum Value {
74+
BEST,
75+
6876
NANO,
6977

7078
CONFORMER2,
@@ -73,6 +81,8 @@ public enum Value {
7381
}
7482

7583
public interface Visitor<T> {
84+
T visitBest();
85+
7686
T visitNano();
7787

7888
T visitConformer2();

src/main/java/com/assemblyai/api/resources/transcripts/types/SubstitutionPolicy.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import com.fasterxml.jackson.annotation.JsonValue;
88

99
public final class SubstitutionPolicy {
10-
public static final SubstitutionPolicy ENTITY_TYPE = new SubstitutionPolicy(Value.ENTITY_TYPE, "entity_type");
10+
public static final SubstitutionPolicy ENTITY_NAME = new SubstitutionPolicy(Value.ENTITY_NAME, "entity_name");
1111

1212
public static final SubstitutionPolicy HASH = new SubstitutionPolicy(Value.HASH, "hash");
1313

@@ -43,8 +43,8 @@ public int hashCode() {
4343

4444
public <T> T visit(Visitor<T> visitor) {
4545
switch (value) {
46-
case ENTITY_TYPE:
47-
return visitor.visitEntityType();
46+
case ENTITY_NAME:
47+
return visitor.visitEntityName();
4848
case HASH:
4949
return visitor.visitHash();
5050
case UNKNOWN:
@@ -56,8 +56,8 @@ public <T> T visit(Visitor<T> visitor) {
5656
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
5757
public static SubstitutionPolicy valueOf(String value) {
5858
switch (value) {
59-
case "entity_type":
60-
return ENTITY_TYPE;
59+
case "entity_name":
60+
return ENTITY_NAME;
6161
case "hash":
6262
return HASH;
6363
default:
@@ -66,15 +66,15 @@ public static SubstitutionPolicy valueOf(String value) {
6666
}
6767

6868
public enum Value {
69-
ENTITY_TYPE,
69+
ENTITY_NAME,
7070

7171
HASH,
7272

7373
UNKNOWN
7474
}
7575

7676
public interface Visitor<T> {
77-
T visitEntityType();
77+
T visitEntityName();
7878

7979
T visitHash();
8080

0 commit comments

Comments
 (0)