Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌿 Fern Regeneration -- November 7, 2024 #127

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = ListTranscriptParams.Builder.class)
public final class ListTranscriptParams {
private final Optional<Long> limit;
private final Optional<Integer> limit;

private final Optional<TranscriptStatus> status;

Expand All @@ -36,7 +36,7 @@ public final class ListTranscriptParams {
private final Map<String, Object> additionalProperties;

private ListTranscriptParams(
Optional<Long> limit,
Optional<Integer> limit,
Optional<TranscriptStatus> status,
Optional<String> createdOn,
Optional<String> beforeId,
Expand All @@ -56,7 +56,7 @@ private ListTranscriptParams(
* @return Maximum amount of transcripts to retrieve
*/
@JsonProperty("limit")
public Optional<Long> getLimit() {
public Optional<Integer> getLimit() {
return limit;
}

Expand Down Expand Up @@ -136,7 +136,7 @@ public static Builder builder() {

@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Builder {
private Optional<Long> limit = Optional.empty();
private Optional<Integer> limit = Optional.empty();

private Optional<TranscriptStatus> status = Optional.empty();

Expand Down Expand Up @@ -164,12 +164,12 @@ public Builder from(ListTranscriptParams other) {
}

@JsonSetter(value = "limit", nulls = Nulls.SKIP)
public Builder limit(Optional<Long> limit) {
public Builder limit(Optional<Integer> limit) {
this.limit = limit;
return this;
}

public Builder limit(Long limit) {
public Builder limit(Integer limit) {
this.limit = Optional.ofNullable(limit);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public final class TranscriptParams implements ITranscriptOptionalParams {

private final Optional<Boolean> disfluencies;

private final Optional<Boolean> multichannel;

private final Optional<Boolean> dualChannel;

private final Optional<String> webhookUrl;
Expand Down Expand Up @@ -118,6 +120,7 @@ private TranscriptParams(
Optional<Boolean> punctuate,
Optional<Boolean> formatText,
Optional<Boolean> disfluencies,
Optional<Boolean> multichannel,
Optional<Boolean> dualChannel,
Optional<String> webhookUrl,
Optional<String> webhookAuthHeaderName,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -250,6 +254,15 @@ public Optional<Boolean> getDisfluencies() {
return disfluencies;
}

/**
* @return Enable <a href="https://www.assemblyai.com/docs/models/speech-recognition#multichannel-transcription">Multichannel</a> transcription, can be true or false.
*/
@JsonProperty("multichannel")
@java.lang.Override
public Optional<Boolean> getMultichannel() {
return multichannel;
}

/**
* @return Enable <a href="https://www.assemblyai.com/docs/models/speech-recognition#dual-channel-transcription">Dual Channel</a> transcription, can be true or false.
*/
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -590,6 +604,7 @@ public int hashCode() {
this.punctuate,
this.formatText,
this.disfluencies,
this.multichannel,
this.dualChannel,
this.webhookUrl,
this.webhookAuthHeaderName,
Expand Down Expand Up @@ -669,6 +684,10 @@ public interface _FinalStage {

_FinalStage disfluencies(Boolean disfluencies);

_FinalStage multichannel(Optional<Boolean> multichannel);

_FinalStage multichannel(Boolean multichannel);

_FinalStage dualChannel(Optional<Boolean> dualChannel);

_FinalStage dualChannel(Boolean dualChannel);
Expand Down Expand Up @@ -854,6 +873,8 @@ public static final class Builder implements AudioUrlStage, _FinalStage {

private Optional<Boolean> dualChannel = Optional.empty();

private Optional<Boolean> multichannel = Optional.empty();

private Optional<Boolean> disfluencies = Optional.empty();

private Optional<Boolean> formatText = Optional.empty();
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -1436,6 +1458,23 @@ public _FinalStage dualChannel(Optional<Boolean> dualChannel) {
return this;
}

/**
* <p>Enable <a href="https://www.assemblyai.com/docs/models/speech-recognition#multichannel-transcription">Multichannel</a> transcription, can be true or false.</p>
* @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<Boolean> multichannel) {
this.multichannel = multichannel;
return this;
}

/**
* <p>Transcribe Filler Words, like &quot;umm&quot;, in your media file; can be true or false</p>
* @return Reference to {@code this} so that method calls can be chained together.
Expand Down Expand Up @@ -1559,6 +1598,7 @@ public TranscriptParams build() {
punctuate,
formatText,
disfluencies,
multichannel,
dualChannel,
webhookUrl,
webhookAuthHeaderName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public AudioIntelligenceModelStatus getStatus() {
return status;
}

/**
* @return An array of results for the Content Moderation model
*/
@JsonProperty("results")
public List<ContentSafetyLabelResult> getResults() {
return results;
Expand Down Expand Up @@ -226,12 +229,20 @@ public _FinalStage summary(Map<String, Double> summary) {
return this;
}

/**
* <p>An array of results for the Content Moderation model</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage addAllResults(List<ContentSafetyLabelResult> results) {
this.results.addAll(results);
return this;
}

/**
* <p>An array of results for the Content Moderation model</p>
* @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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public interface ITranscriptOptionalParams {

Optional<Boolean> getDisfluencies();

Optional<Boolean> getMultichannel();

Optional<Boolean> getDualChannel();

Optional<String> getWebhookUrl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<TranscriptParagraph> getParagraphs() {
return paragraphs;
Expand Down Expand Up @@ -145,33 +157,53 @@ public Builder from(ParagraphsResponse other) {
return this;
}

/**
* <p>The unique identifier of your transcript</p>
* @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");
return this;
}

/**
* <p>The confidence score for the transcript</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
@JsonSetter("confidence")
public AudioDurationStage confidence(double confidence) {
this.confidence = confidence;
return this;
}

/**
* <p>The duration of the audio file in seconds</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
@JsonSetter("audio_duration")
public _FinalStage audioDuration(double audioDuration) {
this.audioDuration = audioDuration;
return this;
}

/**
* <p>An array of paragraphs in the transcript</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage addAllParagraphs(List<TranscriptParagraph> paragraphs) {
this.paragraphs.addAll(paragraphs);
return this;
}

/**
* <p>An array of paragraphs in the transcript</p>
* @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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<TranscriptSentence> getSentences() {
return sentences;
Expand Down Expand Up @@ -145,33 +157,53 @@ public Builder from(SentencesResponse other) {
return this;
}

/**
* <p>The unique identifier for the transcript</p>
* @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");
return this;
}

/**
* <p>The confidence score for the transcript</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
@JsonSetter("confidence")
public AudioDurationStage confidence(double confidence) {
this.confidence = confidence;
return this;
}

/**
* <p>The duration of the audio file in seconds</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
@JsonSetter("audio_duration")
public _FinalStage audioDuration(double audioDuration) {
this.audioDuration = audioDuration;
return this;
}

/**
* <p>An array of sentences in the transcript</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage addAllSentences(List<TranscriptSentence> sentences) {
this.sentences.addAll(sentences);
return this;
}

/**
* <p>An array of sentences in the transcript</p>
* @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);
Expand Down
Loading
Loading