Skip to content

Commit

Permalink
Merge pull request #109 from AssemblyAI/fern-bot/06-27-2024-1040AM
Browse files Browse the repository at this point in the history
🌿 Fern Regeneration -- June 27, 2024
  • Loading branch information
Swimburger committed Jun 27, 2024
2 parents 27de673 + 575b95a commit d3597fa
Show file tree
Hide file tree
Showing 8 changed files with 213 additions and 43 deletions.
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 = '1.2.0'
version = '1.2.1'
from components.java
pom {
scm {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.assemblyai.api.resources.realtime.types;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public final class Realtime {
public static final Realtime PCM_S16LE = new Realtime(Value.PCM_S16LE, "pcm_s16le");

public static final Realtime PCM_MULAW = new Realtime(Value.PCM_MULAW, "pcm_mulaw");

private final Value value;

private final String string;

Realtime(Value value, String string) {
this.value = value;
this.string = string;
}

public Value getEnumValue() {
return value;
}

@java.lang.Override
@JsonValue
public String toString() {
return this.string;
}

@java.lang.Override
public boolean equals(Object other) {
return (this == other) || (other instanceof Realtime && this.string.equals(((Realtime) other).string));
}

@java.lang.Override
public int hashCode() {
return this.string.hashCode();
}

public <T> T visit(Visitor<T> visitor) {
switch (value) {
case PCM_S16LE:
return visitor.visitPcmS16le();
case PCM_MULAW:
return visitor.visitPcmMulaw();
case UNKNOWN:
default:
return visitor.visitUnknown(string);
}
}

@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static Realtime valueOf(String value) {
switch (value) {
case "pcm_s16le":
return PCM_S16LE;
case "pcm_mulaw":
return PCM_MULAW;
default:
return new Realtime(Value.UNKNOWN, value);
}
}

public enum Value {
PCM_S16LE,

PCM_MULAW,

UNKNOWN
}

public interface Visitor<T> {
T visitPcmS16le();

T visitPcmMulaw();

T visitUnknown(String unknownType);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,14 @@ public Optional<SpeechModel> getSpeechModel() {
return speechModel;
}

/**
* @return The URL to which AssemblyAI send webhooks upon transcription completion
*/
@JsonProperty("webhook_url")
@java.lang.Override
public Optional<String> getWebhookUrl() {
return webhookUrl;
}

/**
* @return The header name which should be sent back with webhook calls
* @return The header name to be sent with the transcript completed or failed webhook requests
*/
@JsonProperty("webhook_auth_header_name")
@java.lang.Override
Expand All @@ -244,7 +241,7 @@ public Optional<String> getWebhookAuthHeaderName() {
}

/**
* @return Specify a header name and value to send back with a webhook call for added security
* @return The header value to send back with the transcript completed or failed webhook requests for added security
*/
@JsonProperty("webhook_auth_header_value")
@java.lang.Override
Expand Down Expand Up @@ -1374,7 +1371,7 @@ public _FinalStage autoHighlights(Optional<Boolean> autoHighlights) {
}

/**
* <p>Specify a header name and value to send back with a webhook call for added security</p>
* <p>The header value to send back with the transcript completed or failed webhook requests for added security</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand All @@ -1391,7 +1388,7 @@ public _FinalStage webhookAuthHeaderValue(Optional<String> webhookAuthHeaderValu
}

/**
* <p>The header name which should be sent back with webhook calls</p>
* <p>The header name to be sent with the transcript completed or failed webhook requests</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand All @@ -1407,10 +1404,6 @@ public _FinalStage webhookAuthHeaderName(Optional<String> webhookAuthHeaderName)
return this;
}

/**
* <p>The URL to which AssemblyAI send webhooks upon transcription completion</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage webhookUrl(String webhookUrl) {
this.webhookUrl = Optional.of(webhookUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public final class ParagraphsResponse {

private final double confidence;

private final double audioDuration;
private final int audioDuration;

private final List<TranscriptParagraph> paragraphs;

Expand All @@ -34,7 +34,7 @@ public final class ParagraphsResponse {
private ParagraphsResponse(
String id,
double confidence,
double audioDuration,
int audioDuration,
List<TranscriptParagraph> paragraphs,
Map<String, Object> additionalProperties) {
this.id = id;
Expand All @@ -55,7 +55,7 @@ public double getConfidence() {
}

@JsonProperty("audio_duration")
public double getAudioDuration() {
public int getAudioDuration() {
return audioDuration;
}

Expand Down Expand Up @@ -107,7 +107,7 @@ public interface ConfidenceStage {
}

public interface AudioDurationStage {
_FinalStage audioDuration(double audioDuration);
_FinalStage audioDuration(int audioDuration);
}

public interface _FinalStage {
Expand All @@ -126,7 +126,7 @@ public static final class Builder implements IdStage, ConfidenceStage, AudioDura

private double confidence;

private double audioDuration;
private int audioDuration;

private List<TranscriptParagraph> paragraphs = new ArrayList<>();

Expand Down Expand Up @@ -160,7 +160,7 @@ public AudioDurationStage confidence(double confidence) {

@java.lang.Override
@JsonSetter("audio_duration")
public _FinalStage audioDuration(double audioDuration) {
public _FinalStage audioDuration(int audioDuration) {
this.audioDuration = audioDuration;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public final class SentencesResponse {

private final double confidence;

private final double audioDuration;
private final int audioDuration;

private final List<TranscriptSentence> sentences;

Expand All @@ -34,7 +34,7 @@ public final class SentencesResponse {
private SentencesResponse(
String id,
double confidence,
double audioDuration,
int audioDuration,
List<TranscriptSentence> sentences,
Map<String, Object> additionalProperties) {
this.id = id;
Expand All @@ -55,7 +55,7 @@ public double getConfidence() {
}

@JsonProperty("audio_duration")
public double getAudioDuration() {
public int getAudioDuration() {
return audioDuration;
}

Expand Down Expand Up @@ -107,7 +107,7 @@ public interface ConfidenceStage {
}

public interface AudioDurationStage {
_FinalStage audioDuration(double audioDuration);
_FinalStage audioDuration(int audioDuration);
}

public interface _FinalStage {
Expand All @@ -126,7 +126,7 @@ public static final class Builder implements IdStage, ConfidenceStage, AudioDura

private double confidence;

private double audioDuration;
private int audioDuration;

private List<TranscriptSentence> sentences = new ArrayList<>();

Expand Down Expand Up @@ -160,7 +160,7 @@ public AudioDurationStage confidence(double confidence) {

@java.lang.Override
@JsonSetter("audio_duration")
public _FinalStage audioDuration(double audioDuration) {
public _FinalStage audioDuration(int audioDuration) {
this.audioDuration = audioDuration;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public final class Transcript {

private final Optional<Double> confidence;

private final Optional<Double> audioDuration;
private final Optional<Integer> audioDuration;

private final Optional<Boolean> punctuate;

Expand Down Expand Up @@ -146,7 +146,7 @@ private Transcript(
Optional<List<TranscriptWord>> words,
Optional<List<TranscriptUtterance>> utterances,
Optional<Double> confidence,
Optional<Double> audioDuration,
Optional<Integer> audioDuration,
Optional<Boolean> punctuate,
Optional<Boolean> formatText,
Optional<Boolean> dualChannel,
Expand Down Expand Up @@ -340,7 +340,7 @@ public Optional<Double> getConfidence() {
* @return The duration of this transcript object's media file, in seconds
*/
@JsonProperty("audio_duration")
public Optional<Double> getAudioDuration() {
public Optional<Integer> getAudioDuration() {
return audioDuration;
}

Expand Down Expand Up @@ -374,15 +374,17 @@ public Optional<SpeechModel> getSpeechModel() {
}

/**
* @return The URL to which we send webhooks upon transcription completion
* @return The URL to which we send webhook requests.
* We sends two different types of webhook requests.
* One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.
*/
@JsonProperty("webhook_url")
public Optional<String> getWebhookUrl() {
return webhookUrl;
}

/**
* @return The status code we received from your server when delivering your webhook, if a webhook URL was provided
* @return The status code we received from your server when delivering the transcript completed or failed webhook request, if a webhook URL was provided
*/
@JsonProperty("webhook_status_code")
public Optional<Integer> getWebhookStatusCode() {
Expand All @@ -398,7 +400,7 @@ public boolean getWebhookAuth() {
}

/**
* @return The header name which should be sent back with webhook calls
* @return The header name to be sent with the transcript completed or failed webhook requests
*/
@JsonProperty("webhook_auth_header_name")
public Optional<String> getWebhookAuthHeaderName() {
Expand Down Expand Up @@ -896,9 +898,9 @@ public interface _FinalStage {

_FinalStage confidence(Double confidence);

_FinalStage audioDuration(Optional<Double> audioDuration);
_FinalStage audioDuration(Optional<Integer> audioDuration);

_FinalStage audioDuration(Double audioDuration);
_FinalStage audioDuration(Integer audioDuration);

_FinalStage punctuate(Optional<Boolean> punctuate);

Expand Down Expand Up @@ -1177,7 +1179,7 @@ public static final class Builder

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

private Optional<Double> audioDuration = Optional.empty();
private Optional<Integer> audioDuration = Optional.empty();

private Optional<Double> confidence = Optional.empty();

Expand Down Expand Up @@ -1923,7 +1925,7 @@ public _FinalStage speedBoost(Optional<Boolean> speedBoost) {
}

/**
* <p>The header name which should be sent back with webhook calls</p>
* <p>The header name to be sent with the transcript completed or failed webhook requests</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand All @@ -1940,7 +1942,7 @@ public _FinalStage webhookAuthHeaderName(Optional<String> webhookAuthHeaderName)
}

/**
* <p>The status code we received from your server when delivering your webhook, if a webhook URL was provided</p>
* <p>The status code we received from your server when delivering the transcript completed or failed webhook request, if a webhook URL was provided</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand All @@ -1957,7 +1959,9 @@ public _FinalStage webhookStatusCode(Optional<Integer> webhookStatusCode) {
}

/**
* <p>The URL to which we send webhooks upon transcription completion</p>
* <p>The URL to which we send webhook requests.
* We sends two different types of webhook requests.
* One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand Down Expand Up @@ -2042,14 +2046,14 @@ public _FinalStage punctuate(Optional<Boolean> punctuate) {
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage audioDuration(Double audioDuration) {
public _FinalStage audioDuration(Integer audioDuration) {
this.audioDuration = Optional.of(audioDuration);
return this;
}

@java.lang.Override
@JsonSetter(value = "audio_duration", nulls = Nulls.SKIP)
public _FinalStage audioDuration(Optional<Double> audioDuration) {
public _FinalStage audioDuration(Optional<Integer> audioDuration) {
this.audioDuration = audioDuration;
return this;
}
Expand Down
Loading

0 comments on commit d3597fa

Please sign in to comment.