diff --git a/build.gradle b/build.gradle index 748905c1..3e1dc674 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ publishing { maven(MavenPublication) { groupId = 'com.assemblyai' artifactId = 'assemblyai-java' - version = '3.0.0' + version = '4.0.0' from components.java pom { scm { diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/requests/ListTranscriptParams.java b/src/main/java/com/assemblyai/api/resources/transcripts/requests/ListTranscriptParams.java index 48c7a2b9..39191237 100644 --- a/src/main/java/com/assemblyai/api/resources/transcripts/requests/ListTranscriptParams.java +++ b/src/main/java/com/assemblyai/api/resources/transcripts/requests/ListTranscriptParams.java @@ -21,7 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListTranscriptParams.Builder.class) public final class ListTranscriptParams { - private final Optional 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..95969dee 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 @@ -46,6 +46,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 +120,7 @@ private TranscriptParams( Optional punctuate, Optional formatText, Optional disfluencies, + Optional multichannel, Optional dualChannel, Optional webhookUrl, Optional webhookAuthHeaderName, @@ -157,6 +160,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 +254,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 +560,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 +604,7 @@ public int hashCode() { this.punctuate, this.formatText, this.disfluencies, + this.multichannel, this.dualChannel, this.webhookUrl, this.webhookAuthHeaderName, @@ -669,6 +684,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 +873,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 +903,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()); @@ -1436,6 +1458,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 +1598,7 @@ public TranscriptParams build() { punctuate, formatText, disfluencies, + multichannel, dualChannel, webhookUrl, webhookAuthHeaderName, 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..d8a8737d 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 @@ -54,6 +54,9 @@ public AudioIntelligenceModelStatus getStatus() { return status; } + /** + * @return An array of results for the Content Moderation model + */ @JsonProperty("results") public List getResults() { return results; @@ -226,12 +229,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/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/ParagraphsResponse.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/ParagraphsResponse.java index c7b09a34..1e7a1edb 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 @@ -45,21 +45,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; @@ -145,6 +157,10 @@ 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) { @@ -152,6 +168,10 @@ public ConfidenceStage id(@NotNull String 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 +179,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 +190,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/SentencesResponse.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/SentencesResponse.java index d1c9ef7b..ccefec18 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 @@ -45,21 +45,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; @@ -145,6 +157,10 @@ 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) { @@ -152,6 +168,10 @@ public ConfidenceStage id(@NotNull String 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 +179,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 +190,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..54e450af 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 @@ -31,6 +31,8 @@ public final class SentimentAnalysisResult { private final double confidence; + private final Optional channel; + private final Optional speaker; private final Map additionalProperties; @@ -41,6 +43,7 @@ private SentimentAnalysisResult( int end, Sentiment sentiment, double confidence, + Optional channel, Optional speaker, Map additionalProperties) { this.text = text; @@ -48,6 +51,7 @@ private SentimentAnalysisResult( this.end = end; this.sentiment = sentiment; this.confidence = confidence; + this.channel = channel; this.speaker = speaker; this.additionalProperties = additionalProperties; } @@ -92,6 +96,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 +129,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 @@ -159,6 +173,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 +197,8 @@ public static final class Builder private Optional speaker = Optional.empty(); + private Optional channel = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -191,6 +211,7 @@ public Builder from(SentimentAnalysisResult other) { end(other.getEnd()); sentiment(other.getSentiment()); confidence(other.getConfidence()); + channel(other.getChannel()); speaker(other.getSpeaker()); return this; } @@ -267,9 +288,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/TopicDetectionResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResult.java index df39ebc5..eec208d7 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 @@ -49,6 +49,9 @@ public String getText() { return text; } + /** + * @return An array of detected topics in the text + */ @JsonProperty("labels") public Optional> getLabels() { return labels; @@ -151,6 +154,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/Transcript.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/Transcript.java index 1a44e3f1..c2a6360d 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 @@ -54,6 +54,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 +161,8 @@ private Transcript( Optional punctuate, Optional formatText, Optional disfluencies, + Optional multichannel, + Optional audioChannels, Optional dualChannel, Optional webhookUrl, Optional webhookStatusCode, @@ -216,6 +222,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 +399,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 +775,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 +840,8 @@ public int hashCode() { this.punctuate, this.formatText, this.disfluencies, + this.multichannel, + this.audioChannels, this.dualChannel, this.webhookUrl, this.webhookStatusCode, @@ -960,6 +988,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 +1243,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 +1296,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()); @@ -2004,6 +2046,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 +2321,8 @@ public Transcript build() { punctuate, formatText, disfluencies, + multichannel, + audioChannels, dualChannel, webhookUrl, webhookStatusCode, 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..ae8e7f52 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 @@ -35,11 +35,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; @@ -108,6 +114,10 @@ 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) { @@ -115,12 +125,20 @@ public _FinalStage pageDetails(@NotNull 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..33d30247 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 @@ -57,31 +57,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; @@ -199,6 +217,10 @@ 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) { @@ -206,6 +228,10 @@ public ResourceUrlStage id(@NotNull String 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) { @@ -213,6 +239,10 @@ public StatusStage resourceUrl(@NotNull String 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) { @@ -220,6 +250,10 @@ public CreatedStage status(@NotNull TranscriptStatus 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) { @@ -227,6 +261,10 @@ public AudioUrlStage created(@NotNull OffsetDateTime 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) { @@ -251,6 +289,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..bf2826c9 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,7 +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) @@ -33,8 +32,6 @@ public final class TranscriptParagraph { private final List words; - private final Optional speaker; - private final Map additionalProperties; private TranscriptParagraph( @@ -43,50 +40,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 +105,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 @@ -147,10 +148,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 +160,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,10 +174,13 @@ 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) { @@ -190,6 +188,10 @@ public StartStage text(@NotNull String 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 +199,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 +210,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 +222,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 +251,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/TranscriptSentence.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptSentence.java index b9fca84c..05047eaa 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 @@ -33,6 +33,8 @@ public final class TranscriptSentence { private final List words; + private final Optional channel; + private final Optional speaker; private final Map additionalProperties; @@ -43,6 +45,7 @@ private TranscriptSentence( int end, double confidence, List words, + Optional channel, Optional speaker, Map additionalProperties) { this.text = text; @@ -50,35 +53,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 +131,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 @@ -148,6 +176,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 +197,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,10 +213,15 @@ 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) { @@ -190,6 +229,10 @@ public StartStage text(@NotNull String 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 +240,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 +251,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 +279,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 +326,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..f08d9615 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,6 +17,7 @@ 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) @@ -32,6 +33,8 @@ public final class TranscriptUtterance { private final List words; + private final Optional channel; + private final String speaker; private final Map additionalProperties; @@ -42,6 +45,7 @@ private TranscriptUtterance( int end, String text, List words, + Optional channel, String speaker, Map additionalProperties) { this.confidence = confidence; @@ -49,6 +53,7 @@ private TranscriptUtterance( this.end = end; this.text = text; this.words = words; + this.channel = channel; this.speaker = speaker; this.additionalProperties = additionalProperties; } @@ -93,6 +98,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 +131,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 @@ -165,6 +179,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 +198,8 @@ public static final class Builder private String speaker; + private Optional channel = Optional.empty(); + private List words = new ArrayList<>(); @JsonAnySetter @@ -194,6 +214,7 @@ public Builder from(TranscriptUtterance other) { end(other.getEnd()); text(other.getText()); words(other.getWords()); + channel(other.getChannel()); speaker(other.getSpeaker()); return this; } @@ -253,6 +274,23 @@ public _FinalStage speaker(@NotNull String 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; + } + /** *

The words in the utterance.

* @return Reference to {@code this} so that method calls can be chained together. @@ -283,7 +321,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..fcb9ef32 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 @@ -29,6 +29,8 @@ public final class TranscriptWord { private final String text; + private final Optional channel; + private final Optional speaker; private final Map additionalProperties; @@ -38,38 +40,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 +116,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 @@ -130,6 +155,10 @@ public interface TextStage { public interface _FinalStage { TranscriptWord build(); + _FinalStage channel(Optional channel); + + _FinalStage channel(String channel); + _FinalStage speaker(Optional speaker); _FinalStage speaker(String speaker); @@ -147,6 +176,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 +189,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 +205,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 +216,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,6 +227,10 @@ 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) { @@ -191,7 +239,7 @@ public _FinalStage text(@NotNull String text) { } /** - *

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 +255,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); } } }