From 548a50f06e9c3c799558634ae197625be26be108 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 14:42:05 +0000 Subject: [PATCH 1/2] SDK regeneration --- build.gradle | 8 +- gradle/wrapper/gradle-wrapper.jar | Bin 43583 -> 43504 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- .../com/assemblyai/api/core/FileStream.java | 60 ---------- .../api/core/InputStreamRequestBody.java | 79 ------------- .../api/resources/files/FilesClient.java | 25 +--- .../resources/files/types/UploadedFile.java | 7 +- .../lemur/requests/LemurTaskParams.java | 7 +- .../lemur/types/LemurActionItemsResponse.java | 19 ++- .../lemur/types/LemurBaseResponse.java | 13 +-- .../resources/lemur/types/LemurQuestion.java | 7 +- .../lemur/types/LemurQuestionAnswer.java | 13 +-- .../types/LemurQuestionAnswerResponse.java | 13 +-- .../lemur/types/LemurStringResponse.java | 19 ++- .../lemur/types/LemurSummaryResponse.java | 19 ++- .../lemur/types/LemurTaskResponse.java | 19 ++- .../types/PurgeLemurRequestDataResponse.java | 13 +-- .../realtime/types/RealtimeBaseMessage.java | 7 +- .../types/RealtimeBaseTranscript.java | 13 +-- .../realtime/types/RealtimeError.java | 7 +- .../types/RealtimeTemporaryTokenResponse.java | 7 +- .../api/resources/realtime/types/Word.java | 7 +- .../requests/ListTranscriptParams.java | 12 +- .../requests/TranscriptParams.java | 47 +++++++- .../types/AutoHighlightResult.java | 7 +- .../types/AutoHighlightsResult.java | 7 +- .../resources/transcripts/types/Chapter.java | 19 ++- .../transcripts/types/ContentSafetyLabel.java | 7 +- .../types/ContentSafetyLabelResult.java | 13 +-- .../types/ContentSafetyLabelsResult.java | 18 ++- .../resources/transcripts/types/Entity.java | 13 +-- .../types/ITranscriptOptionalParams.java | 2 + .../transcripts/types/PageDetails.java | 7 +- .../transcripts/types/ParagraphsResponse.java | 39 ++++++- .../types/RedactedAudioResponse.java | 13 +-- .../transcripts/types/SentencesResponse.java | 39 ++++++- .../types/SentimentAnalysisResult.java | 56 +++++++-- .../types/TopicDetectionModelResult.java | 7 +- .../types/TopicDetectionResult.java | 14 ++- .../types/TopicDetectionResultLabelsItem.java | 7 +- .../transcripts/types/Transcript.java | 109 +++++++++++++++--- .../types/TranscriptCustomSpelling.java | 7 +- .../transcripts/types/TranscriptList.java | 25 +++- .../transcripts/types/TranscriptListItem.java | 73 +++++++++--- .../types/TranscriptOptionalParams.java | 30 +++++ .../types/TranscriptParagraph.java | 84 +++++++------- .../types/TranscriptReadyNotification.java | 13 +-- .../transcripts/types/TranscriptSentence.java | 87 +++++++++++++- .../types/TranscriptUtterance.java | 55 +++++++-- .../transcripts/types/TranscriptWord.java | 80 +++++++++++-- .../transcripts/types/WordSearchMatch.java | 7 +- .../transcripts/types/WordSearchResponse.java | 7 +- .../java/com/assemblyai/api/types/Error.java | 7 +- 53 files changed, 793 insertions(+), 482 deletions(-) delete mode 100644 src/main/java/com/assemblyai/api/core/FileStream.java delete mode 100644 src/main/java/com/assemblyai/api/core/InputStreamRequestBody.java diff --git a/build.gradle b/build.gradle index 748905c1..46307112 100644 --- a/build.gradle +++ b/build.gradle @@ -13,9 +13,9 @@ repositories { dependencies { api 'com.squareup.okhttp3:okhttp:4.12.0' - api 'com.fasterxml.jackson.core:jackson-databind:2.17.2' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' + api 'com.fasterxml.jackson.core:jackson-databind:2.13.0' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.3' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.3' implementation 'javax.websocket:javax.websocket-api:1.1' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2' @@ -47,7 +47,7 @@ publishing { maven(MavenPublication) { groupId = 'com.assemblyai' artifactId = 'assemblyai-java' - version = '3.0.0' + version = '3.1.0' from components.java pom { scm { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index a4b76b9530d66f5e68d973ea569d8e19de379189..2c3521197d7c4586c843d1d3e9090525f1898cde 100644 GIT binary patch delta 3889 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 delta 3990 zcmV;H4{7l5(*nQL0Kr1kzC=_KMxQY0|W5(lc#i zH*M1^P4B}|{x<+fkObwl)u#`$GxKKV&3pg*-y6R6txw)0qU|Clf9Uds3x{_-**c=7 z&*)~RHPM>Rw#Hi1R({;bX|7?J@w}DMF>dQQU2}9yj%iLjJ*KD6IEB2^n#gK7M~}6R zkH+)bc--JU^pV~7W=3{E*4|ZFpDpBa7;wh4_%;?XM-5ZgZNnVJ=vm!%a2CdQb?oTa z70>8rTb~M$5Tp!Se+4_OKWOB1LF+7gv~$$fGC95ToUM(I>vrd$>9|@h=O?eARj0MH zT4zo(M>`LWoYvE>pXvqG=d96D-4?VySz~=tPVNyD$XMshoTX(1ZLB5OU!I2OI{kb) zS8$B8Qm>wLT6diNnyJZC?yp{Kn67S{TCOt-!OonOK7$K)e-13U9GlnQXPAb&SJ0#3 z+vs~+4Qovv(%i8g$I#FCpCG^C4DdyQw3phJ(f#y*pvNDQCRZ~MvW<}fUs~PL=4??j zmhPyg<*I4RbTz|NHFE-DC7lf2=}-sGkE5e!RM%3ohM7_I^IF=?O{m*uUPH(V?gqyc(Rp?-Qu(3bBIL4Fz(v?=_Sh?LbK{nqZMD>#9D_hNhaV$0ef3@9V90|0u#|PUNTO>$F=qRhg1duaE z0`v~X3G{8RVT@kOa-pU+z8{JWyP6GF*u2e8eKr7a2t1fuqQy)@d|Qn(%YLZ62TWtoX@$nL}9?atE#Yw`rd(>cr0gY;dT9~^oL;u)zgHUvxc2I*b&ZkGM-iq=&(?kyO(3}=P! zRp=rErEyMT5UE9GjPHZ#T<`cnD)jyIL!8P{H@IU#`e8cAG5jMK zVyKw7--dAC;?-qEu*rMr$5@y535qZ6p(R#+fLA_)G~!wnT~~)|s`}&fA(s6xXN`9j zP#Fd3GBa#HeS{5&8p?%DKUyN^X9cYUc6vq}D_3xJ&d@=6j(6BZKPl?!k1?!`f3z&a zR4ZF60Mx7oBxLSxGuzA*Dy5n-d2K=+)6VMZh_0KetK|{e;E{8NJJ!)=_E~1uu=A=r zrn&gh)h*SFhsQJo!f+wKMIE;-EOaMSMB@aXRU(UcnJhZW^B^mgs|M9@5WF@s6B0p& zm#CTz)yiQCgURE{%hjxHcJ6G&>G9i`7MyftL!QQd5 z@RflRs?7)99?X`kHNt>W3l7YqscBpi*R2+fsgABor>KVOu(i(`03aytf2UA!&SC9v z!E}whj#^9~=XHMinFZ;6UOJjo=mmNaWkv~nC=qH9$s-8roGeyaW-E~SzZ3Gg>j zZ8}<320rg4=$`M0nxN!w(PtHUjeeU?MvYgWKZ6kkzABK;vMN0|U;X9abJleJA(xy<}5h5P(5 z{RzAFPvMnX2m0yH0Jn2Uo-p`daE|(O`YQiC#jB8;6bVIUf?SY(k$#C0`d6qT`>Xe0+0}Oj0=F&*D;PVe=Z<=0AGI<6$gYLwa#r` zm449x*fU;_+J>Mz!wa;T-wldoBB%&OEMJgtm#oaI60TSYCy7;+$5?q!zi5K`u66Wq zvg)Fx$s`V3Em{=OEY{3lmh_7|08ykS&U9w!kp@Ctuzqe1JFOGz6%i5}Kmm9>^=gih z?kRxqLA<3@e=}G4R_?phW{4DVr?`tPfyZSN@R=^;P;?!2bh~F1I|fB7P=V=9a6XU5 z<#0f>RS0O&rhc&nTRFOW7&QhevP0#>j0eq<1@D5yAlgMl5n&O9X|Vq}%RX}iNyRFF z7sX&u#6?E~bm~N|z&YikXC=I0E*8Z$v7PtWfjy)$e_Ez25fnR1Q=q1`;U!~U>|&YS zaOS8y!^ORmr2L4ik!IYR8@Dcx8MTC=(b4P6iE5CnrbI~7j7DmM8em$!da&D!6Xu)!vKPdLG z9f#)se|6=5yOCe)N6xDhPI!m81*dNe7u985zi%IVfOfJh69+#ag4ELzGne?o`eA`42K4T)h3S+s)5IT97%O>du- z0U54L8m4}rkRQ?QBfJ%DLssy^+a7Ajw;0&`NOTY4o;0-ivm9 zBz1C%nr_hQ)X)^QM6T1?=yeLkuG9Lf50(eH}`tFye;01&(p?8i+6h};VV-2B~qdxeC#=X z(JLlzy&fHkyi9Ksbcs~&r^%lh^2COldLz^H@X!s~mr9Dr6z!j+4?zkD@Ls7F8(t(f z9`U?P$Lmn*Y{K}aR4N&1N=?xtQ1%jqf1~pJyQ4SgBrEtR`j4lQuh7cqP49Em5cO=I zB(He2`iPN5M=Y0}h(IU$37ANTGx&|b-u1BYA*#dE(L-lptoOpo&th~E)_)y-`6kSH z3vvyVrcBwW^_XYReJ=JYd9OBQrzv;f2AQdZH#$Y{Y+Oa33M70XFI((fs;mB4e`<<{ ze4dv2B0V_?Ytsi>>g%qs*}oDGd5d(RNZ*6?7qNbdp7wP4T72=F&r?Ud#kZr8Ze5tB z_oNb7{G+(o2ajL$!69FW@jjPQ2a5C)m!MKKRirC$_VYIuVQCpf9rIms0GRDf)8AH${I`q^~5rjot@#3$2#zT2f`(N^P7Z;6(@EK$q*Jgif00I6*^ZGV+XB5uw*1R-@23yTw&WKD{s1;HTL;dO)%5i#`dc6b7;5@^{KU%N|A-$zsYw4)7LA{3`Zp>1 z-?K9_IE&z)dayUM)wd8K^29m-l$lFhi$zj0l!u~4;VGR6Y!?MAfBC^?QD53hy6VdD z@eUZIui}~L%#SmajaRq1J|#> z4m=o$vZ*34=ZWK2!QMNEcp2Lbc5N1q!lEDq(bz0b;WI9;e>l=CG9^n#ro`w>_0F$Q zfZ={2QyTkfByC&gy;x!r*NyXXbk=a%~~(#K?< zTke0HuF5{Q+~?@!KDXR|g+43$+;ab`^flS%miup_0OUTm=nIc%d5nLP)i308PIjl_YMF6cpQ__6&$n6it8K- z8PIjl_YMF6cpQ_!r)L8IivW`WdK8mBs6PXdjR2DYdK8nCs73=4j{uVadK8oNjwX|E wpAeHLsTu limit; + private final Optional limit; private final Optional status; @@ -36,7 +36,7 @@ public final class ListTranscriptParams { private final Map additionalProperties; private ListTranscriptParams( - Optional limit, + Optional limit, Optional status, Optional createdOn, Optional beforeId, @@ -56,7 +56,7 @@ private ListTranscriptParams( * @return Maximum amount of transcripts to retrieve */ @JsonProperty("limit") - public Optional getLimit() { + public Optional getLimit() { return limit; } @@ -136,7 +136,7 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional limit = Optional.empty(); + private Optional limit = Optional.empty(); private Optional status = Optional.empty(); @@ -164,12 +164,12 @@ public Builder from(ListTranscriptParams other) { } @JsonSetter(value = "limit", nulls = Nulls.SKIP) - public Builder limit(Optional limit) { + public Builder limit(Optional limit) { this.limit = limit; return this; } - public Builder limit(Long limit) { + public Builder limit(Integer limit) { this.limit = Optional.ofNullable(limit); return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/requests/TranscriptParams.java b/src/main/java/com/assemblyai/api/resources/transcripts/requests/TranscriptParams.java index 4be2637f..d333ae5a 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/requests/TranscriptParams.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/requests/TranscriptParams.java @@ -27,7 +27,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TranscriptParams.Builder.class) @@ -46,6 +45,8 @@ public final class TranscriptParams implements ITranscriptOptionalParams { private final Optional disfluencies; + private final Optional multichannel; + private final Optional dualChannel; private final Optional webhookUrl; @@ -118,6 +119,7 @@ private TranscriptParams( Optional punctuate, Optional formatText, Optional disfluencies, + Optional multichannel, Optional dualChannel, Optional webhookUrl, Optional webhookAuthHeaderName, @@ -157,6 +159,7 @@ private TranscriptParams( this.punctuate = punctuate; this.formatText = formatText; this.disfluencies = disfluencies; + this.multichannel = multichannel; this.dualChannel = dualChannel; this.webhookUrl = webhookUrl; this.webhookAuthHeaderName = webhookAuthHeaderName; @@ -250,6 +253,15 @@ public Optional getDisfluencies() { return disfluencies; } + /** + * @return Enable Multichannel transcription, can be true or false. + */ + @JsonProperty("multichannel") + @java.lang.Override + public Optional getMultichannel() { + return multichannel; + } + /** * @return Enable Dual Channel transcription, can be true or false. */ @@ -547,6 +559,7 @@ private boolean equalTo(TranscriptParams other) { && punctuate.equals(other.punctuate) && formatText.equals(other.formatText) && disfluencies.equals(other.disfluencies) + && multichannel.equals(other.multichannel) && dualChannel.equals(other.dualChannel) && webhookUrl.equals(other.webhookUrl) && webhookAuthHeaderName.equals(other.webhookAuthHeaderName) @@ -590,6 +603,7 @@ public int hashCode() { this.punctuate, this.formatText, this.disfluencies, + this.multichannel, this.dualChannel, this.webhookUrl, this.webhookAuthHeaderName, @@ -633,7 +647,7 @@ public static AudioUrlStage builder() { } public interface AudioUrlStage { - _FinalStage audioUrl(@NotNull String audioUrl); + _FinalStage audioUrl(String audioUrl); Builder from(TranscriptParams other); } @@ -669,6 +683,10 @@ public interface _FinalStage { _FinalStage disfluencies(Boolean disfluencies); + _FinalStage multichannel(Optional multichannel); + + _FinalStage multichannel(Boolean multichannel); + _FinalStage dualChannel(Optional dualChannel); _FinalStage dualChannel(Boolean dualChannel); @@ -854,6 +872,8 @@ public static final class Builder implements AudioUrlStage, _FinalStage { private Optional dualChannel = Optional.empty(); + private Optional multichannel = Optional.empty(); + private Optional disfluencies = Optional.empty(); private Optional formatText = Optional.empty(); @@ -882,6 +902,7 @@ public Builder from(TranscriptParams other) { punctuate(other.getPunctuate()); formatText(other.getFormatText()); disfluencies(other.getDisfluencies()); + multichannel(other.getMultichannel()); dualChannel(other.getDualChannel()); webhookUrl(other.getWebhookUrl()); webhookAuthHeaderName(other.getWebhookAuthHeaderName()); @@ -922,8 +943,8 @@ public Builder from(TranscriptParams other) { */ @java.lang.Override @JsonSetter("audio_url") - public _FinalStage audioUrl(@NotNull String audioUrl) { - this.audioUrl = Objects.requireNonNull(audioUrl, "audioUrl must not be null"); + public _FinalStage audioUrl(String audioUrl) { + this.audioUrl = audioUrl; return this; } @@ -1436,6 +1457,23 @@ public _FinalStage dualChannel(Optional dualChannel) { return this; } + /** + *

Enable Multichannel transcription, can be true or false.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage multichannel(Boolean multichannel) { + this.multichannel = Optional.ofNullable(multichannel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "multichannel", nulls = Nulls.SKIP) + public _FinalStage multichannel(Optional multichannel) { + this.multichannel = multichannel; + return this; + } + /** *

Transcribe Filler Words, like "umm", in your media file; can be true or false

* @return Reference to {@code this} so that method calls can be chained together. @@ -1559,6 +1597,7 @@ public TranscriptParams build() { punctuate, formatText, disfluencies, + multichannel, dualChannel, webhookUrl, webhookAuthHeaderName, diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightResult.java index 070aeb8e..3d1de8e8 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightResult.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightResult.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AutoHighlightResult.Builder.class) @@ -116,7 +115,7 @@ public interface RankStage { } public interface TextStage { - _FinalStage text(@NotNull String text); + _FinalStage text(String text); } public interface _FinalStage { @@ -181,8 +180,8 @@ public TextStage rank(double rank) { */ @java.lang.Override @JsonSetter("text") - public _FinalStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); + public _FinalStage text(String text) { + this.text = text; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightsResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightsResult.java index f59f439d..18966b5e 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightsResult.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightsResult.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AutoHighlightsResult.Builder.class) @@ -83,7 +82,7 @@ public static StatusStage builder() { } public interface StatusStage { - _FinalStage status(@NotNull AudioIntelligenceModelStatus status); + _FinalStage status(AudioIntelligenceModelStatus status); Builder from(AutoHighlightsResult other); } @@ -122,8 +121,8 @@ public Builder from(AutoHighlightsResult other) { */ @java.lang.Override @JsonSetter("status") - public _FinalStage status(@NotNull AudioIntelligenceModelStatus status) { - this.status = Objects.requireNonNull(status, "status must not be null"); + public _FinalStage status(AudioIntelligenceModelStatus status) { + this.status = status; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/Chapter.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/Chapter.java index d91024c4..c5ac605a 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/Chapter.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/Chapter.java @@ -14,7 +14,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Chapter.Builder.class) @@ -120,17 +119,17 @@ public static GistStage builder() { } public interface GistStage { - HeadlineStage gist(@NotNull String gist); + HeadlineStage gist(String gist); Builder from(Chapter other); } public interface HeadlineStage { - SummaryStage headline(@NotNull String headline); + SummaryStage headline(String headline); } public interface SummaryStage { - StartStage summary(@NotNull String summary); + StartStage summary(String summary); } public interface StartStage { @@ -179,8 +178,8 @@ public Builder from(Chapter other) { */ @java.lang.Override @JsonSetter("gist") - public HeadlineStage gist(@NotNull String gist) { - this.gist = Objects.requireNonNull(gist, "gist must not be null"); + public HeadlineStage gist(String gist) { + this.gist = gist; return this; } @@ -190,8 +189,8 @@ public HeadlineStage gist(@NotNull String gist) { */ @java.lang.Override @JsonSetter("headline") - public SummaryStage headline(@NotNull String headline) { - this.headline = Objects.requireNonNull(headline, "headline must not be null"); + public SummaryStage headline(String headline) { + this.headline = headline; return this; } @@ -201,8 +200,8 @@ public SummaryStage headline(@NotNull String headline) { */ @java.lang.Override @JsonSetter("summary") - public StartStage summary(@NotNull String summary) { - this.summary = Objects.requireNonNull(summary, "summary must not be null"); + public StartStage summary(String summary) { + this.summary = summary; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabel.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabel.java index d701e425..ac64e0cb 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabel.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabel.java @@ -14,7 +14,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContentSafetyLabel.Builder.class) @@ -89,7 +88,7 @@ public static LabelStage builder() { } public interface LabelStage { - ConfidenceStage label(@NotNull String label); + ConfidenceStage label(String label); Builder from(ContentSafetyLabel other); } @@ -133,8 +132,8 @@ public Builder from(ContentSafetyLabel other) { */ @java.lang.Override @JsonSetter("label") - public ConfidenceStage label(@NotNull String label) { - this.label = Objects.requireNonNull(label, "label must not be null"); + public ConfidenceStage label(String label) { + this.label = label; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelResult.java index 1e0a445a..7e5239c1 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelResult.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelResult.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContentSafetyLabelResult.Builder.class) @@ -123,7 +122,7 @@ public static TextStage builder() { } public interface TextStage { - SentencesIdxStartStage text(@NotNull String text); + SentencesIdxStartStage text(String text); Builder from(ContentSafetyLabelResult other); } @@ -137,7 +136,7 @@ public interface SentencesIdxEndStage { } public interface TimestampStage { - _FinalStage timestamp(@NotNull Timestamp timestamp); + _FinalStage timestamp(Timestamp timestamp); } public interface _FinalStage { @@ -184,8 +183,8 @@ public Builder from(ContentSafetyLabelResult other) { */ @java.lang.Override @JsonSetter("text") - public SentencesIdxStartStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); + public SentencesIdxStartStage text(String text) { + this.text = text; return this; } @@ -217,8 +216,8 @@ public TimestampStage sentencesIdxEnd(int sentencesIdxEnd) { */ @java.lang.Override @JsonSetter("timestamp") - public _FinalStage timestamp(@NotNull Timestamp timestamp) { - this.timestamp = Objects.requireNonNull(timestamp, "timestamp must not be null"); + public _FinalStage timestamp(Timestamp timestamp) { + this.timestamp = timestamp; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelsResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelsResult.java index 0ce23a23..83d02f0f 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelsResult.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelsResult.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContentSafetyLabelsResult.Builder.class) @@ -54,6 +53,9 @@ public AudioIntelligenceModelStatus getStatus() { return status; } + /** + * @return An array of results for the Content Moderation model + */ @JsonProperty("results") public List getResults() { return results; @@ -108,7 +110,7 @@ public static StatusStage builder() { } public interface StatusStage { - _FinalStage status(@NotNull AudioIntelligenceModelStatus status); + _FinalStage status(AudioIntelligenceModelStatus status); Builder from(ContentSafetyLabelsResult other); } @@ -165,8 +167,8 @@ public Builder from(ContentSafetyLabelsResult other) { */ @java.lang.Override @JsonSetter("status") - public _FinalStage status(@NotNull AudioIntelligenceModelStatus status) { - this.status = Objects.requireNonNull(status, "status must not be null"); + public _FinalStage status(AudioIntelligenceModelStatus status) { + this.status = status; return this; } @@ -226,12 +228,20 @@ public _FinalStage summary(Map summary) { return this; } + /** + *

An array of results for the Content Moderation model

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage addAllResults(List results) { this.results.addAll(results); return this; } + /** + *

An array of results for the Content Moderation model

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage addResults(ContentSafetyLabelResult results) { this.results.add(results); diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/Entity.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/Entity.java index 2a1fdd5c..e0363a32 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/Entity.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/Entity.java @@ -14,7 +14,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Entity.Builder.class) @@ -102,13 +101,13 @@ public static EntityTypeStage builder() { } public interface EntityTypeStage { - TextStage entityType(@NotNull EntityType entityType); + TextStage entityType(EntityType entityType); Builder from(Entity other); } public interface TextStage { - StartStage text(@NotNull String text); + StartStage text(String text); } public interface StartStage { @@ -153,8 +152,8 @@ public Builder from(Entity other) { */ @java.lang.Override @JsonSetter("entity_type") - public TextStage entityType(@NotNull EntityType entityType) { - this.entityType = Objects.requireNonNull(entityType, "entityType must not be null"); + public TextStage entityType(EntityType entityType) { + this.entityType = entityType; return this; } @@ -164,8 +163,8 @@ public TextStage entityType(@NotNull EntityType entityType) { */ @java.lang.Override @JsonSetter("text") - public StartStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); + public StartStage text(String text) { + this.text = text; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/ITranscriptOptionalParams.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/ITranscriptOptionalParams.java index 06684f10..b130e029 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/ITranscriptOptionalParams.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/ITranscriptOptionalParams.java @@ -21,6 +21,8 @@ public interface ITranscriptOptionalParams { Optional getDisfluencies(); + Optional getMultichannel(); + Optional getDualChannel(); Optional getWebhookUrl(); diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/PageDetails.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/PageDetails.java index 99fcd7ba..a32f3c77 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/PageDetails.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/PageDetails.java @@ -16,7 +16,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PageDetails.Builder.class) @@ -132,7 +131,7 @@ public interface ResultCountStage { } public interface CurrentUrlStage { - _FinalStage currentUrl(@NotNull String currentUrl); + _FinalStage currentUrl(String currentUrl); } public interface _FinalStage { @@ -202,8 +201,8 @@ public CurrentUrlStage resultCount(int resultCount) { */ @java.lang.Override @JsonSetter("current_url") - public _FinalStage currentUrl(@NotNull String currentUrl) { - this.currentUrl = Objects.requireNonNull(currentUrl, "currentUrl must not be null"); + public _FinalStage currentUrl(String currentUrl) { + this.currentUrl = currentUrl; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/ParagraphsResponse.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/ParagraphsResponse.java index c7b09a34..da1ce0d3 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/ParagraphsResponse.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/ParagraphsResponse.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ParagraphsResponse.Builder.class) @@ -45,21 +44,33 @@ private ParagraphsResponse( this.additionalProperties = additionalProperties; } + /** + * @return The unique identifier of your transcript + */ @JsonProperty("id") public String getId() { return id; } + /** + * @return The confidence score for the transcript + */ @JsonProperty("confidence") public double getConfidence() { return confidence; } + /** + * @return The duration of the audio file in seconds + */ @JsonProperty("audio_duration") public double getAudioDuration() { return audioDuration; } + /** + * @return An array of paragraphs in the transcript + */ @JsonProperty("paragraphs") public List getParagraphs() { return paragraphs; @@ -98,7 +109,7 @@ public static IdStage builder() { } public interface IdStage { - ConfidenceStage id(@NotNull String id); + ConfidenceStage id(String id); Builder from(ParagraphsResponse other); } @@ -145,13 +156,21 @@ public Builder from(ParagraphsResponse other) { return this; } + /** + *

The unique identifier of your transcript

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("id") - public ConfidenceStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); + public ConfidenceStage id(String id) { + this.id = id; return this; } + /** + *

The confidence score for the transcript

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("confidence") public AudioDurationStage confidence(double confidence) { @@ -159,6 +178,10 @@ public AudioDurationStage confidence(double confidence) { return this; } + /** + *

The duration of the audio file in seconds

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("audio_duration") public _FinalStage audioDuration(double audioDuration) { @@ -166,12 +189,20 @@ public _FinalStage audioDuration(double audioDuration) { return this; } + /** + *

An array of paragraphs in the transcript

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage addAllParagraphs(List paragraphs) { this.paragraphs.addAll(paragraphs); return this; } + /** + *

An array of paragraphs in the transcript

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage addParagraphs(TranscriptParagraph paragraphs) { this.paragraphs.add(paragraphs); diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/RedactedAudioResponse.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/RedactedAudioResponse.java index affaf542..0e7d0028 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/RedactedAudioResponse.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/RedactedAudioResponse.java @@ -14,7 +14,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RedactedAudioResponse.Builder.class) @@ -77,13 +76,13 @@ public static StatusStage builder() { } public interface StatusStage { - RedactedAudioUrlStage status(@NotNull String status); + RedactedAudioUrlStage status(String status); Builder from(RedactedAudioResponse other); } public interface RedactedAudioUrlStage { - _FinalStage redactedAudioUrl(@NotNull String redactedAudioUrl); + _FinalStage redactedAudioUrl(String redactedAudioUrl); } public interface _FinalStage { @@ -114,8 +113,8 @@ public Builder from(RedactedAudioResponse other) { */ @java.lang.Override @JsonSetter("status") - public RedactedAudioUrlStage status(@NotNull String status) { - this.status = Objects.requireNonNull(status, "status must not be null"); + public RedactedAudioUrlStage status(String status) { + this.status = status; return this; } @@ -125,8 +124,8 @@ public RedactedAudioUrlStage status(@NotNull String status) { */ @java.lang.Override @JsonSetter("redacted_audio_url") - public _FinalStage redactedAudioUrl(@NotNull String redactedAudioUrl) { - this.redactedAudioUrl = Objects.requireNonNull(redactedAudioUrl, "redactedAudioUrl must not be null"); + public _FinalStage redactedAudioUrl(String redactedAudioUrl) { + this.redactedAudioUrl = redactedAudioUrl; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/SentencesResponse.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/SentencesResponse.java index d1c9ef7b..667e95aa 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/SentencesResponse.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/SentencesResponse.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SentencesResponse.Builder.class) @@ -45,21 +44,33 @@ private SentencesResponse( this.additionalProperties = additionalProperties; } + /** + * @return The unique identifier for the transcript + */ @JsonProperty("id") public String getId() { return id; } + /** + * @return The confidence score for the transcript + */ @JsonProperty("confidence") public double getConfidence() { return confidence; } + /** + * @return The duration of the audio file in seconds + */ @JsonProperty("audio_duration") public double getAudioDuration() { return audioDuration; } + /** + * @return An array of sentences in the transcript + */ @JsonProperty("sentences") public List getSentences() { return sentences; @@ -98,7 +109,7 @@ public static IdStage builder() { } public interface IdStage { - ConfidenceStage id(@NotNull String id); + ConfidenceStage id(String id); Builder from(SentencesResponse other); } @@ -145,13 +156,21 @@ public Builder from(SentencesResponse other) { return this; } + /** + *

The unique identifier for the transcript

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("id") - public ConfidenceStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); + public ConfidenceStage id(String id) { + this.id = id; return this; } + /** + *

The confidence score for the transcript

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("confidence") public AudioDurationStage confidence(double confidence) { @@ -159,6 +178,10 @@ public AudioDurationStage confidence(double confidence) { return this; } + /** + *

The duration of the audio file in seconds

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("audio_duration") public _FinalStage audioDuration(double audioDuration) { @@ -166,12 +189,20 @@ public _FinalStage audioDuration(double audioDuration) { return this; } + /** + *

An array of sentences in the transcript

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage addAllSentences(List sentences) { this.sentences.addAll(sentences); return this; } + /** + *

An array of sentences in the transcript

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage addSentences(TranscriptSentence sentences) { this.sentences.add(sentences); diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/SentimentAnalysisResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/SentimentAnalysisResult.java index 7e413349..108a9971 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/SentimentAnalysisResult.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/SentimentAnalysisResult.java @@ -16,7 +16,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SentimentAnalysisResult.Builder.class) @@ -31,6 +30,8 @@ public final class SentimentAnalysisResult { private final double confidence; + private final Optional channel; + private final Optional speaker; private final Map additionalProperties; @@ -41,6 +42,7 @@ private SentimentAnalysisResult( int end, Sentiment sentiment, double confidence, + Optional channel, Optional speaker, Map additionalProperties) { this.text = text; @@ -48,6 +50,7 @@ private SentimentAnalysisResult( this.end = end; this.sentiment = sentiment; this.confidence = confidence; + this.channel = channel; this.speaker = speaker; this.additionalProperties = additionalProperties; } @@ -92,6 +95,14 @@ public double getConfidence() { return confidence; } + /** + * @return The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially. + */ + @JsonProperty("channel") + public Optional getChannel() { + return channel; + } + /** * @return The speaker of the sentence if Speaker Diarization is enabled, else null */ @@ -117,12 +128,14 @@ private boolean equalTo(SentimentAnalysisResult other) { && end == other.end && sentiment.equals(other.sentiment) && confidence == other.confidence + && channel.equals(other.channel) && speaker.equals(other.speaker); } @java.lang.Override public int hashCode() { - return Objects.hash(this.text, this.start, this.end, this.sentiment, this.confidence, this.speaker); + return Objects.hash( + this.text, this.start, this.end, this.sentiment, this.confidence, this.channel, this.speaker); } @java.lang.Override @@ -135,7 +148,7 @@ public static TextStage builder() { } public interface TextStage { - StartStage text(@NotNull String text); + StartStage text(String text); Builder from(SentimentAnalysisResult other); } @@ -149,7 +162,7 @@ public interface EndStage { } public interface SentimentStage { - ConfidenceStage sentiment(@NotNull Sentiment sentiment); + ConfidenceStage sentiment(Sentiment sentiment); } public interface ConfidenceStage { @@ -159,6 +172,10 @@ public interface ConfidenceStage { public interface _FinalStage { SentimentAnalysisResult build(); + _FinalStage channel(Optional channel); + + _FinalStage channel(String channel); + _FinalStage speaker(Optional speaker); _FinalStage speaker(String speaker); @@ -179,6 +196,8 @@ public static final class Builder private Optional speaker = Optional.empty(); + private Optional channel = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -191,6 +210,7 @@ public Builder from(SentimentAnalysisResult other) { end(other.getEnd()); sentiment(other.getSentiment()); confidence(other.getConfidence()); + channel(other.getChannel()); speaker(other.getSpeaker()); return this; } @@ -201,8 +221,8 @@ public Builder from(SentimentAnalysisResult other) { */ @java.lang.Override @JsonSetter("text") - public StartStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); + public StartStage text(String text) { + this.text = text; return this; } @@ -234,8 +254,8 @@ public SentimentStage end(int end) { */ @java.lang.Override @JsonSetter("sentiment") - public ConfidenceStage sentiment(@NotNull Sentiment sentiment) { - this.sentiment = Objects.requireNonNull(sentiment, "sentiment must not be null"); + public ConfidenceStage sentiment(Sentiment sentiment) { + this.sentiment = sentiment; return this; } @@ -267,9 +287,27 @@ public _FinalStage speaker(Optional speaker) { return this; } + /** + *

The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage channel(String channel) { + this.channel = Optional.ofNullable(channel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "channel", nulls = Nulls.SKIP) + public _FinalStage channel(Optional channel) { + this.channel = channel; + return this; + } + @java.lang.Override public SentimentAnalysisResult build() { - return new SentimentAnalysisResult(text, start, end, sentiment, confidence, speaker, additionalProperties); + return new SentimentAnalysisResult( + text, start, end, sentiment, confidence, channel, speaker, additionalProperties); } } } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionModelResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionModelResult.java index cb5d28e5..6dc59595 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionModelResult.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionModelResult.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TopicDetectionModelResult.Builder.class) @@ -96,7 +95,7 @@ public static StatusStage builder() { } public interface StatusStage { - _FinalStage status(@NotNull AudioIntelligenceModelStatus status); + _FinalStage status(AudioIntelligenceModelStatus status); Builder from(TopicDetectionModelResult other); } @@ -144,8 +143,8 @@ public Builder from(TopicDetectionModelResult other) { */ @java.lang.Override @JsonSetter("status") - public _FinalStage status(@NotNull AudioIntelligenceModelStatus status) { - this.status = Objects.requireNonNull(status, "status must not be null"); + public _FinalStage status(AudioIntelligenceModelStatus status) { + this.status = status; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResult.java index df39ebc5..31c6f1d8 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResult.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResult.java @@ -17,7 +17,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TopicDetectionResult.Builder.class) @@ -49,6 +48,9 @@ public String getText() { return text; } + /** + * @return An array of detected topics in the text + */ @JsonProperty("labels") public Optional> getLabels() { return labels; @@ -89,7 +91,7 @@ public static TextStage builder() { } public interface TextStage { - _FinalStage text(@NotNull String text); + _FinalStage text(String text); Builder from(TopicDetectionResult other); } @@ -133,8 +135,8 @@ public Builder from(TopicDetectionResult other) { */ @java.lang.Override @JsonSetter("text") - public _FinalStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); + public _FinalStage text(String text) { + this.text = text; return this; } @@ -151,6 +153,10 @@ public _FinalStage timestamp(Optional timestamp) { return this; } + /** + *

An array of detected topics in the text

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage labels(List labels) { this.labels = Optional.ofNullable(labels); diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResultLabelsItem.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResultLabelsItem.java index dc8a6a2a..ecf37434 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResultLabelsItem.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResultLabelsItem.java @@ -14,7 +14,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TopicDetectionResultLabelsItem.Builder.class) @@ -83,7 +82,7 @@ public interface RelevanceStage { } public interface LabelStage { - _FinalStage label(@NotNull String label); + _FinalStage label(String label); } public interface _FinalStage { @@ -125,8 +124,8 @@ public LabelStage relevance(double relevance) { */ @java.lang.Override @JsonSetter("label") - public _FinalStage label(@NotNull String label) { - this.label = Objects.requireNonNull(label, "label must not be null"); + public _FinalStage label(String label) { + this.label = label; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/Transcript.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/Transcript.java index 1a44e3f1..7efd9b07 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/Transcript.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/Transcript.java @@ -17,7 +17,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Transcript.Builder.class) @@ -54,6 +53,10 @@ public final class Transcript { private final Optional disfluencies; + private final Optional multichannel; + + private final Optional audioChannels; + private final Optional dualChannel; private final Optional webhookUrl; @@ -157,6 +160,8 @@ private Transcript( Optional punctuate, Optional formatText, Optional disfluencies, + Optional multichannel, + Optional audioChannels, Optional dualChannel, Optional webhookUrl, Optional webhookStatusCode, @@ -216,6 +221,8 @@ private Transcript( this.punctuate = punctuate; this.formatText = formatText; this.disfluencies = disfluencies; + this.multichannel = multichannel; + this.audioChannels = audioChannels; this.dualChannel = dualChannel; this.webhookUrl = webhookUrl; this.webhookStatusCode = webhookStatusCode; @@ -391,6 +398,22 @@ public Optional getDisfluencies() { return disfluencies; } + /** + * @return Whether Multichannel transcription was enabled in the transcription request, either true or false + */ + @JsonProperty("multichannel") + public Optional getMultichannel() { + return multichannel; + } + + /** + * @return The number of audio channels in the audio file. This is only present when multichannel is enabled. + */ + @JsonProperty("audio_channels") + public Optional getAudioChannels() { + return audioChannels; + } + /** * @return Whether Dual channel transcription was enabled in the transcription request, either true or false */ @@ -751,6 +774,8 @@ private boolean equalTo(Transcript other) { && punctuate.equals(other.punctuate) && formatText.equals(other.formatText) && disfluencies.equals(other.disfluencies) + && multichannel.equals(other.multichannel) + && audioChannels.equals(other.audioChannels) && dualChannel.equals(other.dualChannel) && webhookUrl.equals(other.webhookUrl) && webhookStatusCode.equals(other.webhookStatusCode) @@ -814,6 +839,8 @@ public int hashCode() { this.punctuate, this.formatText, this.disfluencies, + this.multichannel, + this.audioChannels, this.dualChannel, this.webhookUrl, this.webhookStatusCode, @@ -868,17 +895,17 @@ public static IdStage builder() { } public interface IdStage { - AudioUrlStage id(@NotNull String id); + AudioUrlStage id(String id); Builder from(Transcript other); } public interface AudioUrlStage { - StatusStage audioUrl(@NotNull String audioUrl); + StatusStage audioUrl(String audioUrl); } public interface StatusStage { - WebhookAuthStage status(@NotNull TranscriptStatus status); + WebhookAuthStage status(TranscriptStatus status); } public interface WebhookAuthStage { @@ -898,11 +925,11 @@ public interface SummarizationStage { } public interface LanguageModelStage { - AcousticModelStage languageModel(@NotNull String languageModel); + AcousticModelStage languageModel(String languageModel); } public interface AcousticModelStage { - _FinalStage acousticModel(@NotNull String acousticModel); + _FinalStage acousticModel(String acousticModel); } public interface _FinalStage { @@ -960,6 +987,14 @@ public interface _FinalStage { _FinalStage disfluencies(Boolean disfluencies); + _FinalStage multichannel(Optional multichannel); + + _FinalStage multichannel(Boolean multichannel); + + _FinalStage audioChannels(Optional audioChannels); + + _FinalStage audioChannels(Integer audioChannels); + _FinalStage dualChannel(Optional dualChannel); _FinalStage dualChannel(Boolean dualChannel); @@ -1207,6 +1242,10 @@ public static final class Builder private Optional dualChannel = Optional.empty(); + private Optional audioChannels = Optional.empty(); + + private Optional multichannel = Optional.empty(); + private Optional disfluencies = Optional.empty(); private Optional formatText = Optional.empty(); @@ -1256,6 +1295,8 @@ public Builder from(Transcript other) { punctuate(other.getPunctuate()); formatText(other.getFormatText()); disfluencies(other.getDisfluencies()); + multichannel(other.getMultichannel()); + audioChannels(other.getAudioChannels()); dualChannel(other.getDualChannel()); webhookUrl(other.getWebhookUrl()); webhookStatusCode(other.getWebhookStatusCode()); @@ -1307,8 +1348,8 @@ public Builder from(Transcript other) { */ @java.lang.Override @JsonSetter("id") - public AudioUrlStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); + public AudioUrlStage id(String id) { + this.id = id; return this; } @@ -1318,8 +1359,8 @@ public AudioUrlStage id(@NotNull String id) { */ @java.lang.Override @JsonSetter("audio_url") - public StatusStage audioUrl(@NotNull String audioUrl) { - this.audioUrl = Objects.requireNonNull(audioUrl, "audioUrl must not be null"); + public StatusStage audioUrl(String audioUrl) { + this.audioUrl = audioUrl; return this; } @@ -1329,8 +1370,8 @@ public StatusStage audioUrl(@NotNull String audioUrl) { */ @java.lang.Override @JsonSetter("status") - public WebhookAuthStage status(@NotNull TranscriptStatus status) { - this.status = Objects.requireNonNull(status, "status must not be null"); + public WebhookAuthStage status(TranscriptStatus status) { + this.status = status; return this; } @@ -1384,8 +1425,8 @@ public LanguageModelStage summarization(boolean summarization) { */ @java.lang.Override @JsonSetter("language_model") - public AcousticModelStage languageModel(@NotNull String languageModel) { - this.languageModel = Objects.requireNonNull(languageModel, "languageModel must not be null"); + public AcousticModelStage languageModel(String languageModel) { + this.languageModel = languageModel; return this; } @@ -1395,8 +1436,8 @@ public AcousticModelStage languageModel(@NotNull String languageModel) { */ @java.lang.Override @JsonSetter("acoustic_model") - public _FinalStage acousticModel(@NotNull String acousticModel) { - this.acousticModel = Objects.requireNonNull(acousticModel, "acousticModel must not be null"); + public _FinalStage acousticModel(String acousticModel) { + this.acousticModel = acousticModel; return this; } @@ -2004,6 +2045,40 @@ public _FinalStage dualChannel(Optional dualChannel) { return this; } + /** + *

The number of audio channels in the audio file. This is only present when multichannel is enabled.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage audioChannels(Integer audioChannels) { + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + @java.lang.Override + @JsonSetter(value = "audio_channels", nulls = Nulls.SKIP) + public _FinalStage audioChannels(Optional audioChannels) { + this.audioChannels = audioChannels; + return this; + } + + /** + *

Whether Multichannel transcription was enabled in the transcription request, either true or false

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage multichannel(Boolean multichannel) { + this.multichannel = Optional.ofNullable(multichannel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "multichannel", nulls = Nulls.SKIP) + public _FinalStage multichannel(Optional multichannel) { + this.multichannel = multichannel; + return this; + } + /** *

Transcribe Filler Words, like "umm", in your media file; can be true or false

* @return Reference to {@code this} so that method calls can be chained together. @@ -2245,6 +2320,8 @@ public Transcript build() { punctuate, formatText, disfluencies, + multichannel, + audioChannels, dualChannel, webhookUrl, webhookStatusCode, diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptCustomSpelling.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptCustomSpelling.java index 71d08e1f..78fc5b7b 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptCustomSpelling.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptCustomSpelling.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TranscriptCustomSpelling.Builder.class) @@ -80,7 +79,7 @@ public static ToStage builder() { } public interface ToStage { - _FinalStage to(@NotNull String to); + _FinalStage to(String to); Builder from(TranscriptCustomSpelling other); } @@ -119,8 +118,8 @@ public Builder from(TranscriptCustomSpelling other) { */ @java.lang.Override @JsonSetter("to") - public _FinalStage to(@NotNull String to) { - this.to = Objects.requireNonNull(to, "to must not be null"); + public _FinalStage to(String to) { + this.to = to; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptList.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptList.java index a1f9f84f..c6698452 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptList.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptList.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TranscriptList.Builder.class) @@ -35,11 +34,17 @@ private TranscriptList( this.additionalProperties = additionalProperties; } + /** + * @return Details of the transcript page + */ @JsonProperty("page_details") public PageDetails getPageDetails() { return pageDetails; } + /** + * @return An array of transcripts + */ @JsonProperty("transcripts") public List getTranscripts() { return transcripts; @@ -75,7 +80,7 @@ public static PageDetailsStage builder() { } public interface PageDetailsStage { - _FinalStage pageDetails(@NotNull PageDetails pageDetails); + _FinalStage pageDetails(PageDetails pageDetails); Builder from(TranscriptList other); } @@ -108,19 +113,31 @@ public Builder from(TranscriptList other) { return this; } + /** + *

Details of the transcript page

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("page_details") - public _FinalStage pageDetails(@NotNull PageDetails pageDetails) { - this.pageDetails = Objects.requireNonNull(pageDetails, "pageDetails must not be null"); + public _FinalStage pageDetails(PageDetails pageDetails) { + this.pageDetails = pageDetails; return this; } + /** + *

An array of transcripts

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage addAllTranscripts(List transcripts) { this.transcripts.addAll(transcripts); return this; } + /** + *

An array of transcripts

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage addTranscripts(TranscriptListItem transcripts) { this.transcripts.add(transcripts); diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptListItem.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptListItem.java index 6cf42e21..4880a6f2 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptListItem.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptListItem.java @@ -17,7 +17,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TranscriptListItem.Builder.class) @@ -57,31 +56,49 @@ private TranscriptListItem( this.additionalProperties = additionalProperties; } + /** + * @return The unique identifier for the transcript + */ @JsonProperty("id") public String getId() { return id; } + /** + * @return The URL to retrieve the transcript + */ @JsonProperty("resource_url") public String getResourceUrl() { return resourceUrl; } + /** + * @return The status of the transcript + */ @JsonProperty("status") public TranscriptStatus getStatus() { return status; } + /** + * @return The date and time the transcript was created + */ @JsonProperty("created") public OffsetDateTime getCreated() { return created; } + /** + * @return The date and time the transcript was completed + */ @JsonProperty("completed") public Optional getCompleted() { return completed; } + /** + * @return The URL to the audio file + */ @JsonProperty("audio_url") public String getAudioUrl() { return audioUrl; @@ -132,25 +149,25 @@ public static IdStage builder() { } public interface IdStage { - ResourceUrlStage id(@NotNull String id); + ResourceUrlStage id(String id); Builder from(TranscriptListItem other); } public interface ResourceUrlStage { - StatusStage resourceUrl(@NotNull String resourceUrl); + StatusStage resourceUrl(String resourceUrl); } public interface StatusStage { - CreatedStage status(@NotNull TranscriptStatus status); + CreatedStage status(TranscriptStatus status); } public interface CreatedStage { - AudioUrlStage created(@NotNull OffsetDateTime created); + AudioUrlStage created(OffsetDateTime created); } public interface AudioUrlStage { - _FinalStage audioUrl(@NotNull String audioUrl); + _FinalStage audioUrl(String audioUrl); } public interface _FinalStage { @@ -199,38 +216,58 @@ public Builder from(TranscriptListItem other) { return this; } + /** + *

The unique identifier for the transcript

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("id") - public ResourceUrlStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); + public ResourceUrlStage id(String id) { + this.id = id; return this; } + /** + *

The URL to retrieve the transcript

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("resource_url") - public StatusStage resourceUrl(@NotNull String resourceUrl) { - this.resourceUrl = Objects.requireNonNull(resourceUrl, "resourceUrl must not be null"); + public StatusStage resourceUrl(String resourceUrl) { + this.resourceUrl = resourceUrl; return this; } + /** + *

The status of the transcript

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("status") - public CreatedStage status(@NotNull TranscriptStatus status) { - this.status = Objects.requireNonNull(status, "status must not be null"); + public CreatedStage status(TranscriptStatus status) { + this.status = status; return this; } + /** + *

The date and time the transcript was created

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("created") - public AudioUrlStage created(@NotNull OffsetDateTime created) { - this.created = Objects.requireNonNull(created, "created must not be null"); + public AudioUrlStage created(OffsetDateTime created) { + this.created = created; return this; } + /** + *

The URL to the audio file

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("audio_url") - public _FinalStage audioUrl(@NotNull String audioUrl) { - this.audioUrl = Objects.requireNonNull(audioUrl, "audioUrl must not be null"); + public _FinalStage audioUrl(String audioUrl) { + this.audioUrl = audioUrl; return this; } @@ -251,6 +288,10 @@ public _FinalStage error(Optional error) { return this; } + /** + *

The date and time the transcript was completed

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage completed(OffsetDateTime completed) { this.completed = Optional.ofNullable(completed); diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptOptionalParams.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptOptionalParams.java index bd2f691b..fc66ec91 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptOptionalParams.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptOptionalParams.java @@ -35,6 +35,8 @@ public final class TranscriptOptionalParams implements ITranscriptOptionalParams private final Optional disfluencies; + private final Optional multichannel; + private final Optional dualChannel; private final Optional webhookUrl; @@ -105,6 +107,7 @@ private TranscriptOptionalParams( Optional punctuate, Optional formatText, Optional disfluencies, + Optional multichannel, Optional dualChannel, Optional webhookUrl, Optional webhookAuthHeaderName, @@ -143,6 +146,7 @@ private TranscriptOptionalParams( this.punctuate = punctuate; this.formatText = formatText; this.disfluencies = disfluencies; + this.multichannel = multichannel; this.dualChannel = dualChannel; this.webhookUrl = webhookUrl; this.webhookAuthHeaderName = webhookAuthHeaderName; @@ -235,6 +239,15 @@ public Optional getDisfluencies() { return disfluencies; } + /** + * @return Enable Multichannel transcription, can be true or false. + */ + @JsonProperty("multichannel") + @java.lang.Override + public Optional getMultichannel() { + return multichannel; + } + /** * @return Enable Dual Channel transcription, can be true or false. */ @@ -524,6 +537,7 @@ private boolean equalTo(TranscriptOptionalParams other) { && punctuate.equals(other.punctuate) && formatText.equals(other.formatText) && disfluencies.equals(other.disfluencies) + && multichannel.equals(other.multichannel) && dualChannel.equals(other.dualChannel) && webhookUrl.equals(other.webhookUrl) && webhookAuthHeaderName.equals(other.webhookAuthHeaderName) @@ -566,6 +580,7 @@ public int hashCode() { this.punctuate, this.formatText, this.disfluencies, + this.multichannel, this.dualChannel, this.webhookUrl, this.webhookAuthHeaderName, @@ -623,6 +638,8 @@ public static final class Builder { private Optional disfluencies = Optional.empty(); + private Optional multichannel = Optional.empty(); + private Optional dualChannel = Optional.empty(); private Optional webhookUrl = Optional.empty(); @@ -696,6 +713,7 @@ public Builder from(TranscriptOptionalParams other) { punctuate(other.getPunctuate()); formatText(other.getFormatText()); disfluencies(other.getDisfluencies()); + multichannel(other.getMultichannel()); dualChannel(other.getDualChannel()); webhookUrl(other.getWebhookUrl()); webhookAuthHeaderName(other.getWebhookAuthHeaderName()); @@ -806,6 +824,17 @@ public Builder disfluencies(Boolean disfluencies) { return this; } + @JsonSetter(value = "multichannel", nulls = Nulls.SKIP) + public Builder multichannel(Optional multichannel) { + this.multichannel = multichannel; + return this; + } + + public Builder multichannel(Boolean multichannel) { + this.multichannel = Optional.ofNullable(multichannel); + return this; + } + @JsonSetter(value = "dual_channel", nulls = Nulls.SKIP) public Builder dualChannel(Optional dualChannel) { this.dualChannel = dualChannel; @@ -1145,6 +1174,7 @@ public TranscriptOptionalParams build() { punctuate, formatText, disfluencies, + multichannel, dualChannel, webhookUrl, webhookAuthHeaderName, diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptParagraph.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptParagraph.java index 4e32ce73..00d50dd8 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptParagraph.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptParagraph.java @@ -17,8 +17,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TranscriptParagraph.Builder.class) @@ -33,8 +31,6 @@ public final class TranscriptParagraph { private final List words; - private final Optional speaker; - private final Map additionalProperties; private TranscriptParagraph( @@ -43,50 +39,55 @@ private TranscriptParagraph( int end, double confidence, List words, - Optional speaker, Map additionalProperties) { this.text = text; this.start = start; this.end = end; this.confidence = confidence; this.words = words; - this.speaker = speaker; this.additionalProperties = additionalProperties; } + /** + * @return The transcript of the paragraph + */ @JsonProperty("text") public String getText() { return text; } + /** + * @return The starting time, in milliseconds, of the paragraph + */ @JsonProperty("start") public int getStart() { return start; } + /** + * @return The ending time, in milliseconds, of the paragraph + */ @JsonProperty("end") public int getEnd() { return end; } + /** + * @return The confidence score for the transcript of this paragraph + */ @JsonProperty("confidence") public double getConfidence() { return confidence; } + /** + * @return An array of words in the paragraph + */ @JsonProperty("words") public List getWords() { return words; } - /** - * @return The speaker of the sentence if Speaker Diarization is enabled, else null - */ - @JsonProperty("speaker") - public Optional getSpeaker() { - return speaker; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -103,13 +104,12 @@ private boolean equalTo(TranscriptParagraph other) { && start == other.start && end == other.end && confidence == other.confidence - && words.equals(other.words) - && speaker.equals(other.speaker); + && words.equals(other.words); } @java.lang.Override public int hashCode() { - return Objects.hash(this.text, this.start, this.end, this.confidence, this.words, this.speaker); + return Objects.hash(this.text, this.start, this.end, this.confidence, this.words); } @java.lang.Override @@ -122,7 +122,7 @@ public static TextStage builder() { } public interface TextStage { - StartStage text(@NotNull String text); + StartStage text(String text); Builder from(TranscriptParagraph other); } @@ -147,10 +147,6 @@ public interface _FinalStage { _FinalStage addWords(TranscriptWord words); _FinalStage addAllWords(List words); - - _FinalStage speaker(Optional speaker); - - _FinalStage speaker(String speaker); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -163,8 +159,6 @@ public static final class Builder implements TextStage, StartStage, EndStage, Co private double confidence; - private Optional speaker = Optional.empty(); - private List words = new ArrayList<>(); @JsonAnySetter @@ -179,17 +173,24 @@ public Builder from(TranscriptParagraph other) { end(other.getEnd()); confidence(other.getConfidence()); words(other.getWords()); - speaker(other.getSpeaker()); return this; } + /** + *

The transcript of the paragraph

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("text") - public StartStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); + public StartStage text(String text) { + this.text = text; return this; } + /** + *

The starting time, in milliseconds, of the paragraph

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("start") public EndStage start(int start) { @@ -197,6 +198,10 @@ public EndStage start(int start) { return this; } + /** + *

The ending time, in milliseconds, of the paragraph

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("end") public ConfidenceStage end(int end) { @@ -204,6 +209,10 @@ public ConfidenceStage end(int end) { return this; } + /** + *

The confidence score for the transcript of this paragraph

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("confidence") public _FinalStage confidence(double confidence) { @@ -212,28 +221,19 @@ public _FinalStage confidence(double confidence) { } /** - *

The speaker of the sentence if Speaker Diarization is enabled, else null

+ *

An array of words in the paragraph

* @return Reference to {@code this} so that method calls can be chained together. */ - @java.lang.Override - public _FinalStage speaker(String speaker) { - this.speaker = Optional.ofNullable(speaker); - return this; - } - - @java.lang.Override - @JsonSetter(value = "speaker", nulls = Nulls.SKIP) - public _FinalStage speaker(Optional speaker) { - this.speaker = speaker; - return this; - } - @java.lang.Override public _FinalStage addAllWords(List words) { this.words.addAll(words); return this; } + /** + *

An array of words in the paragraph

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage addWords(TranscriptWord words) { this.words.add(words); @@ -250,7 +250,7 @@ public _FinalStage words(List words) { @java.lang.Override public TranscriptParagraph build() { - return new TranscriptParagraph(text, start, end, confidence, words, speaker, additionalProperties); + return new TranscriptParagraph(text, start, end, confidence, words, additionalProperties); } } } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptReadyNotification.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptReadyNotification.java index 772c8d07..dc87ec8f 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptReadyNotification.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptReadyNotification.java @@ -14,7 +14,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TranscriptReadyNotification.Builder.class) @@ -78,13 +77,13 @@ public static TranscriptIdStage builder() { } public interface TranscriptIdStage { - StatusStage transcriptId(@NotNull String transcriptId); + StatusStage transcriptId(String transcriptId); Builder from(TranscriptReadyNotification other); } public interface StatusStage { - _FinalStage status(@NotNull TranscriptReadyStatus status); + _FinalStage status(TranscriptReadyStatus status); } public interface _FinalStage { @@ -115,8 +114,8 @@ public Builder from(TranscriptReadyNotification other) { */ @java.lang.Override @JsonSetter("transcript_id") - public StatusStage transcriptId(@NotNull String transcriptId) { - this.transcriptId = Objects.requireNonNull(transcriptId, "transcriptId must not be null"); + public StatusStage transcriptId(String transcriptId) { + this.transcriptId = transcriptId; return this; } @@ -126,8 +125,8 @@ public StatusStage transcriptId(@NotNull String transcriptId) { */ @java.lang.Override @JsonSetter("status") - public _FinalStage status(@NotNull TranscriptReadyStatus status) { - this.status = Objects.requireNonNull(status, "status must not be null"); + public _FinalStage status(TranscriptReadyStatus status) { + this.status = status; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptSentence.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptSentence.java index b9fca84c..1dc110de 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptSentence.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptSentence.java @@ -18,7 +18,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TranscriptSentence.Builder.class) @@ -33,6 +32,8 @@ public final class TranscriptSentence { private final List words; + private final Optional channel; + private final Optional speaker; private final Map additionalProperties; @@ -43,6 +44,7 @@ private TranscriptSentence( int end, double confidence, List words, + Optional channel, Optional speaker, Map additionalProperties) { this.text = text; @@ -50,35 +52,59 @@ private TranscriptSentence( this.end = end; this.confidence = confidence; this.words = words; + this.channel = channel; this.speaker = speaker; this.additionalProperties = additionalProperties; } + /** + * @return The transcript of the sentence + */ @JsonProperty("text") public String getText() { return text; } + /** + * @return The starting time, in milliseconds, for the sentence + */ @JsonProperty("start") public int getStart() { return start; } + /** + * @return The ending time, in milliseconds, for the sentence + */ @JsonProperty("end") public int getEnd() { return end; } + /** + * @return The confidence score for the transcript of this sentence + */ @JsonProperty("confidence") public double getConfidence() { return confidence; } + /** + * @return An array of words in the sentence + */ @JsonProperty("words") public List getWords() { return words; } + /** + * @return The channel of the sentence. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially. + */ + @JsonProperty("channel") + public Optional getChannel() { + return channel; + } + /** * @return The speaker of the sentence if Speaker Diarization is enabled, else null */ @@ -104,12 +130,13 @@ private boolean equalTo(TranscriptSentence other) { && end == other.end && confidence == other.confidence && words.equals(other.words) + && channel.equals(other.channel) && speaker.equals(other.speaker); } @java.lang.Override public int hashCode() { - return Objects.hash(this.text, this.start, this.end, this.confidence, this.words, this.speaker); + return Objects.hash(this.text, this.start, this.end, this.confidence, this.words, this.channel, this.speaker); } @java.lang.Override @@ -122,7 +149,7 @@ public static TextStage builder() { } public interface TextStage { - StartStage text(@NotNull String text); + StartStage text(String text); Builder from(TranscriptSentence other); } @@ -148,6 +175,10 @@ public interface _FinalStage { _FinalStage addAllWords(List words); + _FinalStage channel(Optional channel); + + _FinalStage channel(String channel); + _FinalStage speaker(Optional speaker); _FinalStage speaker(String speaker); @@ -165,6 +196,8 @@ public static final class Builder implements TextStage, StartStage, EndStage, Co private Optional speaker = Optional.empty(); + private Optional channel = Optional.empty(); + private List words = new ArrayList<>(); @JsonAnySetter @@ -179,17 +212,26 @@ public Builder from(TranscriptSentence other) { end(other.getEnd()); confidence(other.getConfidence()); words(other.getWords()); + channel(other.getChannel()); speaker(other.getSpeaker()); return this; } + /** + *

The transcript of the sentence

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("text") - public StartStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); + public StartStage text(String text) { + this.text = text; return this; } + /** + *

The starting time, in milliseconds, for the sentence

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("start") public EndStage start(int start) { @@ -197,6 +239,10 @@ public EndStage start(int start) { return this; } + /** + *

The ending time, in milliseconds, for the sentence

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("end") public ConfidenceStage end(int end) { @@ -204,6 +250,10 @@ public ConfidenceStage end(int end) { return this; } + /** + *

The confidence score for the transcript of this sentence

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("confidence") public _FinalStage confidence(double confidence) { @@ -228,12 +278,37 @@ public _FinalStage speaker(Optional speaker) { return this; } + /** + *

The channel of the sentence. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage channel(String channel) { + this.channel = Optional.ofNullable(channel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "channel", nulls = Nulls.SKIP) + public _FinalStage channel(Optional channel) { + this.channel = channel; + return this; + } + + /** + *

An array of words in the sentence

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage addAllWords(List words) { this.words.addAll(words); return this; } + /** + *

An array of words in the sentence

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override public _FinalStage addWords(TranscriptWord words) { this.words.add(words); @@ -250,7 +325,7 @@ public _FinalStage words(List words) { @java.lang.Override public TranscriptSentence build() { - return new TranscriptSentence(text, start, end, confidence, words, speaker, additionalProperties); + return new TranscriptSentence(text, start, end, confidence, words, channel, speaker, additionalProperties); } } } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptUtterance.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptUtterance.java index fe1153a9..585de323 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptUtterance.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptUtterance.java @@ -17,7 +17,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; +import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TranscriptUtterance.Builder.class) @@ -32,6 +32,8 @@ public final class TranscriptUtterance { private final List words; + private final Optional channel; + private final String speaker; private final Map additionalProperties; @@ -42,6 +44,7 @@ private TranscriptUtterance( int end, String text, List words, + Optional channel, String speaker, Map additionalProperties) { this.confidence = confidence; @@ -49,6 +52,7 @@ private TranscriptUtterance( this.end = end; this.text = text; this.words = words; + this.channel = channel; this.speaker = speaker; this.additionalProperties = additionalProperties; } @@ -93,6 +97,14 @@ public List getWords() { return words; } + /** + * @return The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially. + */ + @JsonProperty("channel") + public Optional getChannel() { + return channel; + } + /** * @return The speaker of this utterance, where each speaker is assigned a sequential capital letter - e.g. "A" for Speaker A, "B" for Speaker B, etc. */ @@ -118,12 +130,13 @@ private boolean equalTo(TranscriptUtterance other) { && end == other.end && text.equals(other.text) && words.equals(other.words) + && channel.equals(other.channel) && speaker.equals(other.speaker); } @java.lang.Override public int hashCode() { - return Objects.hash(this.confidence, this.start, this.end, this.text, this.words, this.speaker); + return Objects.hash(this.confidence, this.start, this.end, this.text, this.words, this.channel, this.speaker); } @java.lang.Override @@ -150,11 +163,11 @@ public interface EndStage { } public interface TextStage { - SpeakerStage text(@NotNull String text); + SpeakerStage text(String text); } public interface SpeakerStage { - _FinalStage speaker(@NotNull String speaker); + _FinalStage speaker(String speaker); } public interface _FinalStage { @@ -165,6 +178,10 @@ public interface _FinalStage { _FinalStage addWords(TranscriptWord words); _FinalStage addAllWords(List words); + + _FinalStage channel(Optional channel); + + _FinalStage channel(String channel); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -180,6 +197,8 @@ public static final class Builder private String speaker; + private Optional channel = Optional.empty(); + private List words = new ArrayList<>(); @JsonAnySetter @@ -194,6 +213,7 @@ public Builder from(TranscriptUtterance other) { end(other.getEnd()); text(other.getText()); words(other.getWords()); + channel(other.getChannel()); speaker(other.getSpeaker()); return this; } @@ -237,8 +257,8 @@ public TextStage end(int end) { */ @java.lang.Override @JsonSetter("text") - public SpeakerStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); + public SpeakerStage text(String text) { + this.text = text; return this; } @@ -248,8 +268,25 @@ public SpeakerStage text(@NotNull String text) { */ @java.lang.Override @JsonSetter("speaker") - public _FinalStage speaker(@NotNull String speaker) { - this.speaker = Objects.requireNonNull(speaker, "speaker must not be null"); + public _FinalStage speaker(String speaker) { + this.speaker = speaker; + return this; + } + + /** + *

The channel of this utterance. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage channel(String channel) { + this.channel = Optional.ofNullable(channel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "channel", nulls = Nulls.SKIP) + public _FinalStage channel(Optional channel) { + this.channel = channel; return this; } @@ -283,7 +320,7 @@ public _FinalStage words(List words) { @java.lang.Override public TranscriptUtterance build() { - return new TranscriptUtterance(confidence, start, end, text, words, speaker, additionalProperties); + return new TranscriptUtterance(confidence, start, end, text, words, channel, speaker, additionalProperties); } } } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptWord.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptWord.java index 33796ddc..1a5c0eaa 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptWord.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptWord.java @@ -16,7 +16,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TranscriptWord.Builder.class) @@ -29,6 +28,8 @@ public final class TranscriptWord { private final String text; + private final Optional channel; + private final Optional speaker; private final Map additionalProperties; @@ -38,38 +39,60 @@ private TranscriptWord( int start, int end, String text, + Optional channel, Optional speaker, Map additionalProperties) { this.confidence = confidence; this.start = start; this.end = end; this.text = text; + this.channel = channel; this.speaker = speaker; this.additionalProperties = additionalProperties; } + /** + * @return The confidence score for the transcript of this word + */ @JsonProperty("confidence") public double getConfidence() { return confidence; } + /** + * @return The starting time, in milliseconds, for the word + */ @JsonProperty("start") public int getStart() { return start; } + /** + * @return The ending time, in milliseconds, for the word + */ @JsonProperty("end") public int getEnd() { return end; } + /** + * @return The text of the word + */ @JsonProperty("text") public String getText() { return text; } /** - * @return The speaker of the sentence if Speaker Diarization is enabled, else null + * @return The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially. + */ + @JsonProperty("channel") + public Optional getChannel() { + return channel; + } + + /** + * @return The speaker of the word if Speaker Diarization is enabled, else null */ @JsonProperty("speaker") public Optional getSpeaker() { @@ -92,12 +115,13 @@ private boolean equalTo(TranscriptWord other) { && start == other.start && end == other.end && text.equals(other.text) + && channel.equals(other.channel) && speaker.equals(other.speaker); } @java.lang.Override public int hashCode() { - return Objects.hash(this.confidence, this.start, this.end, this.text, this.speaker); + return Objects.hash(this.confidence, this.start, this.end, this.text, this.channel, this.speaker); } @java.lang.Override @@ -124,12 +148,16 @@ public interface EndStage { } public interface TextStage { - _FinalStage text(@NotNull String text); + _FinalStage text(String text); } public interface _FinalStage { TranscriptWord build(); + _FinalStage channel(Optional channel); + + _FinalStage channel(String channel); + _FinalStage speaker(Optional speaker); _FinalStage speaker(String speaker); @@ -147,6 +175,8 @@ public static final class Builder implements ConfidenceStage, StartStage, EndSta private Optional speaker = Optional.empty(); + private Optional channel = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -158,10 +188,15 @@ public Builder from(TranscriptWord other) { start(other.getStart()); end(other.getEnd()); text(other.getText()); + channel(other.getChannel()); speaker(other.getSpeaker()); return this; } + /** + *

The confidence score for the transcript of this word

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("confidence") public StartStage confidence(double confidence) { @@ -169,6 +204,10 @@ public StartStage confidence(double confidence) { return this; } + /** + *

The starting time, in milliseconds, for the word

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("start") public EndStage start(int start) { @@ -176,6 +215,10 @@ public EndStage start(int start) { return this; } + /** + *

The ending time, in milliseconds, for the word

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("end") public TextStage end(int end) { @@ -183,15 +226,19 @@ public TextStage end(int end) { return this; } + /** + *

The text of the word

+ * @return Reference to {@code this} so that method calls can be chained together. + */ @java.lang.Override @JsonSetter("text") - public _FinalStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); + public _FinalStage text(String text) { + this.text = text; return this; } /** - *

The speaker of the sentence if Speaker Diarization is enabled, else null

+ *

The speaker of the word if Speaker Diarization is enabled, else null

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -207,9 +254,26 @@ public _FinalStage speaker(Optional speaker) { return this; } + /** + *

The channel of the word. The left and right channels are channels 1 and 2. Additional channels increment the channel number sequentially.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage channel(String channel) { + this.channel = Optional.ofNullable(channel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "channel", nulls = Nulls.SKIP) + public _FinalStage channel(Optional channel) { + this.channel = channel; + return this; + } + @java.lang.Override public TranscriptWord build() { - return new TranscriptWord(confidence, start, end, text, speaker, additionalProperties); + return new TranscriptWord(confidence, start, end, text, channel, speaker, additionalProperties); } } } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchMatch.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchMatch.java index c6146fae..d158dfce 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchMatch.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchMatch.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WordSearchMatch.Builder.class) @@ -110,7 +109,7 @@ public static TextStage builder() { } public interface TextStage { - CountStage text(@NotNull String text); + CountStage text(String text); Builder from(WordSearchMatch other); } @@ -165,8 +164,8 @@ public Builder from(WordSearchMatch other) { */ @java.lang.Override @JsonSetter("text") - public CountStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); + public CountStage text(String text) { + this.text = text; return this; } diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchResponse.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchResponse.java index a5cbb640..208692ba 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchResponse.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchResponse.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WordSearchResponse.Builder.class) @@ -92,7 +91,7 @@ public static IdStage builder() { } public interface IdStage { - TotalCountStage id(@NotNull String id); + TotalCountStage id(String id); Builder from(WordSearchResponse other); } @@ -138,8 +137,8 @@ public Builder from(WordSearchResponse other) { */ @java.lang.Override @JsonSetter("id") - public TotalCountStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); + public TotalCountStage id(String id) { + this.id = id; return this; } diff --git a/src/main/java/com/assemblyai/api/types/Error.java b/src/main/java/com/assemblyai/api/types/Error.java index 8cab22ed..626e8a08 100644 --- a/src/main/java/com/assemblyai/api/types/Error.java +++ b/src/main/java/com/assemblyai/api/types/Error.java @@ -16,7 +16,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Error.Builder.class) @@ -76,7 +75,7 @@ public static ErrorStage builder() { } public interface ErrorStage { - _FinalStage error(@NotNull String error); + _FinalStage error(String error); Builder from(Error other); } @@ -113,8 +112,8 @@ public Builder from(Error other) { */ @java.lang.Override @JsonSetter("error") - public _FinalStage error(@NotNull String error) { - this.error = Objects.requireNonNull(error, "error must not be null"); + public _FinalStage error(String error) { + this.error = error; return this; } From 46a332423679b43eafeec4157b5e6d1513480329 Mon Sep 17 00:00:00 2001 From: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:45:15 +0100 Subject: [PATCH 2/2] Update build.gradle --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 46307112..d21f63a1 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ publishing { maven(MavenPublication) { groupId = 'com.assemblyai' artifactId = 'assemblyai-java' - version = '3.1.0' + version = '4.0.0' from components.java pom { scm {