From 7744df2b3d676324027c74ed27483e7fad154942 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2026 08:47:37 +0000 Subject: [PATCH 1/2] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-java-sdk: 4.21.0 --- .fern/metadata.json | 8 +- .fern/replay.lock | 10 + .fernignore | 3 + .gitattributes | 1 + .../com/deepgram/AsyncDeepgramApiClient.java | 5 +- .../java/com/deepgram/DeepgramApiClient.java | 5 +- .../deepgram/core/OkHttpWebSocketFactory.java | 22 -- .../com/deepgram/core/RetryInterceptor.java | 66 +---- .../types/AgentV1CustomFromThinkProvider.java | 125 -------- .../types/AgentV1CustomToThinkProvider.java | 125 -------- .../agent/v1/websocket/V1WebSocketClient.java | 65 +---- .../listen/v1/types/ListenV1Configure.java | 165 ----------- .../listen/v1/types/ListenV1Error.java | 267 ------------------ .../v2/types/ListenV2ConfigureFailure.java | 100 +------ .../listen/v2/types/ListenV2Warning.java | 247 ---------------- .../v2/audio/requests/SpeakV2Request.java | 14 +- .../v2/types/SpeakV2ConfigureFailure.java | 6 +- .../v2/types/SpeakV2ConfigureFailureCode.java | 11 - .../speak/v2/types/SpeakV2Error.java | 6 +- .../speak/v2/types/SpeakV2Speak.java | 6 +- .../SpeakV2SpeechInterruptedMetadata.java | 6 +- ...echInterruptedMetadataControlsApplied.java | 18 +- .../speak/v2/types/SpeakV2SpeechMetadata.java | 6 +- .../SpeakV2SpeechMetadataControlsApplied.java | 18 +- .../speak/v2/types/SpeakV2Warning.java | 9 +- .../com/deepgram/types/SharedIntents.java | 34 ++- .../deepgram/types/SharedIntentsResults.java | 106 +++++++ .../types/SharedIntentsResultsIntents.java | 108 +++++++ ...redIntentsResultsIntentsSegmentsItem.java} | 29 +- ...esultsIntentsSegmentsItemIntentsItem.java} | 19 +- .../java/com/deepgram/types/SharedTopics.java | 33 ++- .../deepgram/types/SharedTopicsResults.java | 105 +++++++ .../types/SharedTopicsResultsTopics.java | 107 +++++++ ...haredTopicsResultsTopicsSegmentsItem.java} | 29 +- ...sResultsTopicsSegmentsItemTopicsItem.java} | 18 +- 35 files changed, 585 insertions(+), 1317 deletions(-) create mode 100644 .fern/replay.lock create mode 100644 .gitattributes delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1CustomFromThinkProvider.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1CustomToThinkProvider.java delete mode 100644 src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Configure.java delete mode 100644 src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Error.java delete mode 100644 src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Warning.java create mode 100644 src/main/java/com/deepgram/types/SharedIntentsResults.java create mode 100644 src/main/java/com/deepgram/types/SharedIntentsResultsIntents.java rename src/main/java/com/deepgram/types/{SharedIntentsSegmentsItem.java => SharedIntentsResultsIntentsSegmentsItem.java} (78%) rename src/main/java/com/deepgram/types/{SharedIntentsSegmentsItemIntentsItem.java => SharedIntentsResultsIntentsSegmentsItemIntentsItem.java} (81%) create mode 100644 src/main/java/com/deepgram/types/SharedTopicsResults.java create mode 100644 src/main/java/com/deepgram/types/SharedTopicsResultsTopics.java rename src/main/java/com/deepgram/types/{SharedTopicsSegmentsItem.java => SharedTopicsResultsTopicsSegmentsItem.java} (78%) rename src/main/java/com/deepgram/types/{SharedTopicsSegmentsItemTopicsItem.java => SharedTopicsResultsTopicsSegmentsItemTopicsItem.java} (82%) diff --git a/.fern/metadata.json b/.fern/metadata.json index 1955a2a0..65cffab0 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { "cliVersion": "5.95.1", "generatorName": "fernapi/fern-java-sdk", - "generatorVersion": "4.23.1", + "generatorVersion": "4.21.0", "generatorConfig": { "package-prefix": "com.deepgram", "base-api-exception-class-name": "DeepgramHttpException", @@ -12,8 +12,8 @@ "enable-wire-tests": true, "runtime-version": true }, - "originGitCommit": "9dcbd3d5e8d36420319e1b33988613ad2cb2be10", + "originGitCommit": "97e7b8ba56fdf31596232836ed4849148d72813e", "originGitCommitIsDirty": true, "invokedBy": "manual", - "sdkVersion": "0.11.1" -} + "sdkVersion": "0.11.2" +} \ No newline at end of file diff --git a/.fern/replay.lock b/.fern/replay.lock new file mode 100644 index 00000000..e177a1a1 --- /dev/null +++ b/.fern/replay.lock @@ -0,0 +1,10 @@ +# DO NOT EDIT MANUALLY - Managed by Fern Replay +version: "1.0" +generations: + - commit_sha: 98aa2f98e1732514ae1861bb9ccdf3920fe632e8 + tree_hash: 007f7a507a64b6bf5089c6562727dfb18b1316b2 + timestamp: 2026-10-14T08:47:04.353Z + cli_version: unknown + generator_versions: {} +current_generation: 98aa2f98e1732514ae1861bb9ccdf3920fe632e8 +patches: [] diff --git a/.fernignore b/.fernignore index aacb4e35..88758100 100644 --- a/.fernignore +++ b/.fernignore @@ -141,3 +141,6 @@ CLAUDE.md AGENTS.md .claude/ .agents/ +.fern/replay.lock +.fern/replay.yml +.gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..74928d6a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.fern/replay.lock linguist-generated=true diff --git a/src/main/java/com/deepgram/AsyncDeepgramApiClient.java b/src/main/java/com/deepgram/AsyncDeepgramApiClient.java index 0ae6c114..c2aa87ee 100644 --- a/src/main/java/com/deepgram/AsyncDeepgramApiClient.java +++ b/src/main/java/com/deepgram/AsyncDeepgramApiClient.java @@ -79,9 +79,8 @@ public AsyncVoiceAgentClient voiceAgent() { } /** - * Releases resources owned by this client: any WebSocket clients still connected through - * it are disconnected first, then the SDK-owned HTTP client is shut down. See - * {@code ClientOptions.close()} for what is and is not released. + * Releases resources owned by this client. See {@code ClientOptions.close()} for what is + * and is not released. */ @Override public void close() { diff --git a/src/main/java/com/deepgram/DeepgramApiClient.java b/src/main/java/com/deepgram/DeepgramApiClient.java index a67528ff..ccb0d4a7 100644 --- a/src/main/java/com/deepgram/DeepgramApiClient.java +++ b/src/main/java/com/deepgram/DeepgramApiClient.java @@ -79,9 +79,8 @@ public VoiceAgentClient voiceAgent() { } /** - * Releases resources owned by this client: any WebSocket clients still connected through - * it are disconnected first, then the SDK-owned HTTP client is shut down. See - * {@code ClientOptions.close()} for what is and is not released. + * Releases resources owned by this client. See {@code ClientOptions.close()} for what is + * and is not released. */ @Override public void close() { diff --git a/src/main/java/com/deepgram/core/OkHttpWebSocketFactory.java b/src/main/java/com/deepgram/core/OkHttpWebSocketFactory.java index 30653bcf..70e6c868 100644 --- a/src/main/java/com/deepgram/core/OkHttpWebSocketFactory.java +++ b/src/main/java/com/deepgram/core/OkHttpWebSocketFactory.java @@ -3,7 +3,6 @@ */ package com.deepgram.core; -import java.util.function.BooleanSupplier; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.WebSocket; @@ -16,38 +15,17 @@ public final class OkHttpWebSocketFactory implements WebSocketFactory { private final OkHttpClient okHttpClient; - private final BooleanSupplier closedCheck; - /** * Creates a new OkHttpWebSocketFactory with the specified OkHttpClient. * * @param okHttpClient The OkHttpClient instance to use for creating WebSockets */ public OkHttpWebSocketFactory(OkHttpClient okHttpClient) { - this(okHttpClient, () -> false); - } - - /** - * Creates a new OkHttpWebSocketFactory that refuses to open WebSockets once the owning - * client has been closed. - * - * @param okHttpClient The OkHttpClient instance to use for creating WebSockets - * @param closedCheck Returns true once the owning client has been closed (e.g. - * {@code clientOptions::isClosed}) - */ - public OkHttpWebSocketFactory(OkHttpClient okHttpClient, BooleanSupplier closedCheck) { this.okHttpClient = okHttpClient; - this.closedCheck = closedCheck; } - /** - * @throws IllegalStateException if the owning client has been closed - */ @Override public WebSocket create(Request request, WebSocketListener listener) { - if (closedCheck.getAsBoolean()) { - throw new IllegalStateException("root client has been closed"); - } return okHttpClient.newWebSocket(request, listener); } } diff --git a/src/main/java/com/deepgram/core/RetryInterceptor.java b/src/main/java/com/deepgram/core/RetryInterceptor.java index aad032cd..a0959bbc 100644 --- a/src/main/java/com/deepgram/core/RetryInterceptor.java +++ b/src/main/java/com/deepgram/core/RetryInterceptor.java @@ -10,13 +10,9 @@ import java.time.format.DateTimeParseException; import java.util.Optional; import java.util.Random; -import okhttp3.Call; import okhttp3.Interceptor; import okhttp3.Request; import okhttp3.Response; -import okhttp3.ResponseBody; -import okio.AsyncTimeout; -import okio.Timeout; public class RetryInterceptor implements Interceptor { @@ -82,28 +78,13 @@ private Response retryChain(Response response, Chain chain, int maxRetries) thro ExponentialBackoff backoff = new ExponentialBackoff(maxRetries); Optional nextBackoff = backoff.nextBackoff(response); while (nextBackoff.isPresent()) { - response = bufferResponse(response); - Optional callTimeout = suspendCallTimeout(chain); try { Thread.sleep(nextBackoff.get().toMillis()); } catch (InterruptedException e) { - response.close(); throw new IOException("Interrupted while trying request", e); - } finally { - callTimeout.ifPresent(AsyncTimeout::enter); - } - Response nextResponse; - try { - nextResponse = chain.proceed(chain.request()); - } catch (IOException e) { - // A retry attempt failed with a transport error (connection reset, unreachable host, ...). The - // error is intentionally dropped: the response already received from the API is more actionable. - // Note that a call-timeout expiry or an explicit cancel() also ends up here, but OkHttp then - // discards whatever the interceptor chain returns and reports the cancellation itself. - return response; } response.close(); - response = nextResponse; + response = chain.proceed(chain.request()); if (shouldRetry(response.code())) { nextBackoff = backoff.nextBackoff(response); } else { @@ -114,51 +95,6 @@ private Response retryChain(Response response, Chain chain, int maxRetries) thro return response; } - /** - * Pauses the OkHttp call timeout so that it applies to each attempt individually rather than to the whole - * retry loop: the backoff wait (e.g. a {@code Retry-After} the size of the call timeout) does not consume the - * budget of the next attempt, and each attempt starts with a fresh budget once {@link AsyncTimeout#enter()} - * is called again. - * - *

{@link AsyncTimeout#exit()} and {@link AsyncTimeout#enter()} must stay strictly paired: {@code exit()} on - * a timeout that is not armed is a no-op, but {@code enter()} on one that is already armed throws - * {@code IllegalStateException}. Every caller must re-enter the returned timeout exactly once, on all paths. - */ - private static Optional suspendCallTimeout(Chain chain) { - Call call = chain.call(); - if (call == null) { - return Optional.empty(); - } - Timeout timeout = call.timeout(); - if (!(timeout instanceof AsyncTimeout)) { - return Optional.empty(); - } - AsyncTimeout callTimeout = (AsyncTimeout) timeout; - callTimeout.exit(); - return Optional.of(callTimeout); - } - - /** - * Reads the body into memory so the response stays usable after the underlying connection - * is released or cancelled by a later attempt. - */ - private static Response bufferResponse(Response response) { - ResponseBody body = response.body(); - if (body == null) { - return response; - } - try { - byte[] bytes = body.bytes(); - Response buffered = response.newBuilder() - .body(ResponseBody.create(bytes, body.contentType())) - .build(); - response.close(); - return buffered; - } catch (IOException e) { - return response; - } - } - /** * Calculates the retry delay from response headers, with fallback to exponential backoff. * Priority: Retry-After > X-RateLimit-Reset > Exponential Backoff diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1CustomFromThinkProvider.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1CustomFromThinkProvider.java deleted file mode 100644 index 777078ce..00000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1CustomFromThinkProvider.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.deepgram.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AgentV1CustomFromThinkProvider.Builder.class) -public final class AgentV1CustomFromThinkProvider { - private final Object content; - - private final Map additionalProperties; - - private AgentV1CustomFromThinkProvider(Object content, Map additionalProperties) { - this.content = content; - this.additionalProperties = additionalProperties; - } - - /** - * @return Message type identifier for a custom payload returned by the think provider - */ - @JsonProperty("type") - public String getType() { - return "__customFromThinkProvider"; - } - - @JsonProperty("content") - public Object getContent() { - return content; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1CustomFromThinkProvider && equalTo((AgentV1CustomFromThinkProvider) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1CustomFromThinkProvider other) { - return content.equals(other.content); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.content); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ContentStage builder() { - return new Builder(); - } - - public interface ContentStage { - _FinalStage content(Object content); - - Builder from(AgentV1CustomFromThinkProvider other); - } - - public interface _FinalStage { - AgentV1CustomFromThinkProvider build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ContentStage, _FinalStage { - private Object content; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1CustomFromThinkProvider other) { - content(other.getContent()); - return this; - } - - @java.lang.Override - @JsonSetter("content") - public _FinalStage content(Object content) { - this.content = content; - return this; - } - - @java.lang.Override - public AgentV1CustomFromThinkProvider build() { - return new AgentV1CustomFromThinkProvider(content, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1CustomToThinkProvider.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1CustomToThinkProvider.java deleted file mode 100644 index 5dc5b4b1..00000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1CustomToThinkProvider.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.deepgram.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AgentV1CustomToThinkProvider.Builder.class) -public final class AgentV1CustomToThinkProvider { - private final Object content; - - private final Map additionalProperties; - - private AgentV1CustomToThinkProvider(Object content, Map additionalProperties) { - this.content = content; - this.additionalProperties = additionalProperties; - } - - /** - * @return Message type identifier for sending a custom payload to the think provider - */ - @JsonProperty("type") - public String getType() { - return "__customToThinkProvider"; - } - - @JsonProperty("content") - public Object getContent() { - return content; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1CustomToThinkProvider && equalTo((AgentV1CustomToThinkProvider) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1CustomToThinkProvider other) { - return content.equals(other.content); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.content); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ContentStage builder() { - return new Builder(); - } - - public interface ContentStage { - _FinalStage content(Object content); - - Builder from(AgentV1CustomToThinkProvider other); - } - - public interface _FinalStage { - AgentV1CustomToThinkProvider build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ContentStage, _FinalStage { - private Object content; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1CustomToThinkProvider other) { - content(other.getContent()); - return this; - } - - @java.lang.Override - @JsonSetter("content") - public _FinalStage content(Object content) { - this.content = content; - return this; - } - - @java.lang.Override - public AgentV1CustomToThinkProvider build() { - return new AgentV1CustomToThinkProvider(content, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/websocket/V1WebSocketClient.java b/src/main/java/com/deepgram/resources/agent/v1/websocket/V1WebSocketClient.java index 1aa1b9d4..1a5c224b 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/websocket/V1WebSocketClient.java +++ b/src/main/java/com/deepgram/resources/agent/v1/websocket/V1WebSocketClient.java @@ -13,8 +13,6 @@ import com.deepgram.resources.agent.v1.types.AgentV1AgentStartedSpeaking; import com.deepgram.resources.agent.v1.types.AgentV1AgentThinking; import com.deepgram.resources.agent.v1.types.AgentV1ConversationText; -import com.deepgram.resources.agent.v1.types.AgentV1CustomFromThinkProvider; -import com.deepgram.resources.agent.v1.types.AgentV1CustomToThinkProvider; import com.deepgram.resources.agent.v1.types.AgentV1Error; import com.deepgram.resources.agent.v1.types.AgentV1ForceEndTurn; import com.deepgram.resources.agent.v1.types.AgentV1FunctionCallCancelled; @@ -113,8 +111,6 @@ public class V1WebSocketClient implements AutoCloseable { private volatile Consumer agentAudioDoneHandler; - private volatile Consumer customFromThinkProviderHandler; - private volatile Consumer errorHandler; private volatile Consumer warningHandler; @@ -164,22 +160,13 @@ public CompletableFuture connect() { ? this.reconnectOptions : ReconnectingWebSocketListener.ReconnectOptions.builder().build(); this.reconnectingListener = - new ReconnectingWebSocketListener( - reconnectOpts, - () -> { - if (clientOptions.isClosed()) { - throw new IllegalStateException("root client has been closed"); - } - if (clientOptions.webSocketFactory().isPresent()) { - return clientOptions - .webSocketFactory() - .get() - .create(request, this.reconnectingListener); - } else { - return okHttpClient.newWebSocket(request, this.reconnectingListener); - } - }, - clientOptions::isClosed) { + new ReconnectingWebSocketListener(reconnectOpts, () -> { + if (clientOptions.webSocketFactory().isPresent()) { + return clientOptions.webSocketFactory().get().create(request, this.reconnectingListener); + } else { + return okHttpClient.newWebSocket(request, this.reconnectingListener); + } + }) { @Override protected void onWebSocketOpen(WebSocket webSocket, Response response) { readyState = WebSocketReadyState.OPEN; @@ -218,7 +205,6 @@ protected void onWebSocketClosed(WebSocket webSocket, int code, String reason) { } } }; - clientOptions.registerWebSocket(this); reconnectingListener.connect(); return connectionFuture; } @@ -227,10 +213,7 @@ protected void onWebSocketClosed(WebSocket webSocket, int code, String reason) { * Disconnects the WebSocket connection and releases resources. */ public void disconnect() { - clientOptions.unregisterWebSocket(this); - if (reconnectingListener != null) { - reconnectingListener.disconnect(); - } + reconnectingListener.disconnect(); if (timeoutExecutor != null) { timeoutExecutor.shutdownNow(); timeoutExecutor = null; @@ -338,15 +321,6 @@ public CompletableFuture sendForceEndTurn(AgentV1ForceEndTurn message) { return sendMessage(message); } - /** - * Sends an AgentV1CustomToThinkProvider message to the server asynchronously. - * @param message the message to send - * @return a CompletableFuture that completes when the message is sent - */ - public CompletableFuture sendCustomToThinkProvider(AgentV1CustomToThinkProvider message) { - return sendMessage(message); - } - /** * Sends an AgentV1Media message to the server asynchronously. * @param message the message to send @@ -493,14 +467,6 @@ public void onAgentAudioDone(Consumer handler) { this.agentAudioDoneHandler = handler; } - /** - * Registers a handler for AgentV1CustomFromThinkProvider messages from the server. - * @param handler the handler to invoke when a message is received - */ - public void onCustomFromThinkProvider(Consumer handler) { - this.customFromThinkProviderHandler = handler; - } - /** * Registers a handler for AgentV1Error messages from the server. * @param handler the handler to invoke when a message is received @@ -769,21 +735,6 @@ private void handleIncomingMessage(String json) { return; } } - if (node.has("content") - && "__customFromThinkProvider".equals(node.path("type").asText())) { - AgentV1CustomFromThinkProvider customFromThinkProviderHandlerEvent = null; - try { - customFromThinkProviderHandlerEvent = - objectMapper.treeToValue(node, AgentV1CustomFromThinkProvider.class); - } catch (Exception e) { - } - if (customFromThinkProviderHandlerEvent != null) { - if (customFromThinkProviderHandler != null) { - customFromThinkProviderHandler.accept(customFromThinkProviderHandlerEvent); - } - return; - } - } if ("ListenUpdated".equals(node.path("type").asText())) { AgentV1ListenUpdated listenUpdatedHandlerEvent = null; try { diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Configure.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Configure.java deleted file mode 100644 index 967d27e9..00000000 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Configure.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.listen.v1.types; - -import com.deepgram.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListenV1Configure.Builder.class) -public final class ListenV1Configure { - private final Optional> keyterms; - - private final Optional> features; - - private final Map additionalProperties; - - private ListenV1Configure( - Optional> keyterms, - Optional> features, - Map additionalProperties) { - this.keyterms = keyterms; - this.features = features; - this.additionalProperties = additionalProperties; - } - - /** - * @return Message type identifier - */ - @JsonProperty("type") - public String getType() { - return "Configure"; - } - - /** - * @return Replaces the stream's keyterms. Compatible with all Nova-3 models, monolingual and multilingual; on other - * models the server returns an Error with code KeytermsNotSupported. Each array replaces the entire list, - * including keyterms set with the keyterm query parameter. Send an empty array to clear all keyterms. Omit - * the field, or set it to null, to keep the current keyterms. - *

Each entry is a plain term or phrase with no weights or intensifiers. The 500-token keyterm limit that - * applies to the keyterm query parameter also applies to each update. An over-limit update returns an - * Error, and the stream keeps its previous keyterms.

- */ - @JsonProperty("keyterms") - public Optional> getKeyterms() { - return keyterms; - } - - /** - * @return Turns formatting features on or off. Each key is a feature name and each value is a boolean, for - * example {"numerals": true}. - */ - @JsonProperty("features") - public Optional> getFeatures() { - return features; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListenV1Configure && equalTo((ListenV1Configure) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListenV1Configure other) { - return keyterms.equals(other.keyterms) && features.equals(other.features); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.keyterms, this.features); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional> keyterms = Optional.empty(); - - private Optional> features = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListenV1Configure other) { - keyterms(other.getKeyterms()); - features(other.getFeatures()); - return this; - } - - /** - *

Replaces the stream's keyterms. Compatible with all Nova-3 models, monolingual and multilingual; on other - * models the server returns an Error with code KeytermsNotSupported. Each array replaces the entire list, - * including keyterms set with the keyterm query parameter. Send an empty array to clear all keyterms. Omit - * the field, or set it to null, to keep the current keyterms.

- *

Each entry is a plain term or phrase with no weights or intensifiers. The 500-token keyterm limit that - * applies to the keyterm query parameter also applies to each update. An over-limit update returns an - * Error, and the stream keeps its previous keyterms.

- */ - @JsonSetter(value = "keyterms", nulls = Nulls.SKIP) - public Builder keyterms(Optional> keyterms) { - this.keyterms = keyterms; - return this; - } - - public Builder keyterms(List keyterms) { - this.keyterms = Optional.ofNullable(keyterms); - return this; - } - - /** - *

Turns formatting features on or off. Each key is a feature name and each value is a boolean, for - * example {"numerals": true}.

- */ - @JsonSetter(value = "features", nulls = Nulls.SKIP) - public Builder features(Optional> features) { - this.features = features; - return this; - } - - public Builder features(Map features) { - this.features = Optional.ofNullable(features); - return this; - } - - public ListenV1Configure build() { - return new ListenV1Configure(keyterms, features, additionalProperties); - } - - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Error.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Error.java deleted file mode 100644 index fd0a4e0c..00000000 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Error.java +++ /dev/null @@ -1,267 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.listen.v1.types; - -import com.deepgram.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListenV1Error.Builder.class) -public final class ListenV1Error { - private final String variant; - - private final String description; - - private final Optional code; - - private final Optional message; - - private final Map additionalProperties; - - private ListenV1Error( - String variant, - String description, - Optional code, - Optional message, - Map additionalProperties) { - this.variant = variant; - this.description = description; - this.code = code; - this.message = message; - this.additionalProperties = additionalProperties; - } - - /** - * @return Message type identifier for error responses - */ - @JsonProperty("type") - public String getType() { - return "Error"; - } - - /** - * @return The error category. SchemaError means the server could not parse a client text message. - * InvalidConfigureMessage means the server rejected a Configure message. - */ - @JsonProperty("variant") - public String getVariant() { - return variant; - } - - /** - * @return A human-readable description of what went wrong - */ - @JsonProperty("description") - public String getDescription() { - return description; - } - - /** - * @return Identifies the reason for an InvalidConfigureMessage error, for example KeytermsNotSupported - * when keyterms are sent on a model other than Nova-3. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return For SchemaError, the original client message that could not be parsed - */ - @JsonProperty("message") - public Optional getMessage() { - return message; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListenV1Error && equalTo((ListenV1Error) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListenV1Error other) { - return variant.equals(other.variant) - && description.equals(other.description) - && code.equals(other.code) - && message.equals(other.message); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.variant, this.description, this.code, this.message); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static VariantStage builder() { - return new Builder(); - } - - public interface VariantStage { - /** - *

The error category. SchemaError means the server could not parse a client text message. - * InvalidConfigureMessage means the server rejected a Configure message.

- */ - DescriptionStage variant(@NotNull String variant); - - Builder from(ListenV1Error other); - } - - public interface DescriptionStage { - /** - *

A human-readable description of what went wrong

- */ - _FinalStage description(@NotNull String description); - } - - public interface _FinalStage { - ListenV1Error build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Identifies the reason for an InvalidConfigureMessage error, for example KeytermsNotSupported - * when keyterms are sent on a model other than Nova-3.

- */ - _FinalStage code(Optional code); - - _FinalStage code(String code); - - /** - *

For SchemaError, the original client message that could not be parsed

- */ - _FinalStage message(Optional message); - - _FinalStage message(String message); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements VariantStage, DescriptionStage, _FinalStage { - private String variant; - - private String description; - - private Optional message = Optional.empty(); - - private Optional code = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ListenV1Error other) { - variant(other.getVariant()); - description(other.getDescription()); - code(other.getCode()); - message(other.getMessage()); - return this; - } - - /** - *

The error category. SchemaError means the server could not parse a client text message. - * InvalidConfigureMessage means the server rejected a Configure message.

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

A human-readable description of what went wrong

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

For SchemaError, the original client message that could not be parsed

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage message(String message) { - this.message = Optional.ofNullable(message); - return this; - } - - /** - *

For SchemaError, the original client message that could not be parsed

- */ - @java.lang.Override - @JsonSetter(value = "message", nulls = Nulls.SKIP) - public _FinalStage message(Optional message) { - this.message = message; - return this; - } - - /** - *

Identifies the reason for an InvalidConfigureMessage error, for example KeytermsNotSupported - * when keyterms are sent on a model other than Nova-3.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

Identifies the reason for an InvalidConfigureMessage error, for example KeytermsNotSupported - * when keyterms are sent on a model other than Nova-3.

- */ - @java.lang.Override - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public _FinalStage code(Optional code) { - this.code = code; - return this; - } - - @java.lang.Override - public ListenV1Error build() { - return new ListenV1Error(variant, description, code, message, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureFailure.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureFailure.java index a48faaca..478307b8 100644 --- a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureFailure.java +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureFailure.java @@ -10,12 +10,10 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; import java.util.Map; import java.util.Objects; -import java.util.Optional; import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @@ -25,22 +23,11 @@ public final class ListenV2ConfigureFailure { private final int sequenceId; - private final Optional code; - - private final Optional description; - private final Map additionalProperties; - private ListenV2ConfigureFailure( - String requestId, - int sequenceId, - Optional code, - Optional description, - Map additionalProperties) { + private ListenV2ConfigureFailure(String requestId, int sequenceId, Map additionalProperties) { this.requestId = requestId; this.sequenceId = sequenceId; - this.code = code; - this.description = description; this.additionalProperties = additionalProperties; } @@ -70,22 +57,6 @@ public int getSequenceId() { return sequenceId; } - /** - * @return Failure code identifying the rejected configuration - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return A human-readable description of the configuration failure - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -98,15 +69,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(ListenV2ConfigureFailure other) { - return requestId.equals(other.requestId) - && sequenceId == other.sequenceId - && code.equals(other.code) - && description.equals(other.description); + return requestId.equals(other.requestId) && sequenceId == other.sequenceId; } @java.lang.Override public int hashCode() { - return Objects.hash(this.requestId, this.sequenceId, this.code, this.description); + return Objects.hash(this.requestId, this.sequenceId); } @java.lang.Override @@ -142,20 +110,6 @@ public interface _FinalStage { _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Failure code identifying the rejected configuration

- */ - _FinalStage code(Optional code); - - _FinalStage code(String code); - - /** - *

A human-readable description of the configuration failure

- */ - _FinalStage description(Optional description); - - _FinalStage description(String description); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -164,10 +118,6 @@ public static final class Builder implements RequestIdStage, SequenceIdStage, _F private int sequenceId; - private Optional description = Optional.empty(); - - private Optional code = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -177,8 +127,6 @@ private Builder() {} public Builder from(ListenV2ConfigureFailure other) { requestId(other.getRequestId()); sequenceId(other.getSequenceId()); - code(other.getCode()); - description(other.getDescription()); return this; } @@ -206,49 +154,9 @@ public _FinalStage sequenceId(int sequenceId) { return this; } - /** - *

A human-readable description of the configuration failure

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage description(String description) { - this.description = Optional.ofNullable(description); - return this; - } - - /** - *

A human-readable description of the configuration failure

- */ - @java.lang.Override - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; - return this; - } - - /** - *

Failure code identifying the rejected configuration

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

Failure code identifying the rejected configuration

- */ - @java.lang.Override - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public _FinalStage code(Optional code) { - this.code = code; - return this; - } - @java.lang.Override public ListenV2ConfigureFailure build() { - return new ListenV2ConfigureFailure(requestId, sequenceId, code, description, additionalProperties); + return new ListenV2ConfigureFailure(requestId, sequenceId, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Warning.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Warning.java deleted file mode 100644 index 4eed2fb7..00000000 --- a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Warning.java +++ /dev/null @@ -1,247 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.listen.v2.types; - -import com.deepgram.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListenV2Warning.Builder.class) -public final class ListenV2Warning { - private final String requestId; - - private final int sequenceId; - - private final String code; - - private final String description; - - private final Map additionalProperties; - - private ListenV2Warning( - String requestId, - int sequenceId, - String code, - String description, - Map additionalProperties) { - this.requestId = requestId; - this.sequenceId = sequenceId; - this.code = code; - this.description = description; - this.additionalProperties = additionalProperties; - } - - /** - * @return Message type identifier - */ - @JsonProperty("type") - public String getType() { - return "Warning"; - } - - /** - * @return The unique identifier of the request - */ - @JsonProperty("request_id") - public String getRequestId() { - return requestId; - } - - /** - * @return Starts at 0 and increments for each message the server sends - * to the client. This includes messages of other types, like - * TurnInfo messages. - */ - @JsonProperty("sequence_id") - public int getSequenceId() { - return sequenceId; - } - - /** - * @return Warning code identifying the condition, in SCREAMING_SNAKE_CASE - */ - @JsonProperty("code") - public String getCode() { - return code; - } - - /** - * @return A human-readable description of the warning - */ - @JsonProperty("description") - public String getDescription() { - return description; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListenV2Warning && equalTo((ListenV2Warning) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListenV2Warning other) { - return requestId.equals(other.requestId) - && sequenceId == other.sequenceId - && code.equals(other.code) - && description.equals(other.description); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.requestId, this.sequenceId, this.code, this.description); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static RequestIdStage builder() { - return new Builder(); - } - - public interface RequestIdStage { - /** - *

The unique identifier of the request

- */ - SequenceIdStage requestId(@NotNull String requestId); - - Builder from(ListenV2Warning other); - } - - public interface SequenceIdStage { - /** - *

Starts at 0 and increments for each message the server sends - * to the client. This includes messages of other types, like - * TurnInfo messages.

- */ - CodeStage sequenceId(int sequenceId); - } - - public interface CodeStage { - /** - *

Warning code identifying the condition, in SCREAMING_SNAKE_CASE

- */ - DescriptionStage code(@NotNull String code); - } - - public interface DescriptionStage { - /** - *

A human-readable description of the warning

- */ - _FinalStage description(@NotNull String description); - } - - public interface _FinalStage { - ListenV2Warning build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements RequestIdStage, SequenceIdStage, CodeStage, DescriptionStage, _FinalStage { - private String requestId; - - private int sequenceId; - - private String code; - - private String description; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ListenV2Warning other) { - requestId(other.getRequestId()); - sequenceId(other.getSequenceId()); - code(other.getCode()); - description(other.getDescription()); - return this; - } - - /** - *

The unique identifier of the request

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

Starts at 0 and increments for each message the server sends - * to the client. This includes messages of other types, like - * TurnInfo messages.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("sequence_id") - public CodeStage sequenceId(int sequenceId) { - this.sequenceId = sequenceId; - return this; - } - - /** - *

Warning code identifying the condition, in SCREAMING_SNAKE_CASE

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

A human-readable description of the warning

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("description") - public _FinalStage description(@NotNull String description) { - this.description = Objects.requireNonNull(description, "description must not be null"); - return this; - } - - @java.lang.Override - public ListenV2Warning build() { - return new ListenV2Warning(requestId, sequenceId, code, description, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/com/deepgram/resources/speak/v2/audio/requests/SpeakV2Request.java b/src/main/java/com/deepgram/resources/speak/v2/audio/requests/SpeakV2Request.java index d1a3d823..bc3fb63e 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/audio/requests/SpeakV2Request.java +++ b/src/main/java/com/deepgram/resources/speak/v2/audio/requests/SpeakV2Request.java @@ -167,7 +167,7 @@ public Optional getSampleRate() { } /** - * @return Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Accepted values run 0.5 to 1.5 in 0.05 increments. Not yet supported in all languages. When the text contains an inline pause marker, speed is capped at 1.15 (PAUSE_SPEED_CAP_EXCEEDED above that). A value other than 1.0 cannot be combined with inline pronunciation controls (CONTROL_COMBINATION_INVALID). + * @return Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Accepted values run 0.5 to 1.5 in 0.05 increments. Not yet supported in all languages. */ @JsonIgnore public Optional getSpeed() { @@ -183,7 +183,7 @@ public Optional getPriority() { } /** - * @return The text content to be converted to speech. The server normalizes and preprocesses the text before synthesis. May contain inline pause controls (\{pause:500ms\}, 500-3000 ms in 100 ms steps, at most 8 per request) and inline pronunciation controls (\{"word": "...", "pronounce": "<IPA>"\}, Early Access). Pronunciation cannot be combined with pause or with a speed other than 1.0, and speed is capped at 1.15 when a pause is present. See Speed, Pause, Pronunciation. + * @return The text content to be converted to speech. The server normalizes and preprocesses the text before synthesis. Inline pause and pronunciation controls are not yet applied; they are stripped from the text before synthesis. */ @JsonProperty("text") public String getText() { @@ -255,7 +255,7 @@ public interface ModelStage { public interface TextStage { /** - *

The text content to be converted to speech. The server normalizes and preprocesses the text before synthesis. May contain inline pause controls (\{pause:500ms\}, 500-3000 ms in 100 ms steps, at most 8 per request) and inline pronunciation controls (\{"word": "...", "pronounce": "<IPA>"\}, Early Access). Pronunciation cannot be combined with pause or with a speed other than 1.0, and speed is capped at 1.15 when a pause is present. See Speed, Pause, Pronunciation.

+ *

The text content to be converted to speech. The server normalizes and preprocesses the text before synthesis. Inline pause and pronunciation controls are not yet applied; they are stripped from the text before synthesis.

*/ _FinalStage text(@NotNull String text); } @@ -333,7 +333,7 @@ public interface _FinalStage { _FinalStage sampleRate(Integer sampleRate); /** - *

Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Accepted values run 0.5 to 1.5 in 0.05 increments. Not yet supported in all languages. When the text contains an inline pause marker, speed is capped at 1.15 (PAUSE_SPEED_CAP_EXCEEDED above that). A value other than 1.0 cannot be combined with inline pronunciation controls (CONTROL_COMBINATION_INVALID).

+ *

Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Accepted values run 0.5 to 1.5 in 0.05 increments. Not yet supported in all languages.

*/ _FinalStage speed(Optional speed); @@ -410,7 +410,7 @@ public TextStage model(@NotNull String model) { } /** - *

The text content to be converted to speech. The server normalizes and preprocesses the text before synthesis. May contain inline pause controls (\{pause:500ms\}, 500-3000 ms in 100 ms steps, at most 8 per request) and inline pronunciation controls (\{"word": "...", "pronounce": "<IPA>"\}, Early Access). Pronunciation cannot be combined with pause or with a speed other than 1.0, and speed is capped at 1.15 when a pause is present. See Speed, Pause, Pronunciation.

+ *

The text content to be converted to speech. The server normalizes and preprocesses the text before synthesis. Inline pause and pronunciation controls are not yet applied; they are stripped from the text before synthesis.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -441,7 +441,7 @@ public _FinalStage priority(Optional priority) { } /** - *

Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Accepted values run 0.5 to 1.5 in 0.05 increments. Not yet supported in all languages. When the text contains an inline pause marker, speed is capped at 1.15 (PAUSE_SPEED_CAP_EXCEEDED above that). A value other than 1.0 cannot be combined with inline pronunciation controls (CONTROL_COMBINATION_INVALID).

+ *

Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Accepted values run 0.5 to 1.5 in 0.05 increments. Not yet supported in all languages.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -451,7 +451,7 @@ public _FinalStage speed(Double speed) { } /** - *

Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Accepted values run 0.5 to 1.5 in 0.05 increments. Not yet supported in all languages. When the text contains an inline pause marker, speed is capped at 1.15 (PAUSE_SPEED_CAP_EXCEEDED above that). A value other than 1.0 cannot be combined with inline pronunciation controls (CONTROL_COMBINATION_INVALID).

+ *

Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Accepted values run 0.5 to 1.5 in 0.05 increments. Not yet supported in all languages.

*/ @java.lang.Override @JsonSetter(value = "speed", nulls = Nulls.SKIP) diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2ConfigureFailure.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2ConfigureFailure.java index 79702327..e43c252f 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2ConfigureFailure.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2ConfigureFailure.java @@ -53,7 +53,7 @@ public String getType() { } /** - * @return Failure code, in SCREAMING_SNAKE_CASE. SPEED_OUT_OF_RANGE: outside the range the model publishes. SPEED_INCREMENT_INVALID: inside the published range but off the 0.05 increment. SPEED_NOT_SUPPORTED: this model or language has no runtime speed control at all. CONTROL_COMBINATION_INVALID: speed was set while a turn buffered behind the active one still carries a pronunciation control; pronunciation and speed cannot be combined, so flush that turn before setting speed (pronunciations in the active turn do not block the change). INTERNAL_ERROR: the configuration was acceptable but the server could not apply it — unlike the others, a server-side failure rather than a statement about the request. + * @return Failure code, in SCREAMING_SNAKE_CASE. SPEED_OUT_OF_RANGE: outside the range the model publishes. SPEED_INCREMENT_INVALID: inside the published range but off the 0.05 increment. SPEED_NOT_SUPPORTED: this model or language has no runtime speed control at all. INTERNAL_ERROR: the configuration was acceptable but the server could not apply it — unlike the others, a server-side failure rather than a statement about the request. */ @JsonProperty("code") public SpeakV2ConfigureFailureCode getCode() { @@ -118,7 +118,7 @@ public static CodeStage builder() { public interface CodeStage { /** - *

Failure code, in SCREAMING_SNAKE_CASE. SPEED_OUT_OF_RANGE: outside the range the model publishes. SPEED_INCREMENT_INVALID: inside the published range but off the 0.05 increment. SPEED_NOT_SUPPORTED: this model or language has no runtime speed control at all. CONTROL_COMBINATION_INVALID: speed was set while a turn buffered behind the active one still carries a pronunciation control; pronunciation and speed cannot be combined, so flush that turn before setting speed (pronunciations in the active turn do not block the change). INTERNAL_ERROR: the configuration was acceptable but the server could not apply it — unlike the others, a server-side failure rather than a statement about the request.

+ *

Failure code, in SCREAMING_SNAKE_CASE. SPEED_OUT_OF_RANGE: outside the range the model publishes. SPEED_INCREMENT_INVALID: inside the published range but off the 0.05 increment. SPEED_NOT_SUPPORTED: this model or language has no runtime speed control at all. INTERNAL_ERROR: the configuration was acceptable but the server could not apply it — unlike the others, a server-side failure rather than a statement about the request.

*/ DescriptionStage code(@NotNull SpeakV2ConfigureFailureCode code); @@ -179,7 +179,7 @@ public Builder from(SpeakV2ConfigureFailure other) { } /** - *

Failure code, in SCREAMING_SNAKE_CASE. SPEED_OUT_OF_RANGE: outside the range the model publishes. SPEED_INCREMENT_INVALID: inside the published range but off the 0.05 increment. SPEED_NOT_SUPPORTED: this model or language has no runtime speed control at all. CONTROL_COMBINATION_INVALID: speed was set while a turn buffered behind the active one still carries a pronunciation control; pronunciation and speed cannot be combined, so flush that turn before setting speed (pronunciations in the active turn do not block the change). INTERNAL_ERROR: the configuration was acceptable but the server could not apply it — unlike the others, a server-side failure rather than a statement about the request.

+ *

Failure code, in SCREAMING_SNAKE_CASE. SPEED_OUT_OF_RANGE: outside the range the model publishes. SPEED_INCREMENT_INVALID: inside the published range but off the 0.05 increment. SPEED_NOT_SUPPORTED: this model or language has no runtime speed control at all. INTERNAL_ERROR: the configuration was acceptable but the server could not apply it — unlike the others, a server-side failure rather than a statement about the request.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2ConfigureFailureCode.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2ConfigureFailureCode.java index 63ec45a7..7d02bce7 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2ConfigureFailureCode.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2ConfigureFailureCode.java @@ -7,9 +7,6 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class SpeakV2ConfigureFailureCode { - public static final SpeakV2ConfigureFailureCode CONTROL_COMBINATION_INVALID = - new SpeakV2ConfigureFailureCode(Value.CONTROL_COMBINATION_INVALID, "CONTROL_COMBINATION_INVALID"); - public static final SpeakV2ConfigureFailureCode SPEED_OUT_OF_RANGE = new SpeakV2ConfigureFailureCode(Value.SPEED_OUT_OF_RANGE, "SPEED_OUT_OF_RANGE"); @@ -55,8 +52,6 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case CONTROL_COMBINATION_INVALID: - return visitor.visitControlCombinationInvalid(); case SPEED_OUT_OF_RANGE: return visitor.visitSpeedOutOfRange(); case SPEED_INCREMENT_INVALID: @@ -74,8 +69,6 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static SpeakV2ConfigureFailureCode valueOf(String value) { switch (value) { - case "CONTROL_COMBINATION_INVALID": - return CONTROL_COMBINATION_INVALID; case "SPEED_OUT_OF_RANGE": return SPEED_OUT_OF_RANGE; case "SPEED_INCREMENT_INVALID": @@ -96,8 +89,6 @@ public enum Value { SPEED_NOT_SUPPORTED, - CONTROL_COMBINATION_INVALID, - INTERNAL_ERROR, UNKNOWN @@ -110,8 +101,6 @@ public interface Visitor { T visitSpeedNotSupported(); - T visitControlCombinationInvalid(); - T visitInternalError(); T visitUnknown(String unknownType); diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Error.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Error.java index 0a828475..343cfa72 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Error.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Error.java @@ -40,7 +40,7 @@ public String getType() { } /** - * @return A code identifying the error, e.g. MESSAGE-0000 or NET-0000. DATA-0002 covers invalid inline controls and speed, including an inline pause marker (pause is batch-only) and a pronunciation control combined with a speed other than 1.0; description names the specific rule. + * @return A code identifying the error, e.g. MESSAGE-0000 or NET-0000. */ @JsonProperty("code") public SpeakV2ErrorCode getCode() { @@ -86,7 +86,7 @@ public static CodeStage builder() { public interface CodeStage { /** - *

A code identifying the error, e.g. MESSAGE-0000 or NET-0000. DATA-0002 covers invalid inline controls and speed, including an inline pause marker (pause is batch-only) and a pronunciation control combined with a speed other than 1.0; description names the specific rule.

+ *

A code identifying the error, e.g. MESSAGE-0000 or NET-0000.

*/ DescriptionStage code(@NotNull SpeakV2ErrorCode code); @@ -127,7 +127,7 @@ public Builder from(SpeakV2Error other) { } /** - *

A code identifying the error, e.g. MESSAGE-0000 or NET-0000. DATA-0002 covers invalid inline controls and speed, including an inline pause marker (pause is batch-only) and a pronunciation control combined with a speed other than 1.0; description names the specific rule.

+ *

A code identifying the error, e.g. MESSAGE-0000 or NET-0000.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Speak.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Speak.java index 8c8e5638..16150bfa 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Speak.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Speak.java @@ -37,7 +37,7 @@ public String getType() { } /** - * @return The input text to synthesize. May contain inline pronunciation controls (\{"word": "...", "pronounce": "<IPA>"\}), which are in Early Access. Inline pause controls are supported on the batch (REST) transport only; a pause marker sent over the WebSocket fails the connection with DATA-0002. Pronunciation cannot be combined with a speed other than 1.0: text carrying a pronunciation control on a session opened with speed, or after a Configure that set it, also fails the connection with DATA-0002. See Speed, Pause, Pronunciation. + * @return The input text to synthesize. Inline pause and pronunciation controls are not yet applied; they are stripped from the text before synthesis. */ @JsonProperty("text") public String getText() { @@ -75,7 +75,7 @@ public static TextStage builder() { public interface TextStage { /** - *

The input text to synthesize. May contain inline pronunciation controls (\{"word": "...", "pronounce": "<IPA>"\}), which are in Early Access. Inline pause controls are supported on the batch (REST) transport only; a pause marker sent over the WebSocket fails the connection with DATA-0002. Pronunciation cannot be combined with a speed other than 1.0: text carrying a pronunciation control on a session opened with speed, or after a Configure that set it, also fails the connection with DATA-0002. See Speed, Pause, Pronunciation.

+ *

The input text to synthesize. Inline pause and pronunciation controls are not yet applied; they are stripped from the text before synthesis.

*/ _FinalStage text(@NotNull String text); @@ -106,7 +106,7 @@ public Builder from(SpeakV2Speak other) { } /** - *

The input text to synthesize. May contain inline pronunciation controls (\{"word": "...", "pronounce": "<IPA>"\}), which are in Early Access. Inline pause controls are supported on the batch (REST) transport only; a pause marker sent over the WebSocket fails the connection with DATA-0002. Pronunciation cannot be combined with a speed other than 1.0: text carrying a pronunciation control on a session opened with speed, or after a Configure that set it, also fails the connection with DATA-0002. See Speed, Pause, Pronunciation.

+ *

The input text to synthesize. Inline pause and pronunciation controls are not yet applied; they are stripped from the text before synthesis.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechInterruptedMetadata.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechInterruptedMetadata.java index 586f3c2e..da249957 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechInterruptedMetadata.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechInterruptedMetadata.java @@ -79,7 +79,7 @@ public int getBillableCharacterCount() { } /** - * @return Counts of the inline controls the server acted on during the turn. A pronunciation override that triggers an IPA warning is still applied best-effort and counted in pronunciations_applied; the warning is reported separately through a Warning and pronunciation_warnings. + * @return Counts of the inline controls the server acted on during the turn. Inline pause and pronunciation controls are not applied at launch — support is coming soon — so every count is currently 0. */ @JsonProperty("controls_applied") public SpeakV2SpeechInterruptedMetadataControlsApplied getControlsApplied() { @@ -156,7 +156,7 @@ public interface BillableCharacterCountStage { public interface ControlsAppliedStage { /** - *

Counts of the inline controls the server acted on during the turn. A pronunciation override that triggers an IPA warning is still applied best-effort and counted in pronunciations_applied; the warning is reported separately through a Warning and pronunciation_warnings.

+ *

Counts of the inline controls the server acted on during the turn. Inline pause and pronunciation controls are not applied at launch — support is coming soon — so every count is currently 0.

*/ _FinalStage controlsApplied(@NotNull SpeakV2SpeechInterruptedMetadataControlsApplied controlsApplied); } @@ -247,7 +247,7 @@ public ControlsAppliedStage billableCharacterCount(int billableCharacterCount) { } /** - *

Counts of the inline controls the server acted on during the turn. A pronunciation override that triggers an IPA warning is still applied best-effort and counted in pronunciations_applied; the warning is reported separately through a Warning and pronunciation_warnings.

+ *

Counts of the inline controls the server acted on during the turn. Inline pause and pronunciation controls are not applied at launch — support is coming soon — so every count is currently 0.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechInterruptedMetadataControlsApplied.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechInterruptedMetadataControlsApplied.java index 0d0e0dce..85000d9a 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechInterruptedMetadataControlsApplied.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechInterruptedMetadataControlsApplied.java @@ -38,7 +38,7 @@ private SpeakV2SpeechInterruptedMetadataControlsApplied( } /** - * @return Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header. + * @return Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header. Currently always 0. */ @JsonProperty("pronunciations_applied") public int getPronunciationsApplied() { @@ -46,7 +46,7 @@ public int getPronunciationsApplied() { } /** - * @return Pause (break) controls successfully applied. Mirrors the Aura-2 dg-breaks-applied REST header. Always 0 on the WebSocket, where inline pause controls are not supported. + * @return Pause (break) controls successfully applied. Mirrors the Aura-2 dg-breaks-applied REST header. Currently always 0. */ @JsonProperty("breaks_applied") public int getBreaksApplied() { @@ -54,7 +54,7 @@ public int getBreaksApplied() { } /** - * @return Pronunciation entries that triggered a warning (invalid IPA, word too long). On batch requests the corresponding PRON-NNN codes are returned in the dg-warnings response header. + * @return Pronunciation entries that triggered a warning (invalid IPA, word too long). Mirrors the Aura-2 dg-pronunciation-warnings REST header. Currently always 0. */ @JsonProperty("pronunciation_warnings") public int getPronunciationWarnings() { @@ -95,7 +95,7 @@ public static PronunciationsAppliedStage builder() { public interface PronunciationsAppliedStage { /** - *

Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header.

+ *

Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header. Currently always 0.

*/ BreaksAppliedStage pronunciationsApplied(int pronunciationsApplied); @@ -104,14 +104,14 @@ public interface PronunciationsAppliedStage { public interface BreaksAppliedStage { /** - *

Pause (break) controls successfully applied. Mirrors the Aura-2 dg-breaks-applied REST header. Always 0 on the WebSocket, where inline pause controls are not supported.

+ *

Pause (break) controls successfully applied. Mirrors the Aura-2 dg-breaks-applied REST header. Currently always 0.

*/ PronunciationWarningsStage breaksApplied(int breaksApplied); } public interface PronunciationWarningsStage { /** - *

Pronunciation entries that triggered a warning (invalid IPA, word too long). On batch requests the corresponding PRON-NNN codes are returned in the dg-warnings response header.

+ *

Pronunciation entries that triggered a warning (invalid IPA, word too long). Mirrors the Aura-2 dg-pronunciation-warnings REST header. Currently always 0.

*/ _FinalStage pronunciationWarnings(int pronunciationWarnings); } @@ -147,7 +147,7 @@ public Builder from(SpeakV2SpeechInterruptedMetadataControlsApplied other) { } /** - *

Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header.

+ *

Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header. Currently always 0.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -158,7 +158,7 @@ public BreaksAppliedStage pronunciationsApplied(int pronunciationsApplied) { } /** - *

Pause (break) controls successfully applied. Mirrors the Aura-2 dg-breaks-applied REST header. Always 0 on the WebSocket, where inline pause controls are not supported.

+ *

Pause (break) controls successfully applied. Mirrors the Aura-2 dg-breaks-applied REST header. Currently always 0.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -169,7 +169,7 @@ public PronunciationWarningsStage breaksApplied(int breaksApplied) { } /** - *

Pronunciation entries that triggered a warning (invalid IPA, word too long). On batch requests the corresponding PRON-NNN codes are returned in the dg-warnings response header.

+ *

Pronunciation entries that triggered a warning (invalid IPA, word too long). Mirrors the Aura-2 dg-pronunciation-warnings REST header. Currently always 0.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadata.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadata.java index be1ab9f4..d982b95e 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadata.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadata.java @@ -87,7 +87,7 @@ public int getBillableCharacterCount() { } /** - * @return Counts of the inline controls the server acted on during the turn. A pronunciation override that triggers an IPA warning is still applied best-effort and counted in pronunciations_applied; the warning is reported separately through a Warning and pronunciation_warnings. + * @return Counts of the inline controls the server acted on during the turn. Inline pause and pronunciation controls are not applied at launch — support is coming soon — so every count is currently 0. */ @JsonProperty("controls_applied") public SpeakV2SpeechMetadataControlsApplied getControlsApplied() { @@ -164,7 +164,7 @@ public interface BillableCharacterCountStage { public interface ControlsAppliedStage { /** - *

Counts of the inline controls the server acted on during the turn. A pronunciation override that triggers an IPA warning is still applied best-effort and counted in pronunciations_applied; the warning is reported separately through a Warning and pronunciation_warnings.

+ *

Counts of the inline controls the server acted on during the turn. Inline pause and pronunciation controls are not applied at launch — support is coming soon — so every count is currently 0.

*/ _FinalStage controlsApplied(@NotNull SpeakV2SpeechMetadataControlsApplied controlsApplied); } @@ -255,7 +255,7 @@ public ControlsAppliedStage billableCharacterCount(int billableCharacterCount) { } /** - *

Counts of the inline controls the server acted on during the turn. A pronunciation override that triggers an IPA warning is still applied best-effort and counted in pronunciations_applied; the warning is reported separately through a Warning and pronunciation_warnings.

+ *

Counts of the inline controls the server acted on during the turn. Inline pause and pronunciation controls are not applied at launch — support is coming soon — so every count is currently 0.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadataControlsApplied.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadataControlsApplied.java index ddf185a7..b258f91e 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadataControlsApplied.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadataControlsApplied.java @@ -38,7 +38,7 @@ private SpeakV2SpeechMetadataControlsApplied( } /** - * @return Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header. + * @return Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header. Currently always 0. */ @JsonProperty("pronunciations_applied") public int getPronunciationsApplied() { @@ -46,7 +46,7 @@ public int getPronunciationsApplied() { } /** - * @return Pause (break) controls successfully applied. Mirrors the Aura-2 dg-breaks-applied REST header. Always 0 on the WebSocket, where inline pause controls are not supported. + * @return Pause (break) controls successfully applied. Mirrors the Aura-2 dg-breaks-applied REST header. Currently always 0. */ @JsonProperty("breaks_applied") public int getBreaksApplied() { @@ -54,7 +54,7 @@ public int getBreaksApplied() { } /** - * @return Pronunciation entries that triggered a warning (invalid IPA, word too long). On batch requests the corresponding PRON-NNN codes are returned in the dg-warnings response header. + * @return Pronunciation entries that triggered a warning (invalid IPA, word too long). Mirrors the Aura-2 dg-pronunciation-warnings REST header. Currently always 0. */ @JsonProperty("pronunciation_warnings") public int getPronunciationWarnings() { @@ -95,7 +95,7 @@ public static PronunciationsAppliedStage builder() { public interface PronunciationsAppliedStage { /** - *

Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header.

+ *

Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header. Currently always 0.

*/ BreaksAppliedStage pronunciationsApplied(int pronunciationsApplied); @@ -104,14 +104,14 @@ public interface PronunciationsAppliedStage { public interface BreaksAppliedStage { /** - *

Pause (break) controls successfully applied. Mirrors the Aura-2 dg-breaks-applied REST header. Always 0 on the WebSocket, where inline pause controls are not supported.

+ *

Pause (break) controls successfully applied. Mirrors the Aura-2 dg-breaks-applied REST header. Currently always 0.

*/ PronunciationWarningsStage breaksApplied(int breaksApplied); } public interface PronunciationWarningsStage { /** - *

Pronunciation entries that triggered a warning (invalid IPA, word too long). On batch requests the corresponding PRON-NNN codes are returned in the dg-warnings response header.

+ *

Pronunciation entries that triggered a warning (invalid IPA, word too long). Mirrors the Aura-2 dg-pronunciation-warnings REST header. Currently always 0.

*/ _FinalStage pronunciationWarnings(int pronunciationWarnings); } @@ -147,7 +147,7 @@ public Builder from(SpeakV2SpeechMetadataControlsApplied other) { } /** - *

Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header.

+ *

Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header. Currently always 0.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -158,7 +158,7 @@ public BreaksAppliedStage pronunciationsApplied(int pronunciationsApplied) { } /** - *

Pause (break) controls successfully applied. Mirrors the Aura-2 dg-breaks-applied REST header. Always 0 on the WebSocket, where inline pause controls are not supported.

+ *

Pause (break) controls successfully applied. Mirrors the Aura-2 dg-breaks-applied REST header. Currently always 0.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -169,7 +169,7 @@ public PronunciationWarningsStage breaksApplied(int breaksApplied) { } /** - *

Pronunciation entries that triggered a warning (invalid IPA, word too long). On batch requests the corresponding PRON-NNN codes are returned in the dg-warnings response header.

+ *

Pronunciation entries that triggered a warning (invalid IPA, word too long). Mirrors the Aura-2 dg-pronunciation-warnings REST header. Currently always 0.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Warning.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Warning.java index 84332f94..0eb0b3c8 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Warning.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Warning.java @@ -42,8 +42,7 @@ public String getType() { /** * @return Warning code identifying the condition, in SCREAMING_SNAKE_CASE. *

Turn-scoped codes: NO_ACTIVE_SPEECH (a speech-scoped message arrived with no active turn), NO_SYNTHESIZABLE_TEXT (the turn's text was entirely whitespace or punctuation, so it produced no audio and is completed with a zero-duration SpeechMetadata), and SYNTHESIS_RETRYING (a synthesis request failed and is being retried).

- *

Pronunciation codes: PRONUNCIATION_WARNINGS (a pronunciation override contained invalid IPA; it is still applied best-effort and counted in pronunciations_applied), PRONUNCIATION_TOO_LONG (an IPA string exceeded the length limit), PRONUNCIATIONS_LIMIT_EXCEEDED (too many pronunciation controls in one turn).

- *

Pause codes (BREAKS_LIMIT_EXCEEDED, BREAK_TOKENS_OUT_OF_RANGE, BREAK_TOKENS_WITH_INVALID_INCREMENTS) are reserved and not emitted: inline pause controls are batch-only, and a pause marker on the WebSocket fails the connection instead.

+ *

Inline-control codes are reserved and not currently emitted, because inline pause and pronunciation controls are not yet applied: BREAKS_LIMIT_EXCEEDED (too many pause controls, or two pauses with no intervening text), BREAK_TOKENS_OUT_OF_RANGE (pause durations outside the range the model supports), BREAK_TOKENS_WITH_INVALID_INCREMENTS (pause durations off the model's supported increment), PRONUNCIATION_WARNINGS (a pronunciation override contained invalid IPA), PRONUNCIATION_TOO_LONG (an IPA string exceeded the length limit), PRONUNCIATIONS_LIMIT_EXCEEDED (too many pronunciation controls in one turn).

*

Interrupt-scoped codes, each meaning the Interrupt was ignored: NO_AUDIO_GENERATED (the session has produced no audio yet, so there is nothing to interrupt), INTERRUPT_IN_PROGRESS (an earlier Interrupt is still being processed — at most one is handled at a time), INVALID_INTERRUPT_OFFSET (the playback_offset did not advance past the position a prior interrupt established).

*/ @JsonProperty("code") @@ -92,8 +91,7 @@ public interface CodeStage { /** *

Warning code identifying the condition, in SCREAMING_SNAKE_CASE.

*

Turn-scoped codes: NO_ACTIVE_SPEECH (a speech-scoped message arrived with no active turn), NO_SYNTHESIZABLE_TEXT (the turn's text was entirely whitespace or punctuation, so it produced no audio and is completed with a zero-duration SpeechMetadata), and SYNTHESIS_RETRYING (a synthesis request failed and is being retried).

- *

Pronunciation codes: PRONUNCIATION_WARNINGS (a pronunciation override contained invalid IPA; it is still applied best-effort and counted in pronunciations_applied), PRONUNCIATION_TOO_LONG (an IPA string exceeded the length limit), PRONUNCIATIONS_LIMIT_EXCEEDED (too many pronunciation controls in one turn).

- *

Pause codes (BREAKS_LIMIT_EXCEEDED, BREAK_TOKENS_OUT_OF_RANGE, BREAK_TOKENS_WITH_INVALID_INCREMENTS) are reserved and not emitted: inline pause controls are batch-only, and a pause marker on the WebSocket fails the connection instead.

+ *

Inline-control codes are reserved and not currently emitted, because inline pause and pronunciation controls are not yet applied: BREAKS_LIMIT_EXCEEDED (too many pause controls, or two pauses with no intervening text), BREAK_TOKENS_OUT_OF_RANGE (pause durations outside the range the model supports), BREAK_TOKENS_WITH_INVALID_INCREMENTS (pause durations off the model's supported increment), PRONUNCIATION_WARNINGS (a pronunciation override contained invalid IPA), PRONUNCIATION_TOO_LONG (an IPA string exceeded the length limit), PRONUNCIATIONS_LIMIT_EXCEEDED (too many pronunciation controls in one turn).

*

Interrupt-scoped codes, each meaning the Interrupt was ignored: NO_AUDIO_GENERATED (the session has produced no audio yet, so there is nothing to interrupt), INTERRUPT_IN_PROGRESS (an earlier Interrupt is still being processed — at most one is handled at a time), INVALID_INTERRUPT_OFFSET (the playback_offset did not advance past the position a prior interrupt established).

*/ DescriptionStage code(@NotNull String code); @@ -137,8 +135,7 @@ public Builder from(SpeakV2Warning other) { /** *

Warning code identifying the condition, in SCREAMING_SNAKE_CASE.

*

Turn-scoped codes: NO_ACTIVE_SPEECH (a speech-scoped message arrived with no active turn), NO_SYNTHESIZABLE_TEXT (the turn's text was entirely whitespace or punctuation, so it produced no audio and is completed with a zero-duration SpeechMetadata), and SYNTHESIS_RETRYING (a synthesis request failed and is being retried).

- *

Pronunciation codes: PRONUNCIATION_WARNINGS (a pronunciation override contained invalid IPA; it is still applied best-effort and counted in pronunciations_applied), PRONUNCIATION_TOO_LONG (an IPA string exceeded the length limit), PRONUNCIATIONS_LIMIT_EXCEEDED (too many pronunciation controls in one turn).

- *

Pause codes (BREAKS_LIMIT_EXCEEDED, BREAK_TOKENS_OUT_OF_RANGE, BREAK_TOKENS_WITH_INVALID_INCREMENTS) are reserved and not emitted: inline pause controls are batch-only, and a pause marker on the WebSocket fails the connection instead.

+ *

Inline-control codes are reserved and not currently emitted, because inline pause and pronunciation controls are not yet applied: BREAKS_LIMIT_EXCEEDED (too many pause controls, or two pauses with no intervening text), BREAK_TOKENS_OUT_OF_RANGE (pause durations outside the range the model supports), BREAK_TOKENS_WITH_INVALID_INCREMENTS (pause durations off the model's supported increment), PRONUNCIATION_WARNINGS (a pronunciation override contained invalid IPA), PRONUNCIATION_TOO_LONG (an IPA string exceeded the length limit), PRONUNCIATIONS_LIMIT_EXCEEDED (too many pronunciation controls in one turn).

*

Interrupt-scoped codes, each meaning the Interrupt was ignored: NO_AUDIO_GENERATED (the session has produced no audio yet, so there is nothing to interrupt), INTERRUPT_IN_PROGRESS (an earlier Interrupt is still being processed — at most one is handled at a time), INVALID_INTERRUPT_OFFSET (the playback_offset did not advance past the position a prior interrupt established).

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/SharedIntents.java b/src/main/java/com/deepgram/types/SharedIntents.java index 05799c25..c689861c 100644 --- a/src/main/java/com/deepgram/types/SharedIntents.java +++ b/src/main/java/com/deepgram/types/SharedIntents.java @@ -13,7 +13,6 @@ import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; @@ -21,19 +20,18 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SharedIntents.Builder.class) public final class SharedIntents { - private final Optional> segments; + private final Optional results; private final Map additionalProperties; - private SharedIntents( - Optional> segments, Map additionalProperties) { - this.segments = segments; + private SharedIntents(Optional results, Map additionalProperties) { + this.results = results; this.additionalProperties = additionalProperties; } - @JsonProperty("segments") - public Optional> getSegments() { - return segments; + @JsonProperty("results") + public Optional getResults() { + return results; } @java.lang.Override @@ -48,12 +46,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(SharedIntents other) { - return segments.equals(other.segments); + return results.equals(other.results); } @java.lang.Override public int hashCode() { - return Objects.hash(this.segments); + return Objects.hash(this.results); } @java.lang.Override @@ -67,7 +65,7 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional> segments = Optional.empty(); + private Optional results = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -75,23 +73,23 @@ public static final class Builder { private Builder() {} public Builder from(SharedIntents other) { - segments(other.getSegments()); + results(other.getResults()); return this; } - @JsonSetter(value = "segments", nulls = Nulls.SKIP) - public Builder segments(Optional> segments) { - this.segments = segments; + @JsonSetter(value = "results", nulls = Nulls.SKIP) + public Builder results(Optional results) { + this.results = results; return this; } - public Builder segments(List segments) { - this.segments = Optional.ofNullable(segments); + public Builder results(SharedIntentsResults results) { + this.results = Optional.ofNullable(results); return this; } public SharedIntents build() { - return new SharedIntents(segments, additionalProperties); + return new SharedIntents(results, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/deepgram/types/SharedIntentsResults.java b/src/main/java/com/deepgram/types/SharedIntentsResults.java new file mode 100644 index 00000000..44bfe377 --- /dev/null +++ b/src/main/java/com/deepgram/types/SharedIntentsResults.java @@ -0,0 +1,106 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.types; + +import com.deepgram.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SharedIntentsResults.Builder.class) +public final class SharedIntentsResults { + private final Optional intents; + + private final Map additionalProperties; + + private SharedIntentsResults( + Optional intents, Map additionalProperties) { + this.intents = intents; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("intents") + public Optional getIntents() { + return intents; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SharedIntentsResults && equalTo((SharedIntentsResults) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SharedIntentsResults other) { + return intents.equals(other.intents); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.intents); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional intents = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SharedIntentsResults other) { + intents(other.getIntents()); + return this; + } + + @JsonSetter(value = "intents", nulls = Nulls.SKIP) + public Builder intents(Optional intents) { + this.intents = intents; + return this; + } + + public Builder intents(SharedIntentsResultsIntents intents) { + this.intents = Optional.ofNullable(intents); + return this; + } + + public SharedIntentsResults build() { + return new SharedIntentsResults(intents, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/deepgram/types/SharedIntentsResultsIntents.java b/src/main/java/com/deepgram/types/SharedIntentsResultsIntents.java new file mode 100644 index 00000000..a5fe89b0 --- /dev/null +++ b/src/main/java/com/deepgram/types/SharedIntentsResultsIntents.java @@ -0,0 +1,108 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.types; + +import com.deepgram.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SharedIntentsResultsIntents.Builder.class) +public final class SharedIntentsResultsIntents { + private final Optional> segments; + + private final Map additionalProperties; + + private SharedIntentsResultsIntents( + Optional> segments, + Map additionalProperties) { + this.segments = segments; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("segments") + public Optional> getSegments() { + return segments; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SharedIntentsResultsIntents && equalTo((SharedIntentsResultsIntents) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SharedIntentsResultsIntents other) { + return segments.equals(other.segments); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.segments); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> segments = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SharedIntentsResultsIntents other) { + segments(other.getSegments()); + return this; + } + + @JsonSetter(value = "segments", nulls = Nulls.SKIP) + public Builder segments(Optional> segments) { + this.segments = segments; + return this; + } + + public Builder segments(List segments) { + this.segments = Optional.ofNullable(segments); + return this; + } + + public SharedIntentsResultsIntents build() { + return new SharedIntentsResultsIntents(segments, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/deepgram/types/SharedIntentsSegmentsItem.java b/src/main/java/com/deepgram/types/SharedIntentsResultsIntentsSegmentsItem.java similarity index 78% rename from src/main/java/com/deepgram/types/SharedIntentsSegmentsItem.java rename to src/main/java/com/deepgram/types/SharedIntentsResultsIntentsSegmentsItem.java index 431b68f0..694be4f6 100644 --- a/src/main/java/com/deepgram/types/SharedIntentsSegmentsItem.java +++ b/src/main/java/com/deepgram/types/SharedIntentsResultsIntentsSegmentsItem.java @@ -19,23 +19,23 @@ import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SharedIntentsSegmentsItem.Builder.class) -public final class SharedIntentsSegmentsItem { +@JsonDeserialize(builder = SharedIntentsResultsIntentsSegmentsItem.Builder.class) +public final class SharedIntentsResultsIntentsSegmentsItem { private final Optional text; private final Optional startWord; private final Optional endWord; - private final Optional> intents; + private final Optional> intents; private final Map additionalProperties; - private SharedIntentsSegmentsItem( + private SharedIntentsResultsIntentsSegmentsItem( Optional text, Optional startWord, Optional endWord, - Optional> intents, + Optional> intents, Map additionalProperties) { this.text = text; this.startWord = startWord; @@ -60,14 +60,15 @@ public Optional getEndWord() { } @JsonProperty("intents") - public Optional> getIntents() { + public Optional> getIntents() { return intents; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof SharedIntentsSegmentsItem && equalTo((SharedIntentsSegmentsItem) other); + return other instanceof SharedIntentsResultsIntentsSegmentsItem + && equalTo((SharedIntentsResultsIntentsSegmentsItem) other); } @JsonAnyGetter @@ -75,7 +76,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(SharedIntentsSegmentsItem other) { + private boolean equalTo(SharedIntentsResultsIntentsSegmentsItem other) { return text.equals(other.text) && startWord.equals(other.startWord) && endWord.equals(other.endWord) @@ -104,14 +105,14 @@ public static final class Builder { private Optional endWord = Optional.empty(); - private Optional> intents = Optional.empty(); + private Optional> intents = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - public Builder from(SharedIntentsSegmentsItem other) { + public Builder from(SharedIntentsResultsIntentsSegmentsItem other) { text(other.getText()); startWord(other.getStartWord()); endWord(other.getEndWord()); @@ -153,18 +154,18 @@ public Builder endWord(Double endWord) { } @JsonSetter(value = "intents", nulls = Nulls.SKIP) - public Builder intents(Optional> intents) { + public Builder intents(Optional> intents) { this.intents = intents; return this; } - public Builder intents(List intents) { + public Builder intents(List intents) { this.intents = Optional.ofNullable(intents); return this; } - public SharedIntentsSegmentsItem build() { - return new SharedIntentsSegmentsItem(text, startWord, endWord, intents, additionalProperties); + public SharedIntentsResultsIntentsSegmentsItem build() { + return new SharedIntentsResultsIntentsSegmentsItem(text, startWord, endWord, intents, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/deepgram/types/SharedIntentsSegmentsItemIntentsItem.java b/src/main/java/com/deepgram/types/SharedIntentsResultsIntentsSegmentsItemIntentsItem.java similarity index 81% rename from src/main/java/com/deepgram/types/SharedIntentsSegmentsItemIntentsItem.java rename to src/main/java/com/deepgram/types/SharedIntentsResultsIntentsSegmentsItemIntentsItem.java index 9f97c919..d6554e2b 100644 --- a/src/main/java/com/deepgram/types/SharedIntentsSegmentsItemIntentsItem.java +++ b/src/main/java/com/deepgram/types/SharedIntentsResultsIntentsSegmentsItemIntentsItem.java @@ -18,15 +18,15 @@ import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SharedIntentsSegmentsItemIntentsItem.Builder.class) -public final class SharedIntentsSegmentsItemIntentsItem { +@JsonDeserialize(builder = SharedIntentsResultsIntentsSegmentsItemIntentsItem.Builder.class) +public final class SharedIntentsResultsIntentsSegmentsItemIntentsItem { private final Optional intent; private final Optional confidenceScore; private final Map additionalProperties; - private SharedIntentsSegmentsItemIntentsItem( + private SharedIntentsResultsIntentsSegmentsItemIntentsItem( Optional intent, Optional confidenceScore, Map additionalProperties) { this.intent = intent; this.confidenceScore = confidenceScore; @@ -46,8 +46,8 @@ public Optional getConfidenceScore() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof SharedIntentsSegmentsItemIntentsItem - && equalTo((SharedIntentsSegmentsItemIntentsItem) other); + return other instanceof SharedIntentsResultsIntentsSegmentsItemIntentsItem + && equalTo((SharedIntentsResultsIntentsSegmentsItemIntentsItem) other); } @JsonAnyGetter @@ -55,7 +55,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(SharedIntentsSegmentsItemIntentsItem other) { + private boolean equalTo(SharedIntentsResultsIntentsSegmentsItemIntentsItem other) { return intent.equals(other.intent) && confidenceScore.equals(other.confidenceScore); } @@ -84,7 +84,7 @@ public static final class Builder { private Builder() {} - public Builder from(SharedIntentsSegmentsItemIntentsItem other) { + public Builder from(SharedIntentsResultsIntentsSegmentsItemIntentsItem other) { intent(other.getIntent()); confidenceScore(other.getConfidenceScore()); return this; @@ -112,8 +112,9 @@ public Builder confidenceScore(Float confidenceScore) { return this; } - public SharedIntentsSegmentsItemIntentsItem build() { - return new SharedIntentsSegmentsItemIntentsItem(intent, confidenceScore, additionalProperties); + public SharedIntentsResultsIntentsSegmentsItemIntentsItem build() { + return new SharedIntentsResultsIntentsSegmentsItemIntentsItem( + intent, confidenceScore, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/deepgram/types/SharedTopics.java b/src/main/java/com/deepgram/types/SharedTopics.java index 25a75ea4..463e84ca 100644 --- a/src/main/java/com/deepgram/types/SharedTopics.java +++ b/src/main/java/com/deepgram/types/SharedTopics.java @@ -13,7 +13,6 @@ import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; @@ -21,18 +20,18 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SharedTopics.Builder.class) public final class SharedTopics { - private final Optional> segments; + private final Optional results; private final Map additionalProperties; - private SharedTopics(Optional> segments, Map additionalProperties) { - this.segments = segments; + private SharedTopics(Optional results, Map additionalProperties) { + this.results = results; this.additionalProperties = additionalProperties; } - @JsonProperty("segments") - public Optional> getSegments() { - return segments; + @JsonProperty("results") + public Optional getResults() { + return results; } @java.lang.Override @@ -47,12 +46,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(SharedTopics other) { - return segments.equals(other.segments); + return results.equals(other.results); } @java.lang.Override public int hashCode() { - return Objects.hash(this.segments); + return Objects.hash(this.results); } @java.lang.Override @@ -66,7 +65,7 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional> segments = Optional.empty(); + private Optional results = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -74,23 +73,23 @@ public static final class Builder { private Builder() {} public Builder from(SharedTopics other) { - segments(other.getSegments()); + results(other.getResults()); return this; } - @JsonSetter(value = "segments", nulls = Nulls.SKIP) - public Builder segments(Optional> segments) { - this.segments = segments; + @JsonSetter(value = "results", nulls = Nulls.SKIP) + public Builder results(Optional results) { + this.results = results; return this; } - public Builder segments(List segments) { - this.segments = Optional.ofNullable(segments); + public Builder results(SharedTopicsResults results) { + this.results = Optional.ofNullable(results); return this; } public SharedTopics build() { - return new SharedTopics(segments, additionalProperties); + return new SharedTopics(results, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/deepgram/types/SharedTopicsResults.java b/src/main/java/com/deepgram/types/SharedTopicsResults.java new file mode 100644 index 00000000..d25c8cc9 --- /dev/null +++ b/src/main/java/com/deepgram/types/SharedTopicsResults.java @@ -0,0 +1,105 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.types; + +import com.deepgram.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SharedTopicsResults.Builder.class) +public final class SharedTopicsResults { + private final Optional topics; + + private final Map additionalProperties; + + private SharedTopicsResults(Optional topics, Map additionalProperties) { + this.topics = topics; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("topics") + public Optional getTopics() { + return topics; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SharedTopicsResults && equalTo((SharedTopicsResults) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SharedTopicsResults other) { + return topics.equals(other.topics); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.topics); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional topics = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SharedTopicsResults other) { + topics(other.getTopics()); + return this; + } + + @JsonSetter(value = "topics", nulls = Nulls.SKIP) + public Builder topics(Optional topics) { + this.topics = topics; + return this; + } + + public Builder topics(SharedTopicsResultsTopics topics) { + this.topics = Optional.ofNullable(topics); + return this; + } + + public SharedTopicsResults build() { + return new SharedTopicsResults(topics, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/deepgram/types/SharedTopicsResultsTopics.java b/src/main/java/com/deepgram/types/SharedTopicsResultsTopics.java new file mode 100644 index 00000000..e3a1cbba --- /dev/null +++ b/src/main/java/com/deepgram/types/SharedTopicsResultsTopics.java @@ -0,0 +1,107 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.types; + +import com.deepgram.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SharedTopicsResultsTopics.Builder.class) +public final class SharedTopicsResultsTopics { + private final Optional> segments; + + private final Map additionalProperties; + + private SharedTopicsResultsTopics( + Optional> segments, Map additionalProperties) { + this.segments = segments; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("segments") + public Optional> getSegments() { + return segments; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SharedTopicsResultsTopics && equalTo((SharedTopicsResultsTopics) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SharedTopicsResultsTopics other) { + return segments.equals(other.segments); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.segments); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> segments = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SharedTopicsResultsTopics other) { + segments(other.getSegments()); + return this; + } + + @JsonSetter(value = "segments", nulls = Nulls.SKIP) + public Builder segments(Optional> segments) { + this.segments = segments; + return this; + } + + public Builder segments(List segments) { + this.segments = Optional.ofNullable(segments); + return this; + } + + public SharedTopicsResultsTopics build() { + return new SharedTopicsResultsTopics(segments, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/deepgram/types/SharedTopicsSegmentsItem.java b/src/main/java/com/deepgram/types/SharedTopicsResultsTopicsSegmentsItem.java similarity index 78% rename from src/main/java/com/deepgram/types/SharedTopicsSegmentsItem.java rename to src/main/java/com/deepgram/types/SharedTopicsResultsTopicsSegmentsItem.java index b479076e..19cd942e 100644 --- a/src/main/java/com/deepgram/types/SharedTopicsSegmentsItem.java +++ b/src/main/java/com/deepgram/types/SharedTopicsResultsTopicsSegmentsItem.java @@ -19,23 +19,23 @@ import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SharedTopicsSegmentsItem.Builder.class) -public final class SharedTopicsSegmentsItem { +@JsonDeserialize(builder = SharedTopicsResultsTopicsSegmentsItem.Builder.class) +public final class SharedTopicsResultsTopicsSegmentsItem { private final Optional text; private final Optional startWord; private final Optional endWord; - private final Optional> topics; + private final Optional> topics; private final Map additionalProperties; - private SharedTopicsSegmentsItem( + private SharedTopicsResultsTopicsSegmentsItem( Optional text, Optional startWord, Optional endWord, - Optional> topics, + Optional> topics, Map additionalProperties) { this.text = text; this.startWord = startWord; @@ -60,14 +60,15 @@ public Optional getEndWord() { } @JsonProperty("topics") - public Optional> getTopics() { + public Optional> getTopics() { return topics; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof SharedTopicsSegmentsItem && equalTo((SharedTopicsSegmentsItem) other); + return other instanceof SharedTopicsResultsTopicsSegmentsItem + && equalTo((SharedTopicsResultsTopicsSegmentsItem) other); } @JsonAnyGetter @@ -75,7 +76,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(SharedTopicsSegmentsItem other) { + private boolean equalTo(SharedTopicsResultsTopicsSegmentsItem other) { return text.equals(other.text) && startWord.equals(other.startWord) && endWord.equals(other.endWord) @@ -104,14 +105,14 @@ public static final class Builder { private Optional endWord = Optional.empty(); - private Optional> topics = Optional.empty(); + private Optional> topics = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - public Builder from(SharedTopicsSegmentsItem other) { + public Builder from(SharedTopicsResultsTopicsSegmentsItem other) { text(other.getText()); startWord(other.getStartWord()); endWord(other.getEndWord()); @@ -153,18 +154,18 @@ public Builder endWord(Double endWord) { } @JsonSetter(value = "topics", nulls = Nulls.SKIP) - public Builder topics(Optional> topics) { + public Builder topics(Optional> topics) { this.topics = topics; return this; } - public Builder topics(List topics) { + public Builder topics(List topics) { this.topics = Optional.ofNullable(topics); return this; } - public SharedTopicsSegmentsItem build() { - return new SharedTopicsSegmentsItem(text, startWord, endWord, topics, additionalProperties); + public SharedTopicsResultsTopicsSegmentsItem build() { + return new SharedTopicsResultsTopicsSegmentsItem(text, startWord, endWord, topics, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/deepgram/types/SharedTopicsSegmentsItemTopicsItem.java b/src/main/java/com/deepgram/types/SharedTopicsResultsTopicsSegmentsItemTopicsItem.java similarity index 82% rename from src/main/java/com/deepgram/types/SharedTopicsSegmentsItemTopicsItem.java rename to src/main/java/com/deepgram/types/SharedTopicsResultsTopicsSegmentsItemTopicsItem.java index 03464d24..3721cd8b 100644 --- a/src/main/java/com/deepgram/types/SharedTopicsSegmentsItemTopicsItem.java +++ b/src/main/java/com/deepgram/types/SharedTopicsResultsTopicsSegmentsItemTopicsItem.java @@ -18,15 +18,15 @@ import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SharedTopicsSegmentsItemTopicsItem.Builder.class) -public final class SharedTopicsSegmentsItemTopicsItem { +@JsonDeserialize(builder = SharedTopicsResultsTopicsSegmentsItemTopicsItem.Builder.class) +public final class SharedTopicsResultsTopicsSegmentsItemTopicsItem { private final Optional topic; private final Optional confidenceScore; private final Map additionalProperties; - private SharedTopicsSegmentsItemTopicsItem( + private SharedTopicsResultsTopicsSegmentsItemTopicsItem( Optional topic, Optional confidenceScore, Map additionalProperties) { this.topic = topic; this.confidenceScore = confidenceScore; @@ -46,8 +46,8 @@ public Optional getConfidenceScore() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof SharedTopicsSegmentsItemTopicsItem - && equalTo((SharedTopicsSegmentsItemTopicsItem) other); + return other instanceof SharedTopicsResultsTopicsSegmentsItemTopicsItem + && equalTo((SharedTopicsResultsTopicsSegmentsItemTopicsItem) other); } @JsonAnyGetter @@ -55,7 +55,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(SharedTopicsSegmentsItemTopicsItem other) { + private boolean equalTo(SharedTopicsResultsTopicsSegmentsItemTopicsItem other) { return topic.equals(other.topic) && confidenceScore.equals(other.confidenceScore); } @@ -84,7 +84,7 @@ public static final class Builder { private Builder() {} - public Builder from(SharedTopicsSegmentsItemTopicsItem other) { + public Builder from(SharedTopicsResultsTopicsSegmentsItemTopicsItem other) { topic(other.getTopic()); confidenceScore(other.getConfidenceScore()); return this; @@ -112,8 +112,8 @@ public Builder confidenceScore(Float confidenceScore) { return this; } - public SharedTopicsSegmentsItemTopicsItem build() { - return new SharedTopicsSegmentsItemTopicsItem(topic, confidenceScore, additionalProperties); + public SharedTopicsResultsTopicsSegmentsItemTopicsItem build() { + return new SharedTopicsResultsTopicsSegmentsItemTopicsItem(topic, confidenceScore, additionalProperties); } public Builder additionalProperty(String key, Object value) { From 9ce874fba6a25a7edbf90752d26b11f30639590a Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2026 08:47:38 +0000 Subject: [PATCH 2/2] [fern-replay] advance lockfile --- .fern/replay.lock | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.fern/replay.lock b/.fern/replay.lock index e177a1a1..eeadbdf5 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -6,5 +6,11 @@ generations: timestamp: 2026-10-14T08:47:04.353Z cli_version: unknown generator_versions: {} -current_generation: 98aa2f98e1732514ae1861bb9ccdf3920fe632e8 + - commit_sha: 01fe67dd5ea3375093f4cfbec2a34bdc8f41a693 + tree_hash: 136dc586c70089820bc0578737b3d965c781a742 + timestamp: 2026-10-14T08:47:35.948Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.21.0 +current_generation: 01fe67dd5ea3375093f4cfbec2a34bdc8f41a693 patches: []