From 101a1a4838cd750c5e53444f887217a6f28bd20c Mon Sep 17 00:00:00 2001 From: Xiting Zhang Date: Tue, 5 May 2026 14:03:14 -0700 Subject: [PATCH 1/4] [voicelive] Release azure-ai-voicelive 1.0.0 (GA) First General Availability release of the Azure VoiceLive client library for Java. Highlights: - Avatar voice sync (AzureVoiceType.AVATAR_VOICE_SYNC, AzureAvatarVoiceSyncVoice), avatar lifecycle events (session.avatar.switch_to_speaking/idle), response.video.delta, and output_audio_buffer.clear/cleared events. - Web search and file search tool calls (ResponseWebSearchCallItem, ResponseFileSearchCallItem with FileSearchResult) plus full searching/in_progress/completed lifecycle server events. - Transcription enhancements: TranscriptionPhrase / TranscriptionWord with timing and confidence, getLogprobs() / getPhrases() on transcription-completed, response.audio_transcript.annotation.added event, and new gpt-4o-transcribe-diarize / mai-transcribe-1 models. - Reasoning token usage (OutputTokenDetails.getReasoningTokens) and per-request interim response (ResponseCreateParams.setInterimResponse). - Session include options (SessionIncludeOption) and metadata on VoiceLiveSessionOptions / VoiceLiveSessionResponse. - Personal voice catalog: added DRAGON_HDOMNI_LATEST_NEURAL and MAI_VOICE_1, removed PHOENIX_V2NEURAL. - Version bumped to 1.0.0 in pom.xml, README.md, eng/versioning/version_client.txt, and CHANGELOG.md. - Added unit tests for the new GA model classes and lifecycle events (49 new test cases, all passing). --- eng/versioning/version_client.txt | 2 +- sdk/voicelive/azure-ai-voicelive/CHANGELOG.md | 56 ++- sdk/voicelive/azure-ai-voicelive/README.md | 4 +- sdk/voicelive/azure-ai-voicelive/pom.xml | 2 +- .../AudioInputTranscriptionOptions.java | 4 +- .../AudioInputTranscriptionOptionsModel.java | 13 + .../models/AzureAvatarVoiceSyncVoice.java | 473 ++++++++++++++++++ .../ai/voicelive/models/AzureCustomVoice.java | 116 ++++- .../voicelive/models/AzurePersonalVoice.java | 116 ++++- .../models/AzureSemanticVadTurnDetection.java | 60 +-- .../AzureSemanticVadTurnDetectionEn.java | 54 +- ...eSemanticVadTurnDetectionMultilingual.java | 60 +-- .../voicelive/models/AzureStandardVoice.java | 116 ++++- .../azure/ai/voicelive/models/AzureVoice.java | 2 + .../ai/voicelive/models/AzureVoiceType.java | 6 + .../ai/voicelive/models/ClientEvent.java | 2 + .../ClientEventOutputAudioBufferClear.java | 94 ++++ .../ai/voicelive/models/ClientEventType.java | 6 + .../ai/voicelive/models/FileSearchResult.java | 158 ++++++ .../azure/ai/voicelive/models/ItemType.java | 12 + .../voicelive/models/OutputTokenDetails.java | 24 +- .../voicelive/models/PersonalVoiceModels.java | 18 +- .../models/ResponseCreateParams.java | 35 ++ .../models/ResponseFileSearchCallItem.java | 176 +++++++ .../ResponseFileSearchCallItemStatus.java | 75 +++ .../models/ResponseWebSearchCallItem.java | 133 +++++ .../ResponseWebSearchCallItemStatus.java | 69 +++ .../ServerEventOutputAudioBufferCleared.java | 85 ++++ ...esponseAudioTranscriptAnnotationAdded.java | 227 +++++++++ ...rEventResponseFileSearchCallCompleted.java | 179 +++++++ ...EventResponseFileSearchCallInProgress.java | 179 +++++++ ...rEventResponseFileSearchCallSearching.java | 179 +++++++ .../models/ServerEventResponseVideoDelta.java | 156 ++++++ ...erEventResponseWebSearchCallCompleted.java | 179 +++++++ ...rEventResponseWebSearchCallInProgress.java | 179 +++++++ ...erEventResponseWebSearchCallSearching.java | 179 +++++++ .../ServerEventSessionAvatarSwitchToIdle.java | 104 ++++ ...verEventSessionAvatarSwitchToSpeaking.java | 104 ++++ .../ai/voicelive/models/ServerEventType.java | 74 +++ .../models/ServerVadTurnDetection.java | 42 +- .../models/SessionIncludeOption.java | 65 +++ .../voicelive/models/SessionResponseItem.java | 4 + .../ai/voicelive/models/SessionUpdate.java | 22 + ...nItemInputAudioTranscriptionCompleted.java | 43 ++ .../voicelive/models/TranscriptionPhrase.java | 194 +++++++ .../voicelive/models/TranscriptionWord.java | 127 +++++ .../models/VoiceLiveSessionOptions.java | 81 +++ .../models/VoiceLiveSessionResponse.java | 81 +++ .../META-INF/azure-ai-voicelive_metadata.json | 2 +- .../com/azure/ai/voicelive/ReadmeSamples.java | 2 +- .../AvatarAndAudioBufferEventsTest.java | 165 ++++++ .../models/AzureAvatarVoiceSyncVoiceTest.java | 131 +++++ .../TranscriptionAndIncludeOptionsTest.java | 239 +++++++++ .../models/WebAndFileSearchTest.java | 242 +++++++++ .../azure-ai-voicelive/tsp-location.yaml | 2 +- 55 files changed, 4955 insertions(+), 197 deletions(-) create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoice.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEventOutputAudioBufferClear.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/FileSearchResult.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItem.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItemStatus.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItem.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItemStatus.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventOutputAudioBufferCleared.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseAudioTranscriptAnnotationAdded.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallCompleted.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallInProgress.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallSearching.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseVideoDelta.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallCompleted.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallInProgress.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallSearching.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToIdle.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToSpeaking.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionIncludeOption.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/TranscriptionPhrase.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/TranscriptionWord.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AvatarAndAudioBufferEventsTest.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoiceTest.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/TranscriptionAndIncludeOptionsTest.java create mode 100644 sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/WebAndFileSearchTest.java diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 90b3c37c0214..76402f50e845 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -60,7 +60,7 @@ com.azure:azure-ai-textanalytics-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-ai-translation-text;1.1.8;2.0.0-beta.2 com.azure:azure-ai-translation-document;1.0.7;1.1.0-beta.1 com.azure:azure-ai-vision-face;1.0.0-beta.2;1.0.0-beta.3 -com.azure:azure-ai-voicelive;1.0.0-beta.6;1.0.0-beta.7 +com.azure:azure-ai-voicelive;1.0.0-beta.6;1.0.0 com.azure:azure-analytics-defender-easm;1.0.0-beta.1;1.0.0-beta.2 com.azure:azure-analytics-purview-datamap;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-analytics-onlineexperimentation;1.0.0-beta.1;1.0.0-beta.2 diff --git a/sdk/voicelive/azure-ai-voicelive/CHANGELOG.md b/sdk/voicelive/azure-ai-voicelive/CHANGELOG.md index fc1add4a73ff..554617099ad1 100644 --- a/sdk/voicelive/azure-ai-voicelive/CHANGELOG.md +++ b/sdk/voicelive/azure-ai-voicelive/CHANGELOG.md @@ -1,15 +1,69 @@ # Release History -## 1.0.0-beta.7 (Unreleased) +## 1.0.0 (Unreleased) + +This is the first General Availability (GA) release of the Azure VoiceLive client library for Java. +As of this release the public API is considered stable and will follow [Semantic Versioning](https://semver.org/); +future non-breaking enhancements will ship in `1.x` minor releases, and any breaking changes will require a `2.0.0` major bump. + +### Highlights since `1.0.0-beta.1` + +For users upgrading from an earlier beta, the cumulative changes between `1.0.0-beta.1` and `1.0.0` are: + +- **New session entry points** — direct Azure AI Foundry agent sessions via `VoiceLiveAsyncClient.startSession(AgentSessionConfig)` (added in beta.5). +- **Video avatar support** — `AvatarConfiguration` (with `Scene`, audit-audio forwarding), `AzureVoiceType.AVATAR_VOICE_SYNC` / `AzureAvatarVoiceSyncVoice`, the `response.video.delta` stream, `session.avatar.switch_to_{speaking,idle}` lifecycle events, and `output_audio_buffer.{clear,cleared}` events for the avatar audio buffer. +- **Tool calling expansion** — built-in MCP tool calls (items, approval flow, list-tools / call lifecycle events) plus new web-search and file-search tool calls (`ResponseWebSearchCallItem`, `ResponseFileSearchCallItem` with `FileSearchResult`, and full `*_search_call.{searching,in_progress,completed}` lifecycle events). +- **Transcription** — `TranscriptionPhrase` / `TranscriptionWord` with timing/confidence, `getLogprobs()` / `getPhrases()` on the transcription-completed event, the `response.audio_transcript.annotation.added` event, and new transcription models `gpt-4o-transcribe-diarize` and `mai-transcribe-1`. +- **Reasoning + interim responses** — `ReasoningEffort` configuration, `OutputTokenDetails.getReasoningTokens()`, and interim response configuration (`StaticInterimResponseConfig` / `LlmInterimResponseConfig`, plus per-request `ResponseCreateParams.setInterimResponse(BinaryData)`) to cover latency and tool-call gaps. +- **Session payload control** — `SessionIncludeOption` opt-in payloads (logprobs, phrases, file-search results) and free-form `metadata` (`Map`, up to 16 entries) on both `VoiceLiveSessionOptions` and `VoiceLiveSessionResponse`. +- **Personal voice catalog refresh** — added `DRAGON_HDOMNI_LATEST_NEURAL` and `MAI_VOICE_1`; removed `PHOENIX_V2NEURAL` (use `PHOENIX_LATEST_NEURAL` or one of the `DRAGON_*` / `MAI_VOICE_1` models). +- **Observability** — built-in OpenTelemetry tracing for `connect`/`send`/`recv`/`close` following GenAI semantic conventions, with session counters, content-recording opt-in, and `gen_ai.client.*` metrics (added in beta.6). +- **Reliability and ergonomics** — switched the WebSocket transport to the JDK DNS resolver to fix `UnknownHostException` on IPv6-limited networks, hardened all runnable samples (receive-first barrier, daemon worker threads, bounded queues, proper error propagation), and significantly improved Javadoc across voice and turn-detection model types. ### Features Added +- **Avatar voice synchronization** for video avatars: + - New `AzureVoiceType.AVATAR_VOICE_SYNC` and `AzureAvatarVoiceSyncVoice` class + - New server events `ServerEventSessionAvatarSwitchToSpeaking` / `ServerEventSessionAvatarSwitchToIdle` + - New `ServerEventResponseVideoDelta` for streaming avatar video frames + - New `ClientEventOutputAudioBufferClear` (`output_audio_buffer.clear`) and `ServerEventOutputAudioBufferCleared` (`output_audio_buffer.cleared`) for clearing the avatar output audio buffer +- **Web search and file search tool calls**: + - New `ItemType.WEB_SEARCH_CALL`, `ItemType.FILE_SEARCH_CALL` + - New `ResponseWebSearchCallItem` (with `ResponseWebSearchCallItemStatus`) and `ResponseFileSearchCallItem` (with `ResponseFileSearchCallItemStatus`, plus `FileSearchResult` results) + - New lifecycle server events: `ServerEventResponseWebSearchCall{Searching,InProgress,Completed}` and `ServerEventResponseFileSearchCall{Searching,InProgress,Completed}` +- **Transcription enhancements**: + - New transcription models on `AudioInputTranscriptionOptionsModel`: `GPT_4O_TRANSCRIBE_DIARIZE`, `MAI_TRANSCRIBE_1` + - New `TranscriptionPhrase` and `TranscriptionWord` types with timing/confidence information + - `SessionUpdateConversationItemInputAudioTranscriptionCompleted` now exposes `getLogprobs()` and `getPhrases()` + - New `ServerEventResponseAudioTranscriptAnnotationAdded` event +- **Session include options and metadata**: + - New `SessionIncludeOption` expandable enum for opting into additional response payloads (e.g. logprobs, phrases, file-search results) + - `VoiceLiveSessionOptions` and `VoiceLiveSessionResponse` now expose `include` (`List`) and `metadata` (`Map`, up to 16 entries) +- **Personal voice models**: added `PersonalVoiceModels.DRAGON_HDOMNI_LATEST_NEURAL` and `MAI_VOICE_1` +- **Reasoning token usage**: `OutputTokenDetails.getReasoningTokens()` exposes reasoning token counts +- **Interim response on response.create**: `ResponseCreateParams.setInterimResponse(BinaryData)` lets callers attach interim response config to a single response request +- Significantly improved Javadoc for `ServerVadTurnDetection`, `AzureCustomVoice`, `AzurePersonalVoice`, `AzureStandardVoice`, `AzureSemanticVadTurnDetection*`, and other model types + ### Breaking Changes +- Removed `PersonalVoiceModels.PHOENIX_V2NEURAL` (no longer supported by the service). Use `PHOENIX_LATEST_NEURAL` or one of the new `DRAGON_*` / `MAI_VOICE_1` models instead. + ### Bugs Fixed +- **Sample threading and reactive lifecycle hardening** (addresses production hazards in async samples): + - Added a receive-first barrier (`Sinks.One` gated on `receiveEvents().doOnSubscribe(...)`) in all runnable samples so `sendEvent(sessionConfig)` only runs after the hot multicast event stream is subscribed; this prevents missed events on session start. + - Composed receive + send pipelines into a single `Flux.merge(...).then()` lifecycle (notably `AgentV2Sample`) instead of detached `subscribe()` calls. + - Audio capture/playback worker threads are now daemon threads, block on `take()` / `read()` instead of busy-polling, and are explicitly interrupted during cleanup so JVM shutdown completes promptly. + - Used `volatile` and `AtomicReference` for cross-thread audio line / thread handles to fix Java Memory Model visibility races. + - Replaced unbounded queues with bounded `LinkedBlockingQueue(1000)`; `offer()` overflow now logs a warning instead of silently dropping audio. + - Replaced `doOnError().subscribe()` and bare `subscribe()` patterns with `subscribe(onNext, onError)` so errors are no longer swallowed. + - Fixed an unreachable completion message in `AuthenticationMethodsSample` and a `runMCPSample` signature mismatch in `MCPSample`. + ### Other Changes +- Updated all 9 runnable samples with user-friendly Javadoc ("when to use this sample" / "what happens when you run it") sections. +- Updated default service API version to track the latest TypeSpec spec. + ## 1.0.0-beta.6 (2026-05-01) ### Features Added diff --git a/sdk/voicelive/azure-ai-voicelive/README.md b/sdk/voicelive/azure-ai-voicelive/README.md index b225871644ac..01a3d2916552 100644 --- a/sdk/voicelive/azure-ai-voicelive/README.md +++ b/sdk/voicelive/azure-ai-voicelive/README.md @@ -27,7 +27,7 @@ Use the Azure VoiceLive client library for Java to: com.azure azure-ai-voicelive - 1.0.0-beta.2 + 1.0.0 ``` [//]: # ({x-version-update-end}) @@ -347,7 +347,7 @@ VoiceLiveSessionOptions options2 = new VoiceLiveSessionOptions() .setVoice(BinaryData.fromObject(new AzureCustomVoice("myCustomVoice", "myEndpointId"))); // Azure Personal Voice - requires speaker profile ID and model -// Models: DRAGON_LATEST_NEURAL, PHOENIX_LATEST_NEURAL, PHOENIX_V2NEURAL +// Models: DRAGON_LATEST_NEURAL, DRAGON_HDOMNI_LATEST_NEURAL, PHOENIX_LATEST_NEURAL, MAI_VOICE_1 VoiceLiveSessionOptions options3 = new VoiceLiveSessionOptions() .setVoice(BinaryData.fromObject( new AzurePersonalVoice("speakerProfileId", PersonalVoiceModels.PHOENIX_LATEST_NEURAL))); diff --git a/sdk/voicelive/azure-ai-voicelive/pom.xml b/sdk/voicelive/azure-ai-voicelive/pom.xml index d9b4d11cbf88..001444792dd6 100644 --- a/sdk/voicelive/azure-ai-voicelive/pom.xml +++ b/sdk/voicelive/azure-ai-voicelive/pom.xml @@ -14,7 +14,7 @@ Code generated by Microsoft (R) TypeSpec Code Generator. com.azure azure-ai-voicelive - 1.0.0-beta.7 + 1.0.0 jar Microsoft Azure SDK for VoiceLive diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AudioInputTranscriptionOptions.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AudioInputTranscriptionOptions.java index 8f8667556fd2..e499ff43588f 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AudioInputTranscriptionOptions.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AudioInputTranscriptionOptions.java @@ -22,7 +22,7 @@ public final class AudioInputTranscriptionOptions implements JsonSerializable values() { return values(AudioInputTranscriptionOptionsModel.class); } + + /** + * Static value gpt-4o-transcribe-diarize for AudioInputTranscriptionOptionsModel. + */ + @Generated + public static final AudioInputTranscriptionOptionsModel GPT_4O_TRANSCRIBE_DIARIZE + = fromString("gpt-4o-transcribe-diarize"); + + /** + * Static value mai-transcribe-1 for AudioInputTranscriptionOptionsModel. + */ + @Generated + public static final AudioInputTranscriptionOptionsModel MAI_TRANSCRIBE_1 = fromString("mai-transcribe-1"); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoice.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoice.java new file mode 100644 index 000000000000..563041e217c6 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoice.java @@ -0,0 +1,473 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Azure avatar voice sync configuration. Uses personal voice synthesis with avatar character. + */ +@Fluent +public final class AzureAvatarVoiceSyncVoice extends AzureVoice { + /* + * The type of the Azure voice. + */ + @Generated + private AzureVoiceType type = AzureVoiceType.AVATAR_VOICE_SYNC; + + /* + * Underlying neural model to use. + */ + @Generated + private final PersonalVoiceModels model; + + /* + * Temperature must be between 0.0 and 1.0. + */ + @Generated + private Double temperature; + + /* + * URL of a custom lexicon file for pronunciation customization. + */ + @Generated + private String customLexiconUrl; + + /* + * URL of a custom text normalization endpoint. + */ + @Generated + private String customTextNormalizationUrl; + + /* + * Preferred locales in BCP-47 format that change the accents of languages. + * If not set, TTS uses the default accent for each language (e.g., American English for English, + * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent + * to British English and the Spanish accent to European Spanish, while TTS can still speak other + * languages like French or Chinese with their default accents. + */ + @Generated + private List preferLocales; + + /* + * Enforced locale in BCP-47 format for TTS output. If set, TTS will always use the specified + * locale to speak. For example, setting locale to `en-US` forces American English accent for all + * text content, even if the text is in another language, and TTS will output silence for + * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically + * detects the language from the text content. + */ + @Generated + private String locale; + + /* + * Speaking style for the voice (e.g., 'cheerful', 'sad'). + */ + @Generated + private String style; + + /* + * Pitch adjustment for the voice output. Follows the same rules as the `pitch` attribute of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), + * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). + */ + @Generated + private String pitch; + + /* + * Speaking rate adjustment for the voice output. Follows the same rules as the `rate` attribute of + * the SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), + * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). + */ + @Generated + private String rate; + + /* + * Volume adjustment for the voice output. Follows the same rules as the `volume` attribute of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), + * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). + */ + @Generated + private String volume; + + /** + * Creates an instance of AzureAvatarVoiceSyncVoice class. + * + * @param model the model value to set. + */ + @Generated + public AzureAvatarVoiceSyncVoice(PersonalVoiceModels model) { + this.model = model; + } + + /** + * Get the type property: The type of the Azure voice. + * + * @return the type value. + */ + @Generated + @Override + public AzureVoiceType getType() { + return this.type; + } + + /** + * Get the model property: Underlying neural model to use. + * + * @return the model value. + */ + @Generated + public PersonalVoiceModels getModel() { + return this.model; + } + + /** + * Get the temperature property: Temperature must be between 0.0 and 1.0. + * + * @return the temperature value. + */ + @Generated + public Double getTemperature() { + return this.temperature; + } + + /** + * Set the temperature property: Temperature must be between 0.0 and 1.0. + * + * @param temperature the temperature value to set. + * @return the AzureAvatarVoiceSyncVoice object itself. + */ + @Generated + public AzureAvatarVoiceSyncVoice setTemperature(Double temperature) { + this.temperature = temperature; + return this; + } + + /** + * Get the customLexiconUrl property: URL of a custom lexicon file for pronunciation customization. + * + * @return the customLexiconUrl value. + */ + @Generated + public String getCustomLexiconUrl() { + return this.customLexiconUrl; + } + + /** + * Set the customLexiconUrl property: URL of a custom lexicon file for pronunciation customization. + * + * @param customLexiconUrl the customLexiconUrl value to set. + * @return the AzureAvatarVoiceSyncVoice object itself. + */ + @Generated + public AzureAvatarVoiceSyncVoice setCustomLexiconUrl(String customLexiconUrl) { + this.customLexiconUrl = customLexiconUrl; + return this; + } + + /** + * Get the customTextNormalizationUrl property: URL of a custom text normalization endpoint. + * + * @return the customTextNormalizationUrl value. + */ + @Generated + public String getCustomTextNormalizationUrl() { + return this.customTextNormalizationUrl; + } + + /** + * Set the customTextNormalizationUrl property: URL of a custom text normalization endpoint. + * + * @param customTextNormalizationUrl the customTextNormalizationUrl value to set. + * @return the AzureAvatarVoiceSyncVoice object itself. + */ + @Generated + public AzureAvatarVoiceSyncVoice setCustomTextNormalizationUrl(String customTextNormalizationUrl) { + this.customTextNormalizationUrl = customTextNormalizationUrl; + return this; + } + + /** + * Get the preferLocales property: Preferred locales in BCP-47 format that change the accents of languages. + * If not set, TTS uses the default accent for each language (e.g., American English for English, + * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent + * to British English and the Spanish accent to European Spanish, while TTS can still speak other + * languages like French or Chinese with their default accents. + * + * @return the preferLocales value. + */ + @Generated + public List getPreferLocales() { + return this.preferLocales; + } + + /** + * Set the preferLocales property: Preferred locales in BCP-47 format that change the accents of languages. + * If not set, TTS uses the default accent for each language (e.g., American English for English, + * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent + * to British English and the Spanish accent to European Spanish, while TTS can still speak other + * languages like French or Chinese with their default accents. + * + * @param preferLocales the preferLocales value to set. + * @return the AzureAvatarVoiceSyncVoice object itself. + */ + @Generated + public AzureAvatarVoiceSyncVoice setPreferLocales(List preferLocales) { + this.preferLocales = preferLocales; + return this; + } + + /** + * Get the locale property: Enforced locale in BCP-47 format for TTS output. If set, TTS will always use the + * specified + * locale to speak. For example, setting locale to `en-US` forces American English accent for all + * text content, even if the text is in another language, and TTS will output silence for + * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically + * detects the language from the text content. + * + * @return the locale value. + */ + @Generated + public String getLocale() { + return this.locale; + } + + /** + * Set the locale property: Enforced locale in BCP-47 format for TTS output. If set, TTS will always use the + * specified + * locale to speak. For example, setting locale to `en-US` forces American English accent for all + * text content, even if the text is in another language, and TTS will output silence for + * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically + * detects the language from the text content. + * + * @param locale the locale value to set. + * @return the AzureAvatarVoiceSyncVoice object itself. + */ + @Generated + public AzureAvatarVoiceSyncVoice setLocale(String locale) { + this.locale = locale; + return this; + } + + /** + * Get the style property: Speaking style for the voice (e.g., 'cheerful', 'sad'). + * + * @return the style value. + */ + @Generated + public String getStyle() { + return this.style; + } + + /** + * Set the style property: Speaking style for the voice (e.g., 'cheerful', 'sad'). + * + * @param style the style value to set. + * @return the AzureAvatarVoiceSyncVoice object itself. + */ + @Generated + public AzureAvatarVoiceSyncVoice setStyle(String style) { + this.style = style; + return this; + } + + /** + * Get the pitch property: Pitch adjustment for the voice output. Follows the same rules as the `pitch` attribute of + * the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), + * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). + * + * @return the pitch value. + */ + @Generated + public String getPitch() { + return this.pitch; + } + + /** + * Set the pitch property: Pitch adjustment for the voice output. Follows the same rules as the `pitch` attribute of + * the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), + * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). + * + * @param pitch the pitch value to set. + * @return the AzureAvatarVoiceSyncVoice object itself. + */ + @Generated + public AzureAvatarVoiceSyncVoice setPitch(String pitch) { + this.pitch = pitch; + return this; + } + + /** + * Get the rate property: Speaking rate adjustment for the voice output. Follows the same rules as the `rate` + * attribute of + * the SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), + * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). + * + * @return the rate value. + */ + @Generated + public String getRate() { + return this.rate; + } + + /** + * Set the rate property: Speaking rate adjustment for the voice output. Follows the same rules as the `rate` + * attribute of + * the SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), + * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). + * + * @param rate the rate value to set. + * @return the AzureAvatarVoiceSyncVoice object itself. + */ + @Generated + public AzureAvatarVoiceSyncVoice setRate(String rate) { + this.rate = rate; + return this; + } + + /** + * Get the volume property: Volume adjustment for the voice output. Follows the same rules as the `volume` attribute + * of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), + * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). + * + * @return the volume value. + */ + @Generated + public String getVolume() { + return this.volume; + } + + /** + * Set the volume property: Volume adjustment for the voice output. Follows the same rules as the `volume` attribute + * of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), + * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). + * + * @param volume the volume value to set. + * @return the AzureAvatarVoiceSyncVoice object itself. + */ + @Generated + public AzureAvatarVoiceSyncVoice setVolume(String volume) { + this.volume = volume; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("model", this.model == null ? null : this.model.toString()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeNumberField("temperature", this.temperature); + jsonWriter.writeStringField("custom_lexicon_url", this.customLexiconUrl); + jsonWriter.writeStringField("custom_text_normalization_url", this.customTextNormalizationUrl); + jsonWriter.writeArrayField("prefer_locales", this.preferLocales, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("locale", this.locale); + jsonWriter.writeStringField("style", this.style); + jsonWriter.writeStringField("pitch", this.pitch); + jsonWriter.writeStringField("rate", this.rate); + jsonWriter.writeStringField("volume", this.volume); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureAvatarVoiceSyncVoice from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureAvatarVoiceSyncVoice if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AzureAvatarVoiceSyncVoice. + */ + @Generated + public static AzureAvatarVoiceSyncVoice fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PersonalVoiceModels model = null; + AzureVoiceType type = AzureVoiceType.AVATAR_VOICE_SYNC; + Double temperature = null; + String customLexiconUrl = null; + String customTextNormalizationUrl = null; + List preferLocales = null; + String locale = null; + String style = null; + String pitch = null; + String rate = null; + String volume = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("model".equals(fieldName)) { + model = PersonalVoiceModels.fromString(reader.getString()); + } else if ("type".equals(fieldName)) { + type = AzureVoiceType.fromString(reader.getString()); + } else if ("temperature".equals(fieldName)) { + temperature = reader.getNullable(JsonReader::getDouble); + } else if ("custom_lexicon_url".equals(fieldName)) { + customLexiconUrl = reader.getString(); + } else if ("custom_text_normalization_url".equals(fieldName)) { + customTextNormalizationUrl = reader.getString(); + } else if ("prefer_locales".equals(fieldName)) { + preferLocales = reader.readArray(reader1 -> reader1.getString()); + } else if ("locale".equals(fieldName)) { + locale = reader.getString(); + } else if ("style".equals(fieldName)) { + style = reader.getString(); + } else if ("pitch".equals(fieldName)) { + pitch = reader.getString(); + } else if ("rate".equals(fieldName)) { + rate = reader.getString(); + } else if ("volume".equals(fieldName)) { + volume = reader.getString(); + } else { + reader.skipChildren(); + } + } + AzureAvatarVoiceSyncVoice deserializedAzureAvatarVoiceSyncVoice = new AzureAvatarVoiceSyncVoice(model); + deserializedAzureAvatarVoiceSyncVoice.type = type; + deserializedAzureAvatarVoiceSyncVoice.temperature = temperature; + deserializedAzureAvatarVoiceSyncVoice.customLexiconUrl = customLexiconUrl; + deserializedAzureAvatarVoiceSyncVoice.customTextNormalizationUrl = customTextNormalizationUrl; + deserializedAzureAvatarVoiceSyncVoice.preferLocales = preferLocales; + deserializedAzureAvatarVoiceSyncVoice.locale = locale; + deserializedAzureAvatarVoiceSyncVoice.style = style; + deserializedAzureAvatarVoiceSyncVoice.pitch = pitch; + deserializedAzureAvatarVoiceSyncVoice.rate = rate; + deserializedAzureAvatarVoiceSyncVoice.volume = volume; + + return deserializedAzureAvatarVoiceSyncVoice; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureCustomVoice.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureCustomVoice.java index 885fb6de560b..bcac97dab906 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureCustomVoice.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureCustomVoice.java @@ -42,43 +42,63 @@ public final class AzureCustomVoice extends AzureVoice { private Double temperature; /* - * The custom_lexicon_url property. + * URL of a custom lexicon file for pronunciation customization. */ @Generated private String customLexiconUri; /* - * The prefer_locales property. + * Preferred locales in BCP-47 format that change the accents of languages. + * If not set, TTS uses the default accent for each language (e.g., American English for English, + * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent + * to British English and the Spanish accent to European Spanish, while TTS can still speak other + * languages like French or Chinese with their default accents. */ @Generated private List preferLocales; /* - * The locale property. + * Enforced locale in BCP-47 format for TTS output. If set, TTS will always use the specified + * locale to speak. For example, setting locale to `en-US` forces American English accent for all + * text content, even if the text is in another language, and TTS will output silence for + * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically + * detects the language from the text content. */ @Generated private String locale; /* - * The style property. + * Speaking style for the voice (e.g., 'cheerful', 'sad'). */ @Generated private String style; /* - * The pitch property. + * Pitch adjustment for the voice output. Follows the same rules as the `pitch` attribute of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), + * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). */ @Generated private String pitch; /* - * The rate property. + * Speaking rate adjustment for the voice output. Follows the same rules as the `rate` attribute of + * the SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), + * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). */ @Generated private String rate; /* - * The volume property. + * Volume adjustment for the voice output. Follows the same rules as the `volume` attribute of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), + * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). */ @Generated private String volume; @@ -149,7 +169,7 @@ public AzureCustomVoice setTemperature(Double temperature) { } /** - * Get the customLexiconUri property: The custom_lexicon_url property. + * Get the customLexiconUri property: URL of a custom lexicon file for pronunciation customization. * * @return the customLexiconUri value. */ @@ -159,7 +179,7 @@ public String getCustomLexiconUri() { } /** - * Set the customLexiconUri property: The custom_lexicon_url property. + * Set the customLexiconUri property: URL of a custom lexicon file for pronunciation customization. * * @param customLexiconUri the customLexiconUri value to set. * @return the AzureCustomVoice object itself. @@ -171,7 +191,11 @@ public AzureCustomVoice setCustomLexiconUri(String customLexiconUri) { } /** - * Get the preferLocales property: The prefer_locales property. + * Get the preferLocales property: Preferred locales in BCP-47 format that change the accents of languages. + * If not set, TTS uses the default accent for each language (e.g., American English for English, + * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent + * to British English and the Spanish accent to European Spanish, while TTS can still speak other + * languages like French or Chinese with their default accents. * * @return the preferLocales value. */ @@ -181,7 +205,11 @@ public List getPreferLocales() { } /** - * Set the preferLocales property: The prefer_locales property. + * Set the preferLocales property: Preferred locales in BCP-47 format that change the accents of languages. + * If not set, TTS uses the default accent for each language (e.g., American English for English, + * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent + * to British English and the Spanish accent to European Spanish, while TTS can still speak other + * languages like French or Chinese with their default accents. * * @param preferLocales the preferLocales value to set. * @return the AzureCustomVoice object itself. @@ -193,7 +221,12 @@ public AzureCustomVoice setPreferLocales(List preferLocales) { } /** - * Get the locale property: The locale property. + * Get the locale property: Enforced locale in BCP-47 format for TTS output. If set, TTS will always use the + * specified + * locale to speak. For example, setting locale to `en-US` forces American English accent for all + * text content, even if the text is in another language, and TTS will output silence for + * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically + * detects the language from the text content. * * @return the locale value. */ @@ -203,7 +236,12 @@ public String getLocale() { } /** - * Set the locale property: The locale property. + * Set the locale property: Enforced locale in BCP-47 format for TTS output. If set, TTS will always use the + * specified + * locale to speak. For example, setting locale to `en-US` forces American English accent for all + * text content, even if the text is in another language, and TTS will output silence for + * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically + * detects the language from the text content. * * @param locale the locale value to set. * @return the AzureCustomVoice object itself. @@ -215,7 +253,7 @@ public AzureCustomVoice setLocale(String locale) { } /** - * Get the style property: The style property. + * Get the style property: Speaking style for the voice (e.g., 'cheerful', 'sad'). * * @return the style value. */ @@ -225,7 +263,7 @@ public String getStyle() { } /** - * Set the style property: The style property. + * Set the style property: Speaking style for the voice (e.g., 'cheerful', 'sad'). * * @param style the style value to set. * @return the AzureCustomVoice object itself. @@ -237,7 +275,12 @@ public AzureCustomVoice setStyle(String style) { } /** - * Get the pitch property: The pitch property. + * Get the pitch property: Pitch adjustment for the voice output. Follows the same rules as the `pitch` attribute of + * the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), + * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). * * @return the pitch value. */ @@ -247,7 +290,12 @@ public String getPitch() { } /** - * Set the pitch property: The pitch property. + * Set the pitch property: Pitch adjustment for the voice output. Follows the same rules as the `pitch` attribute of + * the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), + * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). * * @param pitch the pitch value to set. * @return the AzureCustomVoice object itself. @@ -259,7 +307,12 @@ public AzureCustomVoice setPitch(String pitch) { } /** - * Get the rate property: The rate property. + * Get the rate property: Speaking rate adjustment for the voice output. Follows the same rules as the `rate` + * attribute of + * the SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), + * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). * * @return the rate value. */ @@ -269,7 +322,12 @@ public String getRate() { } /** - * Set the rate property: The rate property. + * Set the rate property: Speaking rate adjustment for the voice output. Follows the same rules as the `rate` + * attribute of + * the SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), + * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). * * @param rate the rate value to set. * @return the AzureCustomVoice object itself. @@ -281,7 +339,12 @@ public AzureCustomVoice setRate(String rate) { } /** - * Get the volume property: The volume property. + * Get the volume property: Volume adjustment for the voice output. Follows the same rules as the `volume` attribute + * of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), + * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). * * @return the volume value. */ @@ -291,7 +354,12 @@ public String getVolume() { } /** - * Set the volume property: The volume property. + * Set the volume property: Volume adjustment for the voice output. Follows the same rules as the `volume` attribute + * of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), + * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). * * @param volume the volume value to set. * @return the AzureCustomVoice object itself. @@ -396,13 +464,13 @@ public static AzureCustomVoice fromJson(JsonReader jsonReader) throws IOExceptio } /* - * The custom_text_normalization_url property. + * URL of a custom text normalization endpoint. */ @Generated private String customTextNormalizationUrl; /** - * Get the customTextNormalizationUrl property: The custom_text_normalization_url property. + * Get the customTextNormalizationUrl property: URL of a custom text normalization endpoint. * * @return the customTextNormalizationUrl value. */ @@ -412,7 +480,7 @@ public String getCustomTextNormalizationUrl() { } /** - * Set the customTextNormalizationUrl property: The custom_text_normalization_url property. + * Set the customTextNormalizationUrl property: URL of a custom text normalization endpoint. * * @param customTextNormalizationUrl the customTextNormalizationUrl value to set. * @return the AzureCustomVoice object itself. diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzurePersonalVoice.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzurePersonalVoice.java index ae49f535dc08..28d78181d288 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzurePersonalVoice.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzurePersonalVoice.java @@ -200,49 +200,69 @@ public static AzurePersonalVoice fromJson(JsonReader jsonReader) throws IOExcept } /* - * The custom_lexicon_url property. + * URL of a custom lexicon file for pronunciation customization. */ @Generated private String customLexiconUrl; /* - * The prefer_locales property. + * Preferred locales in BCP-47 format that change the accents of languages. + * If not set, TTS uses the default accent for each language (e.g., American English for English, + * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent + * to British English and the Spanish accent to European Spanish, while TTS can still speak other + * languages like French or Chinese with their default accents. */ @Generated private List preferLocales; /* - * The locale property. + * Enforced locale in BCP-47 format for TTS output. If set, TTS will always use the specified + * locale to speak. For example, setting locale to `en-US` forces American English accent for all + * text content, even if the text is in another language, and TTS will output silence for + * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically + * detects the language from the text content. */ @Generated private String locale; /* - * The style property. + * Speaking style for the voice (e.g., 'cheerful', 'sad'). */ @Generated private String style; /* - * The pitch property. + * Pitch adjustment for the voice output. Follows the same rules as the `pitch` attribute of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), + * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). */ @Generated private String pitch; /* - * The rate property. + * Speaking rate adjustment for the voice output. Follows the same rules as the `rate` attribute of + * the SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), + * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). */ @Generated private String rate; /* - * The volume property. + * Volume adjustment for the voice output. Follows the same rules as the `volume` attribute of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), + * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). */ @Generated private String volume; /** - * Get the customLexiconUrl property: The custom_lexicon_url property. + * Get the customLexiconUrl property: URL of a custom lexicon file for pronunciation customization. * * @return the customLexiconUrl value. */ @@ -252,7 +272,7 @@ public String getCustomLexiconUrl() { } /** - * Set the customLexiconUrl property: The custom_lexicon_url property. + * Set the customLexiconUrl property: URL of a custom lexicon file for pronunciation customization. * * @param customLexiconUrl the customLexiconUrl value to set. * @return the AzurePersonalVoice object itself. @@ -264,7 +284,11 @@ public AzurePersonalVoice setCustomLexiconUrl(String customLexiconUrl) { } /** - * Get the preferLocales property: The prefer_locales property. + * Get the preferLocales property: Preferred locales in BCP-47 format that change the accents of languages. + * If not set, TTS uses the default accent for each language (e.g., American English for English, + * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent + * to British English and the Spanish accent to European Spanish, while TTS can still speak other + * languages like French or Chinese with their default accents. * * @return the preferLocales value. */ @@ -274,7 +298,11 @@ public List getPreferLocales() { } /** - * Set the preferLocales property: The prefer_locales property. + * Set the preferLocales property: Preferred locales in BCP-47 format that change the accents of languages. + * If not set, TTS uses the default accent for each language (e.g., American English for English, + * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent + * to British English and the Spanish accent to European Spanish, while TTS can still speak other + * languages like French or Chinese with their default accents. * * @param preferLocales the preferLocales value to set. * @return the AzurePersonalVoice object itself. @@ -286,7 +314,12 @@ public AzurePersonalVoice setPreferLocales(List preferLocales) { } /** - * Get the locale property: The locale property. + * Get the locale property: Enforced locale in BCP-47 format for TTS output. If set, TTS will always use the + * specified + * locale to speak. For example, setting locale to `en-US` forces American English accent for all + * text content, even if the text is in another language, and TTS will output silence for + * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically + * detects the language from the text content. * * @return the locale value. */ @@ -296,7 +329,12 @@ public String getLocale() { } /** - * Set the locale property: The locale property. + * Set the locale property: Enforced locale in BCP-47 format for TTS output. If set, TTS will always use the + * specified + * locale to speak. For example, setting locale to `en-US` forces American English accent for all + * text content, even if the text is in another language, and TTS will output silence for + * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically + * detects the language from the text content. * * @param locale the locale value to set. * @return the AzurePersonalVoice object itself. @@ -308,7 +346,7 @@ public AzurePersonalVoice setLocale(String locale) { } /** - * Get the style property: The style property. + * Get the style property: Speaking style for the voice (e.g., 'cheerful', 'sad'). * * @return the style value. */ @@ -318,7 +356,7 @@ public String getStyle() { } /** - * Set the style property: The style property. + * Set the style property: Speaking style for the voice (e.g., 'cheerful', 'sad'). * * @param style the style value to set. * @return the AzurePersonalVoice object itself. @@ -330,7 +368,12 @@ public AzurePersonalVoice setStyle(String style) { } /** - * Get the pitch property: The pitch property. + * Get the pitch property: Pitch adjustment for the voice output. Follows the same rules as the `pitch` attribute of + * the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), + * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). * * @return the pitch value. */ @@ -340,7 +383,12 @@ public String getPitch() { } /** - * Set the pitch property: The pitch property. + * Set the pitch property: Pitch adjustment for the voice output. Follows the same rules as the `pitch` attribute of + * the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), + * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). * * @param pitch the pitch value to set. * @return the AzurePersonalVoice object itself. @@ -352,7 +400,12 @@ public AzurePersonalVoice setPitch(String pitch) { } /** - * Get the rate property: The rate property. + * Get the rate property: Speaking rate adjustment for the voice output. Follows the same rules as the `rate` + * attribute of + * the SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), + * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). * * @return the rate value. */ @@ -362,7 +415,12 @@ public String getRate() { } /** - * Set the rate property: The rate property. + * Set the rate property: Speaking rate adjustment for the voice output. Follows the same rules as the `rate` + * attribute of + * the SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), + * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). * * @param rate the rate value to set. * @return the AzurePersonalVoice object itself. @@ -374,7 +432,12 @@ public AzurePersonalVoice setRate(String rate) { } /** - * Get the volume property: The volume property. + * Get the volume property: Volume adjustment for the voice output. Follows the same rules as the `volume` attribute + * of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), + * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). * * @return the volume value. */ @@ -384,7 +447,12 @@ public String getVolume() { } /** - * Set the volume property: The volume property. + * Set the volume property: Volume adjustment for the voice output. Follows the same rules as the `volume` attribute + * of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), + * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). * * @param volume the volume value to set. * @return the AzurePersonalVoice object itself. @@ -396,13 +464,13 @@ public AzurePersonalVoice setVolume(String volume) { } /* - * The custom_text_normalization_url property. + * URL of a custom text normalization endpoint. */ @Generated private String customTextNormalizationUrl; /** - * Get the customTextNormalizationUrl property: The custom_text_normalization_url property. + * Get the customTextNormalizationUrl property: URL of a custom text normalization endpoint. * * @return the customTextNormalizationUrl value. */ @@ -412,7 +480,7 @@ public String getCustomTextNormalizationUrl() { } /** - * Set the customTextNormalizationUrl property: The custom_text_normalization_url property. + * Set the customTextNormalizationUrl property: URL of a custom text normalization endpoint. * * @param customTextNormalizationUrl the customTextNormalizationUrl value to set. * @return the AzurePersonalVoice object itself. diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetection.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetection.java index 14f053718a45..c7a047d394d4 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetection.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetection.java @@ -24,61 +24,61 @@ public final class AzureSemanticVadTurnDetection extends TurnDetection { private TurnDetectionType type = TurnDetectionType.AZURE_SEMANTIC_VAD; /* - * The threshold property. + * Activation threshold for VAD detection. Range: 0.0 to 1.0. */ @Generated private Double threshold; /* - * The prefix_padding_ms property. + * Amount of audio to include before speech is detected, in milliseconds. */ @Generated private Integer prefixPaddingMs; /* - * The silence_duration_ms property. + * Duration of silence required to end speech detection, in milliseconds. */ @Generated private Integer silenceDurationMs; /* - * The end_of_utterance_detection property. + * Configuration for end-of-utterance detection. */ @Generated private EouDetection endOfUtteranceDetection; /* - * The speech_duration_ms property. + * Minimum speech duration in milliseconds to trigger detection. */ @Generated private Integer speechDurationMs; /* - * The remove_filler_words property. + * Whether to remove filler words (e.g., 'um', 'uh') from transcription. */ @Generated private Boolean removeFillerWords; /* - * The languages property. + * List of BCP-47 language codes for speech detection. */ @Generated private List languages; /* - * The auto_truncate property. + * Whether to automatically truncate the audio buffer when speech stops. */ @Generated private Boolean autoTruncate; /* - * The create_response property. + * Whether to automatically create a response when speech stops. */ @Generated private Boolean createResponse; /* - * The interrupt_response property. + * Whether to allow the user's speech to interrupt the assistant's response. */ @Generated private Boolean interruptResponse; @@ -102,7 +102,7 @@ public TurnDetectionType getType() { } /** - * Get the threshold property: The threshold property. + * Get the threshold property: Activation threshold for VAD detection. Range: 0.0 to 1.0. * * @return the threshold value. */ @@ -112,7 +112,7 @@ public Double getThreshold() { } /** - * Set the threshold property: The threshold property. + * Set the threshold property: Activation threshold for VAD detection. Range: 0.0 to 1.0. * * @param threshold the threshold value to set. * @return the AzureSemanticVadTurnDetection object itself. @@ -124,7 +124,7 @@ public AzureSemanticVadTurnDetection setThreshold(Double threshold) { } /** - * Get the prefixPaddingMs property: The prefix_padding_ms property. + * Get the prefixPaddingMs property: Amount of audio to include before speech is detected, in milliseconds. * * @return the prefixPaddingMs value. */ @@ -134,7 +134,7 @@ public Integer getPrefixPaddingMs() { } /** - * Set the prefixPaddingMs property: The prefix_padding_ms property. + * Set the prefixPaddingMs property: Amount of audio to include before speech is detected, in milliseconds. * * @param prefixPaddingMs the prefixPaddingMs value to set. * @return the AzureSemanticVadTurnDetection object itself. @@ -146,7 +146,7 @@ public AzureSemanticVadTurnDetection setPrefixPaddingMs(Integer prefixPaddingMs) } /** - * Get the silenceDurationMs property: The silence_duration_ms property. + * Get the silenceDurationMs property: Duration of silence required to end speech detection, in milliseconds. * * @return the silenceDurationMs value. */ @@ -156,7 +156,7 @@ public Integer getSilenceDurationMs() { } /** - * Set the silenceDurationMs property: The silence_duration_ms property. + * Set the silenceDurationMs property: Duration of silence required to end speech detection, in milliseconds. * * @param silenceDurationMs the silenceDurationMs value to set. * @return the AzureSemanticVadTurnDetection object itself. @@ -168,7 +168,7 @@ public AzureSemanticVadTurnDetection setSilenceDurationMs(Integer silenceDuratio } /** - * Get the endOfUtteranceDetection property: The end_of_utterance_detection property. + * Get the endOfUtteranceDetection property: Configuration for end-of-utterance detection. * * @return the endOfUtteranceDetection value. */ @@ -178,7 +178,7 @@ public EouDetection getEndOfUtteranceDetection() { } /** - * Set the endOfUtteranceDetection property: The end_of_utterance_detection property. + * Set the endOfUtteranceDetection property: Configuration for end-of-utterance detection. * * @param endOfUtteranceDetection the endOfUtteranceDetection value to set. * @return the AzureSemanticVadTurnDetection object itself. @@ -190,7 +190,7 @@ public AzureSemanticVadTurnDetection setEndOfUtteranceDetection(EouDetection end } /** - * Get the speechDurationMs property: The speech_duration_ms property. + * Get the speechDurationMs property: Minimum speech duration in milliseconds to trigger detection. * * @return the speechDurationMs value. */ @@ -200,7 +200,7 @@ public Integer getSpeechDurationMs() { } /** - * Set the speechDurationMs property: The speech_duration_ms property. + * Set the speechDurationMs property: Minimum speech duration in milliseconds to trigger detection. * * @param speechDurationMs the speechDurationMs value to set. * @return the AzureSemanticVadTurnDetection object itself. @@ -212,7 +212,7 @@ public AzureSemanticVadTurnDetection setSpeechDurationMs(Integer speechDurationM } /** - * Get the removeFillerWords property: The remove_filler_words property. + * Get the removeFillerWords property: Whether to remove filler words (e.g., 'um', 'uh') from transcription. * * @return the removeFillerWords value. */ @@ -222,7 +222,7 @@ public Boolean isRemoveFillerWords() { } /** - * Set the removeFillerWords property: The remove_filler_words property. + * Set the removeFillerWords property: Whether to remove filler words (e.g., 'um', 'uh') from transcription. * * @param removeFillerWords the removeFillerWords value to set. * @return the AzureSemanticVadTurnDetection object itself. @@ -234,7 +234,7 @@ public AzureSemanticVadTurnDetection setRemoveFillerWords(Boolean removeFillerWo } /** - * Get the languages property: The languages property. + * Get the languages property: List of BCP-47 language codes for speech detection. * * @return the languages value. */ @@ -244,7 +244,7 @@ public List getLanguages() { } /** - * Set the languages property: The languages property. + * Set the languages property: List of BCP-47 language codes for speech detection. * * @param languages the languages value to set. * @return the AzureSemanticVadTurnDetection object itself. @@ -256,7 +256,7 @@ public AzureSemanticVadTurnDetection setLanguages(List languages) { } /** - * Get the autoTruncate property: The auto_truncate property. + * Get the autoTruncate property: Whether to automatically truncate the audio buffer when speech stops. * * @return the autoTruncate value. */ @@ -266,7 +266,7 @@ public Boolean isAutoTruncate() { } /** - * Set the autoTruncate property: The auto_truncate property. + * Set the autoTruncate property: Whether to automatically truncate the audio buffer when speech stops. * * @param autoTruncate the autoTruncate value to set. * @return the AzureSemanticVadTurnDetection object itself. @@ -278,7 +278,7 @@ public AzureSemanticVadTurnDetection setAutoTruncate(Boolean autoTruncate) { } /** - * Get the createResponse property: The create_response property. + * Get the createResponse property: Whether to automatically create a response when speech stops. * * @return the createResponse value. */ @@ -288,7 +288,7 @@ public Boolean isCreateResponse() { } /** - * Set the createResponse property: The create_response property. + * Set the createResponse property: Whether to automatically create a response when speech stops. * * @param createResponse the createResponse value to set. * @return the AzureSemanticVadTurnDetection object itself. @@ -300,7 +300,7 @@ public AzureSemanticVadTurnDetection setCreateResponse(Boolean createResponse) { } /** - * Get the interruptResponse property: The interrupt_response property. + * Get the interruptResponse property: Whether to allow the user's speech to interrupt the assistant's response. * * @return the interruptResponse value. */ @@ -310,7 +310,7 @@ public Boolean isInterruptResponse() { } /** - * Set the interruptResponse property: The interrupt_response property. + * Set the interruptResponse property: Whether to allow the user's speech to interrupt the assistant's response. * * @param interruptResponse the interruptResponse value to set. * @return the AzureSemanticVadTurnDetection object itself. diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionEn.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionEn.java index c74da5e3518f..26de9078fc7c 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionEn.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionEn.java @@ -23,55 +23,55 @@ public final class AzureSemanticVadTurnDetectionEn extends TurnDetection { private TurnDetectionType type = TurnDetectionType.AZURE_SEMANTIC_VAD_EN; /* - * The threshold property. + * Activation threshold for VAD detection. Range: 0.0 to 1.0. */ @Generated private Double threshold; /* - * The prefix_padding_ms property. + * Amount of audio to include before speech is detected, in milliseconds. */ @Generated private Integer prefixPaddingMs; /* - * The silence_duration_ms property. + * Duration of silence required to end speech detection, in milliseconds. */ @Generated private Integer silenceDurationMs; /* - * The end_of_utterance_detection property. + * Configuration for end-of-utterance detection. */ @Generated private EouDetection endOfUtteranceDetection; /* - * The speech_duration_ms property. + * Minimum speech duration in milliseconds to trigger detection. */ @Generated private Integer speechDurationMs; /* - * The remove_filler_words property. + * Whether to remove filler words (e.g., 'um', 'uh') from transcription. */ @Generated private Boolean removeFillerWords; /* - * The auto_truncate property. + * Whether to automatically truncate the audio buffer when speech stops. */ @Generated private Boolean autoTruncate; /* - * The create_response property. + * Whether to automatically create a response when speech stops. */ @Generated private Boolean createResponse; /* - * The interrupt_response property. + * Whether to allow the user's speech to interrupt the assistant's response. */ @Generated private Boolean interruptResponse; @@ -95,7 +95,7 @@ public TurnDetectionType getType() { } /** - * Get the threshold property: The threshold property. + * Get the threshold property: Activation threshold for VAD detection. Range: 0.0 to 1.0. * * @return the threshold value. */ @@ -105,7 +105,7 @@ public Double getThreshold() { } /** - * Set the threshold property: The threshold property. + * Set the threshold property: Activation threshold for VAD detection. Range: 0.0 to 1.0. * * @param threshold the threshold value to set. * @return the AzureSemanticVadTurnDetectionEn object itself. @@ -117,7 +117,7 @@ public AzureSemanticVadTurnDetectionEn setThreshold(Double threshold) { } /** - * Get the prefixPaddingMs property: The prefix_padding_ms property. + * Get the prefixPaddingMs property: Amount of audio to include before speech is detected, in milliseconds. * * @return the prefixPaddingMs value. */ @@ -127,7 +127,7 @@ public Integer getPrefixPaddingMs() { } /** - * Set the prefixPaddingMs property: The prefix_padding_ms property. + * Set the prefixPaddingMs property: Amount of audio to include before speech is detected, in milliseconds. * * @param prefixPaddingMs the prefixPaddingMs value to set. * @return the AzureSemanticVadTurnDetectionEn object itself. @@ -139,7 +139,7 @@ public AzureSemanticVadTurnDetectionEn setPrefixPaddingMs(Integer prefixPaddingM } /** - * Get the silenceDurationMs property: The silence_duration_ms property. + * Get the silenceDurationMs property: Duration of silence required to end speech detection, in milliseconds. * * @return the silenceDurationMs value. */ @@ -149,7 +149,7 @@ public Integer getSilenceDurationMs() { } /** - * Set the silenceDurationMs property: The silence_duration_ms property. + * Set the silenceDurationMs property: Duration of silence required to end speech detection, in milliseconds. * * @param silenceDurationMs the silenceDurationMs value to set. * @return the AzureSemanticVadTurnDetectionEn object itself. @@ -161,7 +161,7 @@ public AzureSemanticVadTurnDetectionEn setSilenceDurationMs(Integer silenceDurat } /** - * Get the endOfUtteranceDetection property: The end_of_utterance_detection property. + * Get the endOfUtteranceDetection property: Configuration for end-of-utterance detection. * * @return the endOfUtteranceDetection value. */ @@ -171,7 +171,7 @@ public EouDetection getEndOfUtteranceDetection() { } /** - * Set the endOfUtteranceDetection property: The end_of_utterance_detection property. + * Set the endOfUtteranceDetection property: Configuration for end-of-utterance detection. * * @param endOfUtteranceDetection the endOfUtteranceDetection value to set. * @return the AzureSemanticVadTurnDetectionEn object itself. @@ -183,7 +183,7 @@ public AzureSemanticVadTurnDetectionEn setEndOfUtteranceDetection(EouDetection e } /** - * Get the speechDurationMs property: The speech_duration_ms property. + * Get the speechDurationMs property: Minimum speech duration in milliseconds to trigger detection. * * @return the speechDurationMs value. */ @@ -193,7 +193,7 @@ public Integer getSpeechDurationMs() { } /** - * Set the speechDurationMs property: The speech_duration_ms property. + * Set the speechDurationMs property: Minimum speech duration in milliseconds to trigger detection. * * @param speechDurationMs the speechDurationMs value to set. * @return the AzureSemanticVadTurnDetectionEn object itself. @@ -205,7 +205,7 @@ public AzureSemanticVadTurnDetectionEn setSpeechDurationMs(Integer speechDuratio } /** - * Get the removeFillerWords property: The remove_filler_words property. + * Get the removeFillerWords property: Whether to remove filler words (e.g., 'um', 'uh') from transcription. * * @return the removeFillerWords value. */ @@ -215,7 +215,7 @@ public Boolean isRemoveFillerWords() { } /** - * Set the removeFillerWords property: The remove_filler_words property. + * Set the removeFillerWords property: Whether to remove filler words (e.g., 'um', 'uh') from transcription. * * @param removeFillerWords the removeFillerWords value to set. * @return the AzureSemanticVadTurnDetectionEn object itself. @@ -227,7 +227,7 @@ public AzureSemanticVadTurnDetectionEn setRemoveFillerWords(Boolean removeFiller } /** - * Get the autoTruncate property: The auto_truncate property. + * Get the autoTruncate property: Whether to automatically truncate the audio buffer when speech stops. * * @return the autoTruncate value. */ @@ -237,7 +237,7 @@ public Boolean isAutoTruncate() { } /** - * Set the autoTruncate property: The auto_truncate property. + * Set the autoTruncate property: Whether to automatically truncate the audio buffer when speech stops. * * @param autoTruncate the autoTruncate value to set. * @return the AzureSemanticVadTurnDetectionEn object itself. @@ -249,7 +249,7 @@ public AzureSemanticVadTurnDetectionEn setAutoTruncate(Boolean autoTruncate) { } /** - * Get the createResponse property: The create_response property. + * Get the createResponse property: Whether to automatically create a response when speech stops. * * @return the createResponse value. */ @@ -259,7 +259,7 @@ public Boolean isCreateResponse() { } /** - * Set the createResponse property: The create_response property. + * Set the createResponse property: Whether to automatically create a response when speech stops. * * @param createResponse the createResponse value to set. * @return the AzureSemanticVadTurnDetectionEn object itself. @@ -271,7 +271,7 @@ public AzureSemanticVadTurnDetectionEn setCreateResponse(Boolean createResponse) } /** - * Get the interruptResponse property: The interrupt_response property. + * Get the interruptResponse property: Whether to allow the user's speech to interrupt the assistant's response. * * @return the interruptResponse value. */ @@ -281,7 +281,7 @@ public Boolean isInterruptResponse() { } /** - * Set the interruptResponse property: The interrupt_response property. + * Set the interruptResponse property: Whether to allow the user's speech to interrupt the assistant's response. * * @param interruptResponse the interruptResponse value to set. * @return the AzureSemanticVadTurnDetectionEn object itself. diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionMultilingual.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionMultilingual.java index 8f5a24484f78..c15fbb609808 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionMultilingual.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionMultilingual.java @@ -24,61 +24,61 @@ public final class AzureSemanticVadTurnDetectionMultilingual extends TurnDetecti private TurnDetectionType type = TurnDetectionType.AZURE_SEMANTIC_VAD_MULTILINGUAL; /* - * The threshold property. + * Activation threshold for VAD detection. Range: 0.0 to 1.0. */ @Generated private Double threshold; /* - * The prefix_padding_ms property. + * Amount of audio to include before speech is detected, in milliseconds. */ @Generated private Integer prefixPaddingMs; /* - * The silence_duration_ms property. + * Duration of silence required to end speech detection, in milliseconds. */ @Generated private Integer silenceDurationMs; /* - * The end_of_utterance_detection property. + * Configuration for end-of-utterance detection. */ @Generated private EouDetection endOfUtteranceDetection; /* - * The speech_duration_ms property. + * Minimum speech duration in milliseconds to trigger detection. */ @Generated private Integer speechDurationMs; /* - * The remove_filler_words property. + * Whether to remove filler words (e.g., 'um', 'uh') from transcription. */ @Generated private Boolean removeFillerWords; /* - * The languages property. + * List of BCP-47 language codes for speech detection. */ @Generated private List languages; /* - * The auto_truncate property. + * Whether to automatically truncate the audio buffer when speech stops. */ @Generated private Boolean autoTruncate; /* - * The create_response property. + * Whether to automatically create a response when speech stops. */ @Generated private Boolean createResponse; /* - * The interrupt_response property. + * Whether to allow the user's speech to interrupt the assistant's response. */ @Generated private Boolean interruptResponse; @@ -102,7 +102,7 @@ public TurnDetectionType getType() { } /** - * Get the threshold property: The threshold property. + * Get the threshold property: Activation threshold for VAD detection. Range: 0.0 to 1.0. * * @return the threshold value. */ @@ -112,7 +112,7 @@ public Double getThreshold() { } /** - * Set the threshold property: The threshold property. + * Set the threshold property: Activation threshold for VAD detection. Range: 0.0 to 1.0. * * @param threshold the threshold value to set. * @return the AzureSemanticVadTurnDetectionMultilingual object itself. @@ -124,7 +124,7 @@ public AzureSemanticVadTurnDetectionMultilingual setThreshold(Double threshold) } /** - * Get the prefixPaddingMs property: The prefix_padding_ms property. + * Get the prefixPaddingMs property: Amount of audio to include before speech is detected, in milliseconds. * * @return the prefixPaddingMs value. */ @@ -134,7 +134,7 @@ public Integer getPrefixPaddingMs() { } /** - * Set the prefixPaddingMs property: The prefix_padding_ms property. + * Set the prefixPaddingMs property: Amount of audio to include before speech is detected, in milliseconds. * * @param prefixPaddingMs the prefixPaddingMs value to set. * @return the AzureSemanticVadTurnDetectionMultilingual object itself. @@ -146,7 +146,7 @@ public AzureSemanticVadTurnDetectionMultilingual setPrefixPaddingMs(Integer pref } /** - * Get the silenceDurationMs property: The silence_duration_ms property. + * Get the silenceDurationMs property: Duration of silence required to end speech detection, in milliseconds. * * @return the silenceDurationMs value. */ @@ -156,7 +156,7 @@ public Integer getSilenceDurationMs() { } /** - * Set the silenceDurationMs property: The silence_duration_ms property. + * Set the silenceDurationMs property: Duration of silence required to end speech detection, in milliseconds. * * @param silenceDurationMs the silenceDurationMs value to set. * @return the AzureSemanticVadTurnDetectionMultilingual object itself. @@ -168,7 +168,7 @@ public AzureSemanticVadTurnDetectionMultilingual setSilenceDurationMs(Integer si } /** - * Get the endOfUtteranceDetection property: The end_of_utterance_detection property. + * Get the endOfUtteranceDetection property: Configuration for end-of-utterance detection. * * @return the endOfUtteranceDetection value. */ @@ -178,7 +178,7 @@ public EouDetection getEndOfUtteranceDetection() { } /** - * Set the endOfUtteranceDetection property: The end_of_utterance_detection property. + * Set the endOfUtteranceDetection property: Configuration for end-of-utterance detection. * * @param endOfUtteranceDetection the endOfUtteranceDetection value to set. * @return the AzureSemanticVadTurnDetectionMultilingual object itself. @@ -190,7 +190,7 @@ public AzureSemanticVadTurnDetectionMultilingual setEndOfUtteranceDetection(EouD } /** - * Get the speechDurationMs property: The speech_duration_ms property. + * Get the speechDurationMs property: Minimum speech duration in milliseconds to trigger detection. * * @return the speechDurationMs value. */ @@ -200,7 +200,7 @@ public Integer getSpeechDurationMs() { } /** - * Set the speechDurationMs property: The speech_duration_ms property. + * Set the speechDurationMs property: Minimum speech duration in milliseconds to trigger detection. * * @param speechDurationMs the speechDurationMs value to set. * @return the AzureSemanticVadTurnDetectionMultilingual object itself. @@ -212,7 +212,7 @@ public AzureSemanticVadTurnDetectionMultilingual setSpeechDurationMs(Integer spe } /** - * Get the removeFillerWords property: The remove_filler_words property. + * Get the removeFillerWords property: Whether to remove filler words (e.g., 'um', 'uh') from transcription. * * @return the removeFillerWords value. */ @@ -222,7 +222,7 @@ public Boolean isRemoveFillerWords() { } /** - * Set the removeFillerWords property: The remove_filler_words property. + * Set the removeFillerWords property: Whether to remove filler words (e.g., 'um', 'uh') from transcription. * * @param removeFillerWords the removeFillerWords value to set. * @return the AzureSemanticVadTurnDetectionMultilingual object itself. @@ -234,7 +234,7 @@ public AzureSemanticVadTurnDetectionMultilingual setRemoveFillerWords(Boolean re } /** - * Get the languages property: The languages property. + * Get the languages property: List of BCP-47 language codes for speech detection. * * @return the languages value. */ @@ -244,7 +244,7 @@ public List getLanguages() { } /** - * Set the languages property: The languages property. + * Set the languages property: List of BCP-47 language codes for speech detection. * * @param languages the languages value to set. * @return the AzureSemanticVadTurnDetectionMultilingual object itself. @@ -256,7 +256,7 @@ public AzureSemanticVadTurnDetectionMultilingual setLanguages(List langu } /** - * Get the autoTruncate property: The auto_truncate property. + * Get the autoTruncate property: Whether to automatically truncate the audio buffer when speech stops. * * @return the autoTruncate value. */ @@ -266,7 +266,7 @@ public Boolean isAutoTruncate() { } /** - * Set the autoTruncate property: The auto_truncate property. + * Set the autoTruncate property: Whether to automatically truncate the audio buffer when speech stops. * * @param autoTruncate the autoTruncate value to set. * @return the AzureSemanticVadTurnDetectionMultilingual object itself. @@ -278,7 +278,7 @@ public AzureSemanticVadTurnDetectionMultilingual setAutoTruncate(Boolean autoTru } /** - * Get the createResponse property: The create_response property. + * Get the createResponse property: Whether to automatically create a response when speech stops. * * @return the createResponse value. */ @@ -288,7 +288,7 @@ public Boolean isCreateResponse() { } /** - * Set the createResponse property: The create_response property. + * Set the createResponse property: Whether to automatically create a response when speech stops. * * @param createResponse the createResponse value to set. * @return the AzureSemanticVadTurnDetectionMultilingual object itself. @@ -300,7 +300,7 @@ public AzureSemanticVadTurnDetectionMultilingual setCreateResponse(Boolean creat } /** - * Get the interruptResponse property: The interrupt_response property. + * Get the interruptResponse property: Whether to allow the user's speech to interrupt the assistant's response. * * @return the interruptResponse value. */ @@ -310,7 +310,7 @@ public Boolean isInterruptResponse() { } /** - * Set the interruptResponse property: The interrupt_response property. + * Set the interruptResponse property: Whether to allow the user's speech to interrupt the assistant's response. * * @param interruptResponse the interruptResponse value to set. * @return the AzureSemanticVadTurnDetectionMultilingual object itself. diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureStandardVoice.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureStandardVoice.java index 8d30d23c0674..b9dee1279681 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureStandardVoice.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureStandardVoice.java @@ -36,43 +36,63 @@ public final class AzureStandardVoice extends AzureVoice { private Double temperature; /* - * The custom_lexicon_url property. + * URL of a custom lexicon file for pronunciation customization. */ @Generated private String customLexiconUrl; /* - * The prefer_locales property. + * Preferred locales in BCP-47 format that change the accents of languages. + * If not set, TTS uses the default accent for each language (e.g., American English for English, + * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent + * to British English and the Spanish accent to European Spanish, while TTS can still speak other + * languages like French or Chinese with their default accents. */ @Generated private List preferLocales; /* - * The locale property. + * Enforced locale in BCP-47 format for TTS output. If set, TTS will always use the specified + * locale to speak. For example, setting locale to `en-US` forces American English accent for all + * text content, even if the text is in another language, and TTS will output silence for + * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically + * detects the language from the text content. */ @Generated private String locale; /* - * The style property. + * Speaking style for the voice (e.g., 'cheerful', 'sad'). */ @Generated private String style; /* - * The pitch property. + * Pitch adjustment for the voice output. Follows the same rules as the `pitch` attribute of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), + * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). */ @Generated private String pitch; /* - * The rate property. + * Speaking rate adjustment for the voice output. Follows the same rules as the `rate` attribute of + * the SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), + * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). */ @Generated private String rate; /* - * The volume property. + * Volume adjustment for the voice output. Follows the same rules as the `volume` attribute of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), + * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). */ @Generated private String volume; @@ -131,7 +151,7 @@ public AzureStandardVoice setTemperature(Double temperature) { } /** - * Get the customLexiconUrl property: The custom_lexicon_url property. + * Get the customLexiconUrl property: URL of a custom lexicon file for pronunciation customization. * * @return the customLexiconUrl value. */ @@ -141,7 +161,7 @@ public String getCustomLexiconUrl() { } /** - * Set the customLexiconUrl property: The custom_lexicon_url property. + * Set the customLexiconUrl property: URL of a custom lexicon file for pronunciation customization. * * @param customLexiconUrl the customLexiconUrl value to set. * @return the AzureStandardVoice object itself. @@ -153,7 +173,11 @@ public AzureStandardVoice setCustomLexiconUrl(String customLexiconUrl) { } /** - * Get the preferLocales property: The prefer_locales property. + * Get the preferLocales property: Preferred locales in BCP-47 format that change the accents of languages. + * If not set, TTS uses the default accent for each language (e.g., American English for English, + * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent + * to British English and the Spanish accent to European Spanish, while TTS can still speak other + * languages like French or Chinese with their default accents. * * @return the preferLocales value. */ @@ -163,7 +187,11 @@ public List getPreferLocales() { } /** - * Set the preferLocales property: The prefer_locales property. + * Set the preferLocales property: Preferred locales in BCP-47 format that change the accents of languages. + * If not set, TTS uses the default accent for each language (e.g., American English for English, + * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent + * to British English and the Spanish accent to European Spanish, while TTS can still speak other + * languages like French or Chinese with their default accents. * * @param preferLocales the preferLocales value to set. * @return the AzureStandardVoice object itself. @@ -175,7 +203,12 @@ public AzureStandardVoice setPreferLocales(List preferLocales) { } /** - * Get the locale property: The locale property. + * Get the locale property: Enforced locale in BCP-47 format for TTS output. If set, TTS will always use the + * specified + * locale to speak. For example, setting locale to `en-US` forces American English accent for all + * text content, even if the text is in another language, and TTS will output silence for + * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically + * detects the language from the text content. * * @return the locale value. */ @@ -185,7 +218,12 @@ public String getLocale() { } /** - * Set the locale property: The locale property. + * Set the locale property: Enforced locale in BCP-47 format for TTS output. If set, TTS will always use the + * specified + * locale to speak. For example, setting locale to `en-US` forces American English accent for all + * text content, even if the text is in another language, and TTS will output silence for + * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically + * detects the language from the text content. * * @param locale the locale value to set. * @return the AzureStandardVoice object itself. @@ -197,7 +235,7 @@ public AzureStandardVoice setLocale(String locale) { } /** - * Get the style property: The style property. + * Get the style property: Speaking style for the voice (e.g., 'cheerful', 'sad'). * * @return the style value. */ @@ -207,7 +245,7 @@ public String getStyle() { } /** - * Set the style property: The style property. + * Set the style property: Speaking style for the voice (e.g., 'cheerful', 'sad'). * * @param style the style value to set. * @return the AzureStandardVoice object itself. @@ -219,7 +257,12 @@ public AzureStandardVoice setStyle(String style) { } /** - * Get the pitch property: The pitch property. + * Get the pitch property: Pitch adjustment for the voice output. Follows the same rules as the `pitch` attribute of + * the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), + * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). * * @return the pitch value. */ @@ -229,7 +272,12 @@ public String getPitch() { } /** - * Set the pitch property: The pitch property. + * Set the pitch property: Pitch adjustment for the voice output. Follows the same rules as the `pitch` attribute of + * the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), + * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). * * @param pitch the pitch value to set. * @return the AzureStandardVoice object itself. @@ -241,7 +289,12 @@ public AzureStandardVoice setPitch(String pitch) { } /** - * Get the rate property: The rate property. + * Get the rate property: Speaking rate adjustment for the voice output. Follows the same rules as the `rate` + * attribute of + * the SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), + * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). * * @return the rate value. */ @@ -251,7 +304,12 @@ public String getRate() { } /** - * Set the rate property: The rate property. + * Set the rate property: Speaking rate adjustment for the voice output. Follows the same rules as the `rate` + * attribute of + * the SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), + * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). * * @param rate the rate value to set. * @return the AzureStandardVoice object itself. @@ -263,7 +321,12 @@ public AzureStandardVoice setRate(String rate) { } /** - * Get the volume property: The volume property. + * Get the volume property: Volume adjustment for the voice output. Follows the same rules as the `volume` attribute + * of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), + * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). * * @return the volume value. */ @@ -273,7 +336,12 @@ public String getVolume() { } /** - * Set the volume property: The volume property. + * Set the volume property: Volume adjustment for the voice output. Follows the same rules as the `volume` attribute + * of the + * SSML `prosody` element (see + * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). + * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), + * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). * * @param volume the volume value to set. * @return the AzureStandardVoice object itself. @@ -374,13 +442,13 @@ public static AzureStandardVoice fromJson(JsonReader jsonReader) throws IOExcept } /* - * The custom_text_normalization_url property. + * URL of a custom text normalization endpoint. */ @Generated private String customTextNormalizationUrl; /** - * Get the customTextNormalizationUrl property: The custom_text_normalization_url property. + * Get the customTextNormalizationUrl property: URL of a custom text normalization endpoint. * * @return the customTextNormalizationUrl value. */ @@ -390,7 +458,7 @@ public String getCustomTextNormalizationUrl() { } /** - * Set the customTextNormalizationUrl property: The custom_text_normalization_url property. + * Set the customTextNormalizationUrl property: URL of a custom text normalization endpoint. * * @param customTextNormalizationUrl the customTextNormalizationUrl value to set. * @return the AzureStandardVoice object itself. diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureVoice.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureVoice.java index c1e46a4fe820..078528533a15 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureVoice.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureVoice.java @@ -83,6 +83,8 @@ public static AzureVoice fromJson(JsonReader jsonReader) throws IOException { return AzureStandardVoice.fromJson(readerToUse.reset()); } else if ("azure-personal".equals(discriminatorValue)) { return AzurePersonalVoice.fromJson(readerToUse.reset()); + } else if ("avatar-voice-sync".equals(discriminatorValue)) { + return AzureAvatarVoiceSyncVoice.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureVoiceType.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureVoiceType.java index 7c81378a8a3e..8706e6192529 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureVoiceType.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureVoiceType.java @@ -60,4 +60,10 @@ public static AzureVoiceType fromString(String name) { public static Collection values() { return values(AzureVoiceType.class); } + + /** + * Azure avatar voice sync. + */ + @Generated + public static final AzureVoiceType AVATAR_VOICE_SYNC = fromString("avatar-voice-sync"); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEvent.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEvent.java index be0165196a3f..980409458c07 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEvent.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEvent.java @@ -138,6 +138,8 @@ public static ClientEvent fromJson(JsonReader jsonReader) throws IOException { return ClientEventResponseCancel.fromJson(readerToUse.reset()); } else if ("conversation.item.retrieve".equals(discriminatorValue)) { return ClientEventConversationItemRetrieve.fromJson(readerToUse.reset()); + } else if ("output_audio_buffer.clear".equals(discriminatorValue)) { + return ClientEventOutputAudioBufferClear.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEventOutputAudioBufferClear.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEventOutputAudioBufferClear.java new file mode 100644 index 000000000000..7be920b04673 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEventOutputAudioBufferClear.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Client request to clear the avatar output buffer. + */ +@Fluent +public final class ClientEventOutputAudioBufferClear extends ClientEvent { + /* + * The type of event. + */ + @Generated + private ClientEventType type = ClientEventType.OUTPUT_AUDIO_BUFFER_CLEAR; + + /** + * Creates an instance of ClientEventOutputAudioBufferClear class. + */ + @Generated + public ClientEventOutputAudioBufferClear() { + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ClientEventType getType() { + return this.type; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public ClientEventOutputAudioBufferClear setEventId(String eventId) { + super.setEventId(eventId); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClientEventOutputAudioBufferClear from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClientEventOutputAudioBufferClear if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ClientEventOutputAudioBufferClear. + */ + @Generated + public static ClientEventOutputAudioBufferClear fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClientEventOutputAudioBufferClear deserializedClientEventOutputAudioBufferClear + = new ClientEventOutputAudioBufferClear(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("event_id".equals(fieldName)) { + deserializedClientEventOutputAudioBufferClear.setEventId(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedClientEventOutputAudioBufferClear.type = ClientEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedClientEventOutputAudioBufferClear; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEventType.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEventType.java index 799da7762759..ea42e4ec6d75 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEventType.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEventType.java @@ -144,4 +144,10 @@ public static Collection values() { */ @Generated public static final ClientEventType MCP_APPROVAL_RESPONSE = fromString("mcp_approval_response"); + + /** + * Client request to clear the avatar output buffer. + */ + @Generated + public static final ClientEventType OUTPUT_AUDIO_BUFFER_CLEAR = fromString("output_audio_buffer.clear"); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/FileSearchResult.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/FileSearchResult.java new file mode 100644 index 000000000000..3c14f5d77623 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/FileSearchResult.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * A file search result entry. + */ +@Immutable +public final class FileSearchResult implements JsonSerializable { + /* + * Key-value pairs for filtering file search results. + */ + @Generated + private Map attributes; + + /* + * The unique ID of the file. + */ + @Generated + private String fileId; + + /* + * The name of the file. + */ + @Generated + private String filename; + + /* + * The relevance score of the file search result. + */ + @Generated + private Double score; + + /* + * The text content of the file that matched the query. + */ + @Generated + private String text; + + /** + * Creates an instance of FileSearchResult class. + */ + @Generated + private FileSearchResult() { + } + + /** + * Get the attributes property: Key-value pairs for filtering file search results. + * + * @return the attributes value. + */ + @Generated + public Map getAttributes() { + return this.attributes; + } + + /** + * Get the fileId property: The unique ID of the file. + * + * @return the fileId value. + */ + @Generated + public String getFileId() { + return this.fileId; + } + + /** + * Get the filename property: The name of the file. + * + * @return the filename value. + */ + @Generated + public String getFilename() { + return this.filename; + } + + /** + * Get the score property: The relevance score of the file search result. + * + * @return the score value. + */ + @Generated + public Double getScore() { + return this.score; + } + + /** + * Get the text property: The text content of the file that matched the query. + * + * @return the text value. + */ + @Generated + public String getText() { + return this.text; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("attributes", this.attributes, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("file_id", this.fileId); + jsonWriter.writeStringField("filename", this.filename); + jsonWriter.writeNumberField("score", this.score); + jsonWriter.writeStringField("text", this.text); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FileSearchResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FileSearchResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the FileSearchResult. + */ + @Generated + public static FileSearchResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FileSearchResult deserializedFileSearchResult = new FileSearchResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("attributes".equals(fieldName)) { + Map attributes = reader.readMap(reader1 -> reader1.getString()); + deserializedFileSearchResult.attributes = attributes; + } else if ("file_id".equals(fieldName)) { + deserializedFileSearchResult.fileId = reader.getString(); + } else if ("filename".equals(fieldName)) { + deserializedFileSearchResult.filename = reader.getString(); + } else if ("score".equals(fieldName)) { + deserializedFileSearchResult.score = reader.getNullable(JsonReader::getDouble); + } else if ("text".equals(fieldName)) { + deserializedFileSearchResult.text = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFileSearchResult; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ItemType.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ItemType.java index 1ec270061796..440c6883118f 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ItemType.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ItemType.java @@ -84,4 +84,16 @@ public static Collection values() { */ @Generated public static final ItemType MCP_APPROVAL_RESPONSE = fromString("mcp_approval_response"); + + /** + * Web search call item. + */ + @Generated + public static final ItemType WEB_SEARCH_CALL = fromString("web_search_call"); + + /** + * File search call item. + */ + @Generated + public static final ItemType FILE_SEARCH_CALL = fromString("file_search_call"); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/OutputTokenDetails.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/OutputTokenDetails.java index f05d0e523954..41648ae92753 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/OutputTokenDetails.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/OutputTokenDetails.java @@ -70,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeIntField("text_tokens", this.textTokens); jsonWriter.writeIntField("audio_tokens", this.audioTokens); + jsonWriter.writeNumberField("reasoning_tokens", this.reasoningTokens); return jsonWriter.writeEndObject(); } @@ -87,6 +88,7 @@ public static OutputTokenDetails fromJson(JsonReader jsonReader) throws IOExcept return jsonReader.readObject(reader -> { int textTokens = 0; int audioTokens = 0; + Integer reasoningTokens = null; while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -94,11 +96,31 @@ public static OutputTokenDetails fromJson(JsonReader jsonReader) throws IOExcept textTokens = reader.getInt(); } else if ("audio_tokens".equals(fieldName)) { audioTokens = reader.getInt(); + } else if ("reasoning_tokens".equals(fieldName)) { + reasoningTokens = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } } - return new OutputTokenDetails(textTokens, audioTokens); + OutputTokenDetails deserializedOutputTokenDetails = new OutputTokenDetails(textTokens, audioTokens); + deserializedOutputTokenDetails.reasoningTokens = reasoningTokens; + return deserializedOutputTokenDetails; }); } + + /* + * Number of reasoning tokens generated in the output. + */ + @Generated + private Integer reasoningTokens; + + /** + * Get the reasoningTokens property: Number of reasoning tokens generated in the output. + * + * @return the reasoningTokens value. + */ + @Generated + public Integer getReasoningTokens() { + return this.reasoningTokens; + } } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/PersonalVoiceModels.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/PersonalVoiceModels.java index f76c0a4e13eb..7bb29485aeac 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/PersonalVoiceModels.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/PersonalVoiceModels.java @@ -24,12 +24,6 @@ public final class PersonalVoiceModels extends ExpandableStringEnum values() { return values(PersonalVoiceModels.class); } + + /** + * Use the latest Dragon HD Omni model. + */ + @Generated + public static final PersonalVoiceModels DRAGON_HDOMNI_LATEST_NEURAL = fromString("DragonHDOmniLatestNeural"); + + /** + * Use the MAI-Voice-1 model. + */ + @Generated + public static final PersonalVoiceModels MAI_VOICE_1 = fromString("MAI-Voice-1"); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseCreateParams.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseCreateParams.java index f138eb3cffce..cec39be92161 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseCreateParams.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseCreateParams.java @@ -423,6 +423,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("reasoning_effort", this.reasoningEffort == null ? null : this.reasoningEffort.toString()); jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); + if (this.interimResponse != null) { + jsonWriter.writeFieldName("interim_response"); + this.interimResponse.writeTo(jsonWriter); + } return jsonWriter.writeEndObject(); } @@ -484,6 +488,9 @@ public static ResponseCreateParams fromJson(JsonReader jsonReader) throws IOExce } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedResponseCreateParams.metadata = metadata; + } else if ("interim_response".equals(fieldName)) { + deserializedResponseCreateParams.interimResponse + = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); } else { reader.skipChildren(); } @@ -619,4 +626,32 @@ public ResponseCreateParams setMetadata(Map metadata) { this.metadata = metadata; return this; } + + /* + * Configuration for interim response generation during latency or tool calls. + */ + @Generated + private BinaryData interimResponse; + + /** + * Get the interimResponse property: Configuration for interim response generation during latency or tool calls. + * + * @return the interimResponse value. + */ + @Generated + public BinaryData getInterimResponse() { + return this.interimResponse; + } + + /** + * Set the interimResponse property: Configuration for interim response generation during latency or tool calls. + * + * @param interimResponse the interimResponse value to set. + * @return the ResponseCreateParams object itself. + */ + @Generated + public ResponseCreateParams setInterimResponse(BinaryData interimResponse) { + this.interimResponse = interimResponse; + return this; + } } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItem.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItem.java new file mode 100644 index 000000000000..6f7796f12854 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItem.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A response item that represents a file search call. + */ +@Immutable +public final class ResponseFileSearchCallItem extends SessionResponseItem { + /* + * The type property. + */ + @Generated + private ItemType type = ItemType.FILE_SEARCH_CALL; + + /* + * The unique ID of the file search tool call. + */ + @Generated + private String id; + + /* + * The queries used for the file search. + */ + @Generated + private List queries; + + /* + * The status of the file search tool call. + */ + @Generated + private final ResponseFileSearchCallItemStatus status; + + /* + * The results of the file search. + */ + @Generated + private List results; + + /** + * Creates an instance of ResponseFileSearchCallItem class. + * + * @param status the status value to set. + */ + @Generated + private ResponseFileSearchCallItem(ResponseFileSearchCallItemStatus status) { + this.status = status; + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + @Generated + @Override + public ItemType getType() { + return this.type; + } + + /** + * Get the id property: The unique ID of the file search tool call. + * + * @return the id value. + */ + @Generated + @Override + public String getId() { + return this.id; + } + + /** + * Get the queries property: The queries used for the file search. + * + * @return the queries value. + */ + @Generated + public List getQueries() { + return this.queries; + } + + /** + * Get the status property: The status of the file search tool call. + * + * @return the status value. + */ + @Generated + public ResponseFileSearchCallItemStatus getStatus() { + return this.status; + } + + /** + * Get the results property: The results of the file search. + * + * @return the results value. + */ + @Generated + public List getResults() { + return this.results; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("object", getObject() == null ? null : getObject().toString()); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeArrayField("queries", this.queries, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("results", this.results, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResponseFileSearchCallItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResponseFileSearchCallItem if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ResponseFileSearchCallItem. + */ + @Generated + public static ResponseFileSearchCallItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResponseItemObject object = null; + ResponseFileSearchCallItemStatus status = null; + ItemType type = ItemType.FILE_SEARCH_CALL; + String id = null; + List queries = null; + List results = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("object".equals(fieldName)) { + object = ResponseItemObject.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + status = ResponseFileSearchCallItemStatus.fromString(reader.getString()); + } else if ("type".equals(fieldName)) { + type = ItemType.fromString(reader.getString()); + } else if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("queries".equals(fieldName)) { + queries = reader.readArray(reader1 -> reader1.getString()); + } else if ("results".equals(fieldName)) { + results = reader.readArray(reader1 -> FileSearchResult.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + ResponseFileSearchCallItem deserializedResponseFileSearchCallItem = new ResponseFileSearchCallItem(status); + deserializedResponseFileSearchCallItem.setObject(object); + deserializedResponseFileSearchCallItem.type = type; + deserializedResponseFileSearchCallItem.id = id; + deserializedResponseFileSearchCallItem.queries = queries; + deserializedResponseFileSearchCallItem.results = results; + + return deserializedResponseFileSearchCallItem; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItemStatus.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItemStatus.java new file mode 100644 index 000000000000..b4f8106b0d01 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItemStatus.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ResponseFileSearchCallItemStatus. + */ +public final class ResponseFileSearchCallItemStatus extends ExpandableStringEnum { + /** + * Static value in_progress for ResponseFileSearchCallItemStatus. + */ + @Generated + public static final ResponseFileSearchCallItemStatus IN_PROGRESS = fromString("in_progress"); + + /** + * Static value searching for ResponseFileSearchCallItemStatus. + */ + @Generated + public static final ResponseFileSearchCallItemStatus SEARCHING = fromString("searching"); + + /** + * Static value completed for ResponseFileSearchCallItemStatus. + */ + @Generated + public static final ResponseFileSearchCallItemStatus COMPLETED = fromString("completed"); + + /** + * Static value incomplete for ResponseFileSearchCallItemStatus. + */ + @Generated + public static final ResponseFileSearchCallItemStatus INCOMPLETE = fromString("incomplete"); + + /** + * Static value failed for ResponseFileSearchCallItemStatus. + */ + @Generated + public static final ResponseFileSearchCallItemStatus FAILED = fromString("failed"); + + /** + * Creates a new instance of ResponseFileSearchCallItemStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ResponseFileSearchCallItemStatus() { + } + + /** + * Creates or finds a ResponseFileSearchCallItemStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResponseFileSearchCallItemStatus. + */ + @Generated + public static ResponseFileSearchCallItemStatus fromString(String name) { + return fromString(name, ResponseFileSearchCallItemStatus.class); + } + + /** + * Gets known ResponseFileSearchCallItemStatus values. + * + * @return known ResponseFileSearchCallItemStatus values. + */ + @Generated + public static Collection values() { + return values(ResponseFileSearchCallItemStatus.class); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItem.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItem.java new file mode 100644 index 000000000000..f86178473f5a --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItem.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A response item that represents a web search call. + */ +@Immutable +public final class ResponseWebSearchCallItem extends SessionResponseItem { + /* + * The type property. + */ + @Generated + private ItemType type = ItemType.WEB_SEARCH_CALL; + + /* + * The unique ID of the web search tool call. + */ + @Generated + private String id; + + /* + * The status of the web search tool call. + */ + @Generated + private final ResponseWebSearchCallItemStatus status; + + /** + * Creates an instance of ResponseWebSearchCallItem class. + * + * @param status the status value to set. + */ + @Generated + private ResponseWebSearchCallItem(ResponseWebSearchCallItemStatus status) { + this.status = status; + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + @Generated + @Override + public ItemType getType() { + return this.type; + } + + /** + * Get the id property: The unique ID of the web search tool call. + * + * @return the id value. + */ + @Generated + @Override + public String getId() { + return this.id; + } + + /** + * Get the status property: The status of the web search tool call. + * + * @return the status value. + */ + @Generated + public ResponseWebSearchCallItemStatus getStatus() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("object", getObject() == null ? null : getObject().toString()); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResponseWebSearchCallItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResponseWebSearchCallItem if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ResponseWebSearchCallItem. + */ + @Generated + public static ResponseWebSearchCallItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResponseItemObject object = null; + ResponseWebSearchCallItemStatus status = null; + ItemType type = ItemType.WEB_SEARCH_CALL; + String id = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("object".equals(fieldName)) { + object = ResponseItemObject.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + status = ResponseWebSearchCallItemStatus.fromString(reader.getString()); + } else if ("type".equals(fieldName)) { + type = ItemType.fromString(reader.getString()); + } else if ("id".equals(fieldName)) { + id = reader.getString(); + } else { + reader.skipChildren(); + } + } + ResponseWebSearchCallItem deserializedResponseWebSearchCallItem = new ResponseWebSearchCallItem(status); + deserializedResponseWebSearchCallItem.setObject(object); + deserializedResponseWebSearchCallItem.type = type; + deserializedResponseWebSearchCallItem.id = id; + + return deserializedResponseWebSearchCallItem; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItemStatus.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItemStatus.java new file mode 100644 index 000000000000..52196e2487c1 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItemStatus.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ResponseWebSearchCallItemStatus. + */ +public final class ResponseWebSearchCallItemStatus extends ExpandableStringEnum { + /** + * Static value in_progress for ResponseWebSearchCallItemStatus. + */ + @Generated + public static final ResponseWebSearchCallItemStatus IN_PROGRESS = fromString("in_progress"); + + /** + * Static value searching for ResponseWebSearchCallItemStatus. + */ + @Generated + public static final ResponseWebSearchCallItemStatus SEARCHING = fromString("searching"); + + /** + * Static value completed for ResponseWebSearchCallItemStatus. + */ + @Generated + public static final ResponseWebSearchCallItemStatus COMPLETED = fromString("completed"); + + /** + * Static value failed for ResponseWebSearchCallItemStatus. + */ + @Generated + public static final ResponseWebSearchCallItemStatus FAILED = fromString("failed"); + + /** + * Creates a new instance of ResponseWebSearchCallItemStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ResponseWebSearchCallItemStatus() { + } + + /** + * Creates or finds a ResponseWebSearchCallItemStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResponseWebSearchCallItemStatus. + */ + @Generated + public static ResponseWebSearchCallItemStatus fromString(String name) { + return fromString(name, ResponseWebSearchCallItemStatus.class); + } + + /** + * Gets known ResponseWebSearchCallItemStatus values. + * + * @return known ResponseWebSearchCallItemStatus values. + */ + @Generated + public static Collection values() { + return values(ResponseWebSearchCallItemStatus.class); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventOutputAudioBufferCleared.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventOutputAudioBufferCleared.java new file mode 100644 index 000000000000..d66b20110b42 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventOutputAudioBufferCleared.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Returned when the output audio buffer has been cleared. + */ +@Immutable +public final class ServerEventOutputAudioBufferCleared extends SessionUpdate { + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.OUTPUT_AUDIO_BUFFER_CLEARED; + + /** + * Creates an instance of ServerEventOutputAudioBufferCleared class. + */ + @Generated + private ServerEventOutputAudioBufferCleared() { + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventOutputAudioBufferCleared from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventOutputAudioBufferCleared if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerEventOutputAudioBufferCleared. + */ + @Generated + public static ServerEventOutputAudioBufferCleared fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerEventOutputAudioBufferCleared deserializedServerEventOutputAudioBufferCleared + = new ServerEventOutputAudioBufferCleared(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("event_id".equals(fieldName)) { + deserializedServerEventOutputAudioBufferCleared.setEventId(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedServerEventOutputAudioBufferCleared.type + = ServerEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedServerEventOutputAudioBufferCleared; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseAudioTranscriptAnnotationAdded.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseAudioTranscriptAnnotationAdded.java new file mode 100644 index 000000000000..af592c976f59 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseAudioTranscriptAnnotationAdded.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.BinaryData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Returned when an audio transcript annotation is added to a response. + */ +@Immutable +public final class ServerEventResponseAudioTranscriptAnnotationAdded extends SessionUpdate { + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.RESPONSE_AUDIO_TRANSCRIPT_ANNOTATION_ADDED; + + /* + * The ID of the response. + */ + @Generated + private final String responseId; + + /* + * The ID of the item. + */ + @Generated + private final String itemId; + + /* + * The index of the output item in the response. + */ + @Generated + private final int outputIndex; + + /* + * The index of the content part in the item's content array. + */ + @Generated + private final int contentIndex; + + /* + * The index of the annotation. + */ + @Generated + private final int annotationIndex; + + /* + * The annotation object. + */ + @Generated + private final BinaryData annotation; + + /** + * Creates an instance of ServerEventResponseAudioTranscriptAnnotationAdded class. + * + * @param responseId the responseId value to set. + * @param itemId the itemId value to set. + * @param outputIndex the outputIndex value to set. + * @param contentIndex the contentIndex value to set. + * @param annotationIndex the annotationIndex value to set. + * @param annotation the annotation value to set. + */ + @Generated + private ServerEventResponseAudioTranscriptAnnotationAdded(String responseId, String itemId, int outputIndex, + int contentIndex, int annotationIndex, BinaryData annotation) { + this.responseId = responseId; + this.itemId = itemId; + this.outputIndex = outputIndex; + this.contentIndex = contentIndex; + this.annotationIndex = annotationIndex; + this.annotation = annotation; + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the responseId property: The ID of the response. + * + * @return the responseId value. + */ + @Generated + public String getResponseId() { + return this.responseId; + } + + /** + * Get the itemId property: The ID of the item. + * + * @return the itemId value. + */ + @Generated + public String getItemId() { + return this.itemId; + } + + /** + * Get the outputIndex property: The index of the output item in the response. + * + * @return the outputIndex value. + */ + @Generated + public int getOutputIndex() { + return this.outputIndex; + } + + /** + * Get the contentIndex property: The index of the content part in the item's content array. + * + * @return the contentIndex value. + */ + @Generated + public int getContentIndex() { + return this.contentIndex; + } + + /** + * Get the annotationIndex property: The index of the annotation. + * + * @return the annotationIndex value. + */ + @Generated + public int getAnnotationIndex() { + return this.annotationIndex; + } + + /** + * Get the annotation property: The annotation object. + * + * @return the annotation value. + */ + @Generated + public BinaryData getAnnotation() { + return this.annotation; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("response_id", this.responseId); + jsonWriter.writeStringField("item_id", this.itemId); + jsonWriter.writeIntField("output_index", this.outputIndex); + jsonWriter.writeIntField("content_index", this.contentIndex); + jsonWriter.writeIntField("annotation_index", this.annotationIndex); + jsonWriter.writeFieldName("annotation"); + this.annotation.writeTo(jsonWriter); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventResponseAudioTranscriptAnnotationAdded from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventResponseAudioTranscriptAnnotationAdded if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerEventResponseAudioTranscriptAnnotationAdded. + */ + @Generated + public static ServerEventResponseAudioTranscriptAnnotationAdded fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String eventId = null; + String responseId = null; + String itemId = null; + int outputIndex = 0; + int contentIndex = 0; + int annotationIndex = 0; + BinaryData annotation = null; + ServerEventType type = ServerEventType.RESPONSE_AUDIO_TRANSCRIPT_ANNOTATION_ADDED; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("event_id".equals(fieldName)) { + eventId = reader.getString(); + } else if ("response_id".equals(fieldName)) { + responseId = reader.getString(); + } else if ("item_id".equals(fieldName)) { + itemId = reader.getString(); + } else if ("output_index".equals(fieldName)) { + outputIndex = reader.getInt(); + } else if ("content_index".equals(fieldName)) { + contentIndex = reader.getInt(); + } else if ("annotation_index".equals(fieldName)) { + annotationIndex = reader.getInt(); + } else if ("annotation".equals(fieldName)) { + annotation + = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + } else if ("type".equals(fieldName)) { + type = ServerEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + ServerEventResponseAudioTranscriptAnnotationAdded deserializedServerEventResponseAudioTranscriptAnnotationAdded + = new ServerEventResponseAudioTranscriptAnnotationAdded(responseId, itemId, outputIndex, contentIndex, + annotationIndex, annotation); + deserializedServerEventResponseAudioTranscriptAnnotationAdded.setEventId(eventId); + deserializedServerEventResponseAudioTranscriptAnnotationAdded.type = type; + + return deserializedServerEventResponseAudioTranscriptAnnotationAdded; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallCompleted.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallCompleted.java new file mode 100644 index 000000000000..9a2c30c7a1c6 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallCompleted.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Returned when a file search call has completed. + */ +@Immutable +public final class ServerEventResponseFileSearchCallCompleted extends SessionUpdate { + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.RESPONSE_FILE_SEARCH_CALL_COMPLETED; + + /* + * The ID of the response. + */ + @Generated + private final String responseId; + + /* + * The ID of the item. + */ + @Generated + private final String itemId; + + /* + * The index of the output item in the response. + */ + @Generated + private final int outputIndex; + + /* + * The sequence number of the file search call. + */ + @Generated + private final int sequenceNumber; + + /** + * Creates an instance of ServerEventResponseFileSearchCallCompleted class. + * + * @param responseId the responseId value to set. + * @param itemId the itemId value to set. + * @param outputIndex the outputIndex value to set. + * @param sequenceNumber the sequenceNumber value to set. + */ + @Generated + private ServerEventResponseFileSearchCallCompleted(String responseId, String itemId, int outputIndex, + int sequenceNumber) { + this.responseId = responseId; + this.itemId = itemId; + this.outputIndex = outputIndex; + this.sequenceNumber = sequenceNumber; + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the responseId property: The ID of the response. + * + * @return the responseId value. + */ + @Generated + public String getResponseId() { + return this.responseId; + } + + /** + * Get the itemId property: The ID of the item. + * + * @return the itemId value. + */ + @Generated + public String getItemId() { + return this.itemId; + } + + /** + * Get the outputIndex property: The index of the output item in the response. + * + * @return the outputIndex value. + */ + @Generated + public int getOutputIndex() { + return this.outputIndex; + } + + /** + * Get the sequenceNumber property: The sequence number of the file search call. + * + * @return the sequenceNumber value. + */ + @Generated + public int getSequenceNumber() { + return this.sequenceNumber; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("response_id", this.responseId); + jsonWriter.writeStringField("item_id", this.itemId); + jsonWriter.writeIntField("output_index", this.outputIndex); + jsonWriter.writeIntField("sequence_number", this.sequenceNumber); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventResponseFileSearchCallCompleted from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventResponseFileSearchCallCompleted if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerEventResponseFileSearchCallCompleted. + */ + @Generated + public static ServerEventResponseFileSearchCallCompleted fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String eventId = null; + String responseId = null; + String itemId = null; + int outputIndex = 0; + int sequenceNumber = 0; + ServerEventType type = ServerEventType.RESPONSE_FILE_SEARCH_CALL_COMPLETED; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("event_id".equals(fieldName)) { + eventId = reader.getString(); + } else if ("response_id".equals(fieldName)) { + responseId = reader.getString(); + } else if ("item_id".equals(fieldName)) { + itemId = reader.getString(); + } else if ("output_index".equals(fieldName)) { + outputIndex = reader.getInt(); + } else if ("sequence_number".equals(fieldName)) { + sequenceNumber = reader.getInt(); + } else if ("type".equals(fieldName)) { + type = ServerEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + ServerEventResponseFileSearchCallCompleted deserializedServerEventResponseFileSearchCallCompleted + = new ServerEventResponseFileSearchCallCompleted(responseId, itemId, outputIndex, sequenceNumber); + deserializedServerEventResponseFileSearchCallCompleted.setEventId(eventId); + deserializedServerEventResponseFileSearchCallCompleted.type = type; + + return deserializedServerEventResponseFileSearchCallCompleted; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallInProgress.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallInProgress.java new file mode 100644 index 000000000000..8d5feef876d9 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallInProgress.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Returned when a file search call is in progress. + */ +@Immutable +public final class ServerEventResponseFileSearchCallInProgress extends SessionUpdate { + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.RESPONSE_FILE_SEARCH_CALL_IN_PROGRESS; + + /* + * The ID of the response. + */ + @Generated + private final String responseId; + + /* + * The ID of the item. + */ + @Generated + private final String itemId; + + /* + * The index of the output item in the response. + */ + @Generated + private final int outputIndex; + + /* + * The sequence number of the file search call. + */ + @Generated + private final int sequenceNumber; + + /** + * Creates an instance of ServerEventResponseFileSearchCallInProgress class. + * + * @param responseId the responseId value to set. + * @param itemId the itemId value to set. + * @param outputIndex the outputIndex value to set. + * @param sequenceNumber the sequenceNumber value to set. + */ + @Generated + private ServerEventResponseFileSearchCallInProgress(String responseId, String itemId, int outputIndex, + int sequenceNumber) { + this.responseId = responseId; + this.itemId = itemId; + this.outputIndex = outputIndex; + this.sequenceNumber = sequenceNumber; + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the responseId property: The ID of the response. + * + * @return the responseId value. + */ + @Generated + public String getResponseId() { + return this.responseId; + } + + /** + * Get the itemId property: The ID of the item. + * + * @return the itemId value. + */ + @Generated + public String getItemId() { + return this.itemId; + } + + /** + * Get the outputIndex property: The index of the output item in the response. + * + * @return the outputIndex value. + */ + @Generated + public int getOutputIndex() { + return this.outputIndex; + } + + /** + * Get the sequenceNumber property: The sequence number of the file search call. + * + * @return the sequenceNumber value. + */ + @Generated + public int getSequenceNumber() { + return this.sequenceNumber; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("response_id", this.responseId); + jsonWriter.writeStringField("item_id", this.itemId); + jsonWriter.writeIntField("output_index", this.outputIndex); + jsonWriter.writeIntField("sequence_number", this.sequenceNumber); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventResponseFileSearchCallInProgress from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventResponseFileSearchCallInProgress if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerEventResponseFileSearchCallInProgress. + */ + @Generated + public static ServerEventResponseFileSearchCallInProgress fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String eventId = null; + String responseId = null; + String itemId = null; + int outputIndex = 0; + int sequenceNumber = 0; + ServerEventType type = ServerEventType.RESPONSE_FILE_SEARCH_CALL_IN_PROGRESS; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("event_id".equals(fieldName)) { + eventId = reader.getString(); + } else if ("response_id".equals(fieldName)) { + responseId = reader.getString(); + } else if ("item_id".equals(fieldName)) { + itemId = reader.getString(); + } else if ("output_index".equals(fieldName)) { + outputIndex = reader.getInt(); + } else if ("sequence_number".equals(fieldName)) { + sequenceNumber = reader.getInt(); + } else if ("type".equals(fieldName)) { + type = ServerEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + ServerEventResponseFileSearchCallInProgress deserializedServerEventResponseFileSearchCallInProgress + = new ServerEventResponseFileSearchCallInProgress(responseId, itemId, outputIndex, sequenceNumber); + deserializedServerEventResponseFileSearchCallInProgress.setEventId(eventId); + deserializedServerEventResponseFileSearchCallInProgress.type = type; + + return deserializedServerEventResponseFileSearchCallInProgress; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallSearching.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallSearching.java new file mode 100644 index 000000000000..7c87ee1cf4ca --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallSearching.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Returned when a file search call is searching. + */ +@Immutable +public final class ServerEventResponseFileSearchCallSearching extends SessionUpdate { + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.RESPONSE_FILE_SEARCH_CALL_SEARCHING; + + /* + * The ID of the response. + */ + @Generated + private final String responseId; + + /* + * The ID of the item. + */ + @Generated + private final String itemId; + + /* + * The index of the output item in the response. + */ + @Generated + private final int outputIndex; + + /* + * The sequence number of the file search call. + */ + @Generated + private final int sequenceNumber; + + /** + * Creates an instance of ServerEventResponseFileSearchCallSearching class. + * + * @param responseId the responseId value to set. + * @param itemId the itemId value to set. + * @param outputIndex the outputIndex value to set. + * @param sequenceNumber the sequenceNumber value to set. + */ + @Generated + private ServerEventResponseFileSearchCallSearching(String responseId, String itemId, int outputIndex, + int sequenceNumber) { + this.responseId = responseId; + this.itemId = itemId; + this.outputIndex = outputIndex; + this.sequenceNumber = sequenceNumber; + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the responseId property: The ID of the response. + * + * @return the responseId value. + */ + @Generated + public String getResponseId() { + return this.responseId; + } + + /** + * Get the itemId property: The ID of the item. + * + * @return the itemId value. + */ + @Generated + public String getItemId() { + return this.itemId; + } + + /** + * Get the outputIndex property: The index of the output item in the response. + * + * @return the outputIndex value. + */ + @Generated + public int getOutputIndex() { + return this.outputIndex; + } + + /** + * Get the sequenceNumber property: The sequence number of the file search call. + * + * @return the sequenceNumber value. + */ + @Generated + public int getSequenceNumber() { + return this.sequenceNumber; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("response_id", this.responseId); + jsonWriter.writeStringField("item_id", this.itemId); + jsonWriter.writeIntField("output_index", this.outputIndex); + jsonWriter.writeIntField("sequence_number", this.sequenceNumber); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventResponseFileSearchCallSearching from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventResponseFileSearchCallSearching if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerEventResponseFileSearchCallSearching. + */ + @Generated + public static ServerEventResponseFileSearchCallSearching fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String eventId = null; + String responseId = null; + String itemId = null; + int outputIndex = 0; + int sequenceNumber = 0; + ServerEventType type = ServerEventType.RESPONSE_FILE_SEARCH_CALL_SEARCHING; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("event_id".equals(fieldName)) { + eventId = reader.getString(); + } else if ("response_id".equals(fieldName)) { + responseId = reader.getString(); + } else if ("item_id".equals(fieldName)) { + itemId = reader.getString(); + } else if ("output_index".equals(fieldName)) { + outputIndex = reader.getInt(); + } else if ("sequence_number".equals(fieldName)) { + sequenceNumber = reader.getInt(); + } else if ("type".equals(fieldName)) { + type = ServerEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + ServerEventResponseFileSearchCallSearching deserializedServerEventResponseFileSearchCallSearching + = new ServerEventResponseFileSearchCallSearching(responseId, itemId, outputIndex, sequenceNumber); + deserializedServerEventResponseFileSearchCallSearching.setEventId(eventId); + deserializedServerEventResponseFileSearchCallSearching.type = type; + + return deserializedServerEventResponseFileSearchCallSearching; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseVideoDelta.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseVideoDelta.java new file mode 100644 index 000000000000..1fe45a68e82b --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseVideoDelta.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Returned when avatar video frame data is streamed. + */ +@Immutable +public final class ServerEventResponseVideoDelta extends SessionUpdate { + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.RESPONSE_VIDEO_DELTA; + + /* + * The index of the output item in the response. + */ + @Generated + private final int outputIndex; + + /* + * The codec used for the video data. + */ + @Generated + private final String codec; + + /* + * The base64-encoded video frame data. + */ + @Generated + private final String delta; + + /** + * Creates an instance of ServerEventResponseVideoDelta class. + * + * @param outputIndex the outputIndex value to set. + * @param codec the codec value to set. + * @param delta the delta value to set. + */ + @Generated + private ServerEventResponseVideoDelta(int outputIndex, String codec, String delta) { + this.outputIndex = outputIndex; + this.codec = codec; + this.delta = delta; + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the outputIndex property: The index of the output item in the response. + * + * @return the outputIndex value. + */ + @Generated + public int getOutputIndex() { + return this.outputIndex; + } + + /** + * Get the codec property: The codec used for the video data. + * + * @return the codec value. + */ + @Generated + public String getCodec() { + return this.codec; + } + + /** + * Get the delta property: The base64-encoded video frame data. + * + * @return the delta value. + */ + @Generated + public String getDelta() { + return this.delta; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeIntField("output_index", this.outputIndex); + jsonWriter.writeStringField("codec", this.codec); + jsonWriter.writeStringField("delta", this.delta); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventResponseVideoDelta from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventResponseVideoDelta if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerEventResponseVideoDelta. + */ + @Generated + public static ServerEventResponseVideoDelta fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String eventId = null; + int outputIndex = 0; + String codec = null; + String delta = null; + ServerEventType type = ServerEventType.RESPONSE_VIDEO_DELTA; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("event_id".equals(fieldName)) { + eventId = reader.getString(); + } else if ("output_index".equals(fieldName)) { + outputIndex = reader.getInt(); + } else if ("codec".equals(fieldName)) { + codec = reader.getString(); + } else if ("delta".equals(fieldName)) { + delta = reader.getString(); + } else if ("type".equals(fieldName)) { + type = ServerEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + ServerEventResponseVideoDelta deserializedServerEventResponseVideoDelta + = new ServerEventResponseVideoDelta(outputIndex, codec, delta); + deserializedServerEventResponseVideoDelta.setEventId(eventId); + deserializedServerEventResponseVideoDelta.type = type; + + return deserializedServerEventResponseVideoDelta; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallCompleted.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallCompleted.java new file mode 100644 index 000000000000..4c733df70713 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallCompleted.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Returned when a web search call has completed. + */ +@Immutable +public final class ServerEventResponseWebSearchCallCompleted extends SessionUpdate { + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.RESPONSE_WEB_SEARCH_CALL_COMPLETED; + + /* + * The ID of the response. + */ + @Generated + private final String responseId; + + /* + * The ID of the item. + */ + @Generated + private final String itemId; + + /* + * The index of the output item in the response. + */ + @Generated + private final int outputIndex; + + /* + * The sequence number of the web search call. + */ + @Generated + private final int sequenceNumber; + + /** + * Creates an instance of ServerEventResponseWebSearchCallCompleted class. + * + * @param responseId the responseId value to set. + * @param itemId the itemId value to set. + * @param outputIndex the outputIndex value to set. + * @param sequenceNumber the sequenceNumber value to set. + */ + @Generated + private ServerEventResponseWebSearchCallCompleted(String responseId, String itemId, int outputIndex, + int sequenceNumber) { + this.responseId = responseId; + this.itemId = itemId; + this.outputIndex = outputIndex; + this.sequenceNumber = sequenceNumber; + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the responseId property: The ID of the response. + * + * @return the responseId value. + */ + @Generated + public String getResponseId() { + return this.responseId; + } + + /** + * Get the itemId property: The ID of the item. + * + * @return the itemId value. + */ + @Generated + public String getItemId() { + return this.itemId; + } + + /** + * Get the outputIndex property: The index of the output item in the response. + * + * @return the outputIndex value. + */ + @Generated + public int getOutputIndex() { + return this.outputIndex; + } + + /** + * Get the sequenceNumber property: The sequence number of the web search call. + * + * @return the sequenceNumber value. + */ + @Generated + public int getSequenceNumber() { + return this.sequenceNumber; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("response_id", this.responseId); + jsonWriter.writeStringField("item_id", this.itemId); + jsonWriter.writeIntField("output_index", this.outputIndex); + jsonWriter.writeIntField("sequence_number", this.sequenceNumber); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventResponseWebSearchCallCompleted from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventResponseWebSearchCallCompleted if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerEventResponseWebSearchCallCompleted. + */ + @Generated + public static ServerEventResponseWebSearchCallCompleted fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String eventId = null; + String responseId = null; + String itemId = null; + int outputIndex = 0; + int sequenceNumber = 0; + ServerEventType type = ServerEventType.RESPONSE_WEB_SEARCH_CALL_COMPLETED; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("event_id".equals(fieldName)) { + eventId = reader.getString(); + } else if ("response_id".equals(fieldName)) { + responseId = reader.getString(); + } else if ("item_id".equals(fieldName)) { + itemId = reader.getString(); + } else if ("output_index".equals(fieldName)) { + outputIndex = reader.getInt(); + } else if ("sequence_number".equals(fieldName)) { + sequenceNumber = reader.getInt(); + } else if ("type".equals(fieldName)) { + type = ServerEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + ServerEventResponseWebSearchCallCompleted deserializedServerEventResponseWebSearchCallCompleted + = new ServerEventResponseWebSearchCallCompleted(responseId, itemId, outputIndex, sequenceNumber); + deserializedServerEventResponseWebSearchCallCompleted.setEventId(eventId); + deserializedServerEventResponseWebSearchCallCompleted.type = type; + + return deserializedServerEventResponseWebSearchCallCompleted; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallInProgress.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallInProgress.java new file mode 100644 index 000000000000..5069b084785a --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallInProgress.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Returned when a web search call is in progress. + */ +@Immutable +public final class ServerEventResponseWebSearchCallInProgress extends SessionUpdate { + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.RESPONSE_WEB_SEARCH_CALL_IN_PROGRESS; + + /* + * The ID of the response. + */ + @Generated + private final String responseId; + + /* + * The ID of the item. + */ + @Generated + private final String itemId; + + /* + * The index of the output item in the response. + */ + @Generated + private final int outputIndex; + + /* + * The sequence number of the web search call. + */ + @Generated + private final int sequenceNumber; + + /** + * Creates an instance of ServerEventResponseWebSearchCallInProgress class. + * + * @param responseId the responseId value to set. + * @param itemId the itemId value to set. + * @param outputIndex the outputIndex value to set. + * @param sequenceNumber the sequenceNumber value to set. + */ + @Generated + private ServerEventResponseWebSearchCallInProgress(String responseId, String itemId, int outputIndex, + int sequenceNumber) { + this.responseId = responseId; + this.itemId = itemId; + this.outputIndex = outputIndex; + this.sequenceNumber = sequenceNumber; + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the responseId property: The ID of the response. + * + * @return the responseId value. + */ + @Generated + public String getResponseId() { + return this.responseId; + } + + /** + * Get the itemId property: The ID of the item. + * + * @return the itemId value. + */ + @Generated + public String getItemId() { + return this.itemId; + } + + /** + * Get the outputIndex property: The index of the output item in the response. + * + * @return the outputIndex value. + */ + @Generated + public int getOutputIndex() { + return this.outputIndex; + } + + /** + * Get the sequenceNumber property: The sequence number of the web search call. + * + * @return the sequenceNumber value. + */ + @Generated + public int getSequenceNumber() { + return this.sequenceNumber; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("response_id", this.responseId); + jsonWriter.writeStringField("item_id", this.itemId); + jsonWriter.writeIntField("output_index", this.outputIndex); + jsonWriter.writeIntField("sequence_number", this.sequenceNumber); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventResponseWebSearchCallInProgress from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventResponseWebSearchCallInProgress if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerEventResponseWebSearchCallInProgress. + */ + @Generated + public static ServerEventResponseWebSearchCallInProgress fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String eventId = null; + String responseId = null; + String itemId = null; + int outputIndex = 0; + int sequenceNumber = 0; + ServerEventType type = ServerEventType.RESPONSE_WEB_SEARCH_CALL_IN_PROGRESS; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("event_id".equals(fieldName)) { + eventId = reader.getString(); + } else if ("response_id".equals(fieldName)) { + responseId = reader.getString(); + } else if ("item_id".equals(fieldName)) { + itemId = reader.getString(); + } else if ("output_index".equals(fieldName)) { + outputIndex = reader.getInt(); + } else if ("sequence_number".equals(fieldName)) { + sequenceNumber = reader.getInt(); + } else if ("type".equals(fieldName)) { + type = ServerEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + ServerEventResponseWebSearchCallInProgress deserializedServerEventResponseWebSearchCallInProgress + = new ServerEventResponseWebSearchCallInProgress(responseId, itemId, outputIndex, sequenceNumber); + deserializedServerEventResponseWebSearchCallInProgress.setEventId(eventId); + deserializedServerEventResponseWebSearchCallInProgress.type = type; + + return deserializedServerEventResponseWebSearchCallInProgress; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallSearching.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallSearching.java new file mode 100644 index 000000000000..2fc86b20e452 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallSearching.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Returned when a web search call is searching. + */ +@Immutable +public final class ServerEventResponseWebSearchCallSearching extends SessionUpdate { + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.RESPONSE_WEB_SEARCH_CALL_SEARCHING; + + /* + * The ID of the response. + */ + @Generated + private final String responseId; + + /* + * The ID of the item. + */ + @Generated + private final String itemId; + + /* + * The index of the output item in the response. + */ + @Generated + private final int outputIndex; + + /* + * The sequence number of the web search call. + */ + @Generated + private final int sequenceNumber; + + /** + * Creates an instance of ServerEventResponseWebSearchCallSearching class. + * + * @param responseId the responseId value to set. + * @param itemId the itemId value to set. + * @param outputIndex the outputIndex value to set. + * @param sequenceNumber the sequenceNumber value to set. + */ + @Generated + private ServerEventResponseWebSearchCallSearching(String responseId, String itemId, int outputIndex, + int sequenceNumber) { + this.responseId = responseId; + this.itemId = itemId; + this.outputIndex = outputIndex; + this.sequenceNumber = sequenceNumber; + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the responseId property: The ID of the response. + * + * @return the responseId value. + */ + @Generated + public String getResponseId() { + return this.responseId; + } + + /** + * Get the itemId property: The ID of the item. + * + * @return the itemId value. + */ + @Generated + public String getItemId() { + return this.itemId; + } + + /** + * Get the outputIndex property: The index of the output item in the response. + * + * @return the outputIndex value. + */ + @Generated + public int getOutputIndex() { + return this.outputIndex; + } + + /** + * Get the sequenceNumber property: The sequence number of the web search call. + * + * @return the sequenceNumber value. + */ + @Generated + public int getSequenceNumber() { + return this.sequenceNumber; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("response_id", this.responseId); + jsonWriter.writeStringField("item_id", this.itemId); + jsonWriter.writeIntField("output_index", this.outputIndex); + jsonWriter.writeIntField("sequence_number", this.sequenceNumber); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventResponseWebSearchCallSearching from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventResponseWebSearchCallSearching if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerEventResponseWebSearchCallSearching. + */ + @Generated + public static ServerEventResponseWebSearchCallSearching fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String eventId = null; + String responseId = null; + String itemId = null; + int outputIndex = 0; + int sequenceNumber = 0; + ServerEventType type = ServerEventType.RESPONSE_WEB_SEARCH_CALL_SEARCHING; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("event_id".equals(fieldName)) { + eventId = reader.getString(); + } else if ("response_id".equals(fieldName)) { + responseId = reader.getString(); + } else if ("item_id".equals(fieldName)) { + itemId = reader.getString(); + } else if ("output_index".equals(fieldName)) { + outputIndex = reader.getInt(); + } else if ("sequence_number".equals(fieldName)) { + sequenceNumber = reader.getInt(); + } else if ("type".equals(fieldName)) { + type = ServerEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + ServerEventResponseWebSearchCallSearching deserializedServerEventResponseWebSearchCallSearching + = new ServerEventResponseWebSearchCallSearching(responseId, itemId, outputIndex, sequenceNumber); + deserializedServerEventResponseWebSearchCallSearching.setEventId(eventId); + deserializedServerEventResponseWebSearchCallSearching.type = type; + + return deserializedServerEventResponseWebSearchCallSearching; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToIdle.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToIdle.java new file mode 100644 index 000000000000..9f969a140bef --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToIdle.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Returned when the avatar switches to idle state. + */ +@Immutable +public final class ServerEventSessionAvatarSwitchToIdle extends SessionUpdate { + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.SESSION_AVATAR_SWITCH_TO_IDLE; + + /* + * The ID of the turn associated with the avatar state change. + */ + @Generated + private String turnId; + + /** + * Creates an instance of ServerEventSessionAvatarSwitchToIdle class. + */ + @Generated + private ServerEventSessionAvatarSwitchToIdle() { + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the turnId property: The ID of the turn associated with the avatar state change. + * + * @return the turnId value. + */ + @Generated + public String getTurnId() { + return this.turnId; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("turn_id", this.turnId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventSessionAvatarSwitchToIdle from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventSessionAvatarSwitchToIdle if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerEventSessionAvatarSwitchToIdle. + */ + @Generated + public static ServerEventSessionAvatarSwitchToIdle fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerEventSessionAvatarSwitchToIdle deserializedServerEventSessionAvatarSwitchToIdle + = new ServerEventSessionAvatarSwitchToIdle(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("event_id".equals(fieldName)) { + deserializedServerEventSessionAvatarSwitchToIdle.setEventId(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedServerEventSessionAvatarSwitchToIdle.type + = ServerEventType.fromString(reader.getString()); + } else if ("turn_id".equals(fieldName)) { + deserializedServerEventSessionAvatarSwitchToIdle.turnId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerEventSessionAvatarSwitchToIdle; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToSpeaking.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToSpeaking.java new file mode 100644 index 000000000000..e70563f1325f --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToSpeaking.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Returned when the avatar switches to speaking state. + */ +@Immutable +public final class ServerEventSessionAvatarSwitchToSpeaking extends SessionUpdate { + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.SESSION_AVATAR_SWITCH_TO_SPEAKING; + + /* + * The ID of the turn associated with the avatar state change. + */ + @Generated + private String turnId; + + /** + * Creates an instance of ServerEventSessionAvatarSwitchToSpeaking class. + */ + @Generated + private ServerEventSessionAvatarSwitchToSpeaking() { + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the turnId property: The ID of the turn associated with the avatar state change. + * + * @return the turnId value. + */ + @Generated + public String getTurnId() { + return this.turnId; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("turn_id", this.turnId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventSessionAvatarSwitchToSpeaking from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventSessionAvatarSwitchToSpeaking if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerEventSessionAvatarSwitchToSpeaking. + */ + @Generated + public static ServerEventSessionAvatarSwitchToSpeaking fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerEventSessionAvatarSwitchToSpeaking deserializedServerEventSessionAvatarSwitchToSpeaking + = new ServerEventSessionAvatarSwitchToSpeaking(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("event_id".equals(fieldName)) { + deserializedServerEventSessionAvatarSwitchToSpeaking.setEventId(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedServerEventSessionAvatarSwitchToSpeaking.type + = ServerEventType.fromString(reader.getString()); + } else if ("turn_id".equals(fieldName)) { + deserializedServerEventSessionAvatarSwitchToSpeaking.turnId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerEventSessionAvatarSwitchToSpeaking; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventType.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventType.java index dd472f5fa429..92ed43e21c03 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventType.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventType.java @@ -317,4 +317,78 @@ public static Collection values() { */ @Generated public static final ServerEventType WARNING = fromString("warning"); + + /** + * Avatar switches to speaking state. + */ + @Generated + public static final ServerEventType SESSION_AVATAR_SWITCH_TO_SPEAKING + = fromString("session.avatar.switch_to_speaking"); + + /** + * Avatar switches to idle state. + */ + @Generated + public static final ServerEventType SESSION_AVATAR_SWITCH_TO_IDLE = fromString("session.avatar.switch_to_idle"); + + /** + * Delta update for avatar video frames. + */ + @Generated + public static final ServerEventType RESPONSE_VIDEO_DELTA = fromString("response.video.delta"); + + /** + * Web search call is searching. + */ + @Generated + public static final ServerEventType RESPONSE_WEB_SEARCH_CALL_SEARCHING + = fromString("response.web_search_call.searching"); + + /** + * Web search call is in progress. + */ + @Generated + public static final ServerEventType RESPONSE_WEB_SEARCH_CALL_IN_PROGRESS + = fromString("response.web_search_call.in_progress"); + + /** + * Web search call completed. + */ + @Generated + public static final ServerEventType RESPONSE_WEB_SEARCH_CALL_COMPLETED + = fromString("response.web_search_call.completed"); + + /** + * File search call is searching. + */ + @Generated + public static final ServerEventType RESPONSE_FILE_SEARCH_CALL_SEARCHING + = fromString("response.file_search_call.searching"); + + /** + * File search call is in progress. + */ + @Generated + public static final ServerEventType RESPONSE_FILE_SEARCH_CALL_IN_PROGRESS + = fromString("response.file_search_call.in_progress"); + + /** + * File search call completed. + */ + @Generated + public static final ServerEventType RESPONSE_FILE_SEARCH_CALL_COMPLETED + = fromString("response.file_search_call.completed"); + + /** + * Output audio buffer has been cleared. + */ + @Generated + public static final ServerEventType OUTPUT_AUDIO_BUFFER_CLEARED = fromString("output_audio_buffer.cleared"); + + /** + * Audio transcript annotation added. + */ + @Generated + public static final ServerEventType RESPONSE_AUDIO_TRANSCRIPT_ANNOTATION_ADDED + = fromString("response.audio_transcript.annotation.added"); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerVadTurnDetection.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerVadTurnDetection.java index b820c291845a..c28830fd5052 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerVadTurnDetection.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerVadTurnDetection.java @@ -23,43 +23,43 @@ public final class ServerVadTurnDetection extends TurnDetection { private TurnDetectionType type = TurnDetectionType.SERVER_VAD; /* - * The threshold property. + * Activation threshold for VAD detection. Range: 0.0 to 1.0. */ @Generated private Double threshold; /* - * The prefix_padding_ms property. + * Amount of audio to include before speech is detected, in milliseconds. */ @Generated private Integer prefixPaddingMs; /* - * The silence_duration_ms property. + * Duration of silence required to end speech detection, in milliseconds. */ @Generated private Integer silenceDurationMs; /* - * The end_of_utterance_detection property. + * Configuration for end-of-utterance detection. */ @Generated private EouDetection endOfUtteranceDetection; /* - * The auto_truncate property. + * Whether to automatically truncate the audio buffer when speech stops. */ @Generated private Boolean autoTruncate; /* - * The create_response property. + * Whether to automatically create a response when speech stops. */ @Generated private Boolean createResponse; /* - * The interrupt_response property. + * Whether to allow the user's speech to interrupt the assistant's response. */ @Generated private Boolean interruptResponse; @@ -83,7 +83,7 @@ public TurnDetectionType getType() { } /** - * Get the threshold property: The threshold property. + * Get the threshold property: Activation threshold for VAD detection. Range: 0.0 to 1.0. * * @return the threshold value. */ @@ -93,7 +93,7 @@ public Double getThreshold() { } /** - * Set the threshold property: The threshold property. + * Set the threshold property: Activation threshold for VAD detection. Range: 0.0 to 1.0. * * @param threshold the threshold value to set. * @return the ServerVadTurnDetection object itself. @@ -105,7 +105,7 @@ public ServerVadTurnDetection setThreshold(Double threshold) { } /** - * Get the prefixPaddingMs property: The prefix_padding_ms property. + * Get the prefixPaddingMs property: Amount of audio to include before speech is detected, in milliseconds. * * @return the prefixPaddingMs value. */ @@ -115,7 +115,7 @@ public Integer getPrefixPaddingMs() { } /** - * Set the prefixPaddingMs property: The prefix_padding_ms property. + * Set the prefixPaddingMs property: Amount of audio to include before speech is detected, in milliseconds. * * @param prefixPaddingMs the prefixPaddingMs value to set. * @return the ServerVadTurnDetection object itself. @@ -127,7 +127,7 @@ public ServerVadTurnDetection setPrefixPaddingMs(Integer prefixPaddingMs) { } /** - * Get the silenceDurationMs property: The silence_duration_ms property. + * Get the silenceDurationMs property: Duration of silence required to end speech detection, in milliseconds. * * @return the silenceDurationMs value. */ @@ -137,7 +137,7 @@ public Integer getSilenceDurationMs() { } /** - * Set the silenceDurationMs property: The silence_duration_ms property. + * Set the silenceDurationMs property: Duration of silence required to end speech detection, in milliseconds. * * @param silenceDurationMs the silenceDurationMs value to set. * @return the ServerVadTurnDetection object itself. @@ -149,7 +149,7 @@ public ServerVadTurnDetection setSilenceDurationMs(Integer silenceDurationMs) { } /** - * Get the endOfUtteranceDetection property: The end_of_utterance_detection property. + * Get the endOfUtteranceDetection property: Configuration for end-of-utterance detection. * * @return the endOfUtteranceDetection value. */ @@ -159,7 +159,7 @@ public EouDetection getEndOfUtteranceDetection() { } /** - * Set the endOfUtteranceDetection property: The end_of_utterance_detection property. + * Set the endOfUtteranceDetection property: Configuration for end-of-utterance detection. * * @param endOfUtteranceDetection the endOfUtteranceDetection value to set. * @return the ServerVadTurnDetection object itself. @@ -171,7 +171,7 @@ public ServerVadTurnDetection setEndOfUtteranceDetection(EouDetection endOfUtter } /** - * Get the autoTruncate property: The auto_truncate property. + * Get the autoTruncate property: Whether to automatically truncate the audio buffer when speech stops. * * @return the autoTruncate value. */ @@ -181,7 +181,7 @@ public Boolean isAutoTruncate() { } /** - * Set the autoTruncate property: The auto_truncate property. + * Set the autoTruncate property: Whether to automatically truncate the audio buffer when speech stops. * * @param autoTruncate the autoTruncate value to set. * @return the ServerVadTurnDetection object itself. @@ -193,7 +193,7 @@ public ServerVadTurnDetection setAutoTruncate(Boolean autoTruncate) { } /** - * Get the createResponse property: The create_response property. + * Get the createResponse property: Whether to automatically create a response when speech stops. * * @return the createResponse value. */ @@ -203,7 +203,7 @@ public Boolean isCreateResponse() { } /** - * Set the createResponse property: The create_response property. + * Set the createResponse property: Whether to automatically create a response when speech stops. * * @param createResponse the createResponse value to set. * @return the ServerVadTurnDetection object itself. @@ -215,7 +215,7 @@ public ServerVadTurnDetection setCreateResponse(Boolean createResponse) { } /** - * Get the interruptResponse property: The interrupt_response property. + * Get the interruptResponse property: Whether to allow the user's speech to interrupt the assistant's response. * * @return the interruptResponse value. */ @@ -225,7 +225,7 @@ public Boolean isInterruptResponse() { } /** - * Set the interruptResponse property: The interrupt_response property. + * Set the interruptResponse property: Whether to allow the user's speech to interrupt the assistant's response. * * @param interruptResponse the interruptResponse value to set. * @return the ServerVadTurnDetection object itself. diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionIncludeOption.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionIncludeOption.java new file mode 100644 index 000000000000..7736685a50b6 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionIncludeOption.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Options for what additional data to include in session responses. + */ +public final class SessionIncludeOption extends ExpandableStringEnum { + /** + * Include log probabilities for input audio transcription. + */ + @Generated + public static final SessionIncludeOption ITEM_INPUT_AUDIO_TRANSCRIPTION_LOGPROBS + = fromString("item.input_audio_transcription.logprobs"); + + /** + * Include phrase-level details for input audio transcription. + */ + @Generated + public static final SessionIncludeOption ITEM_INPUT_AUDIO_TRANSCRIPTION_PHRASES + = fromString("item.input_audio_transcription.phrases"); + + /** + * Include file search call results. + */ + @Generated + public static final SessionIncludeOption FILE_SEARCH_CALL_RESULTS = fromString("file_search_call.results"); + + /** + * Creates a new instance of SessionIncludeOption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public SessionIncludeOption() { + } + + /** + * Creates or finds a SessionIncludeOption from its string representation. + * + * @param name a name to look for. + * @return the corresponding SessionIncludeOption. + */ + @Generated + public static SessionIncludeOption fromString(String name) { + return fromString(name, SessionIncludeOption.class); + } + + /** + * Gets known SessionIncludeOption values. + * + * @return known SessionIncludeOption values. + */ + @Generated + public static Collection values() { + return values(SessionIncludeOption.class); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionResponseItem.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionResponseItem.java index cc1e2f518a0c..d8025bca30c6 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionResponseItem.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionResponseItem.java @@ -149,6 +149,10 @@ public static SessionResponseItem fromJson(JsonReader jsonReader) throws IOExcep return ResponseMCPApprovalRequestItem.fromJson(readerToUse.reset()); } else if ("mcp_approval_response".equals(discriminatorValue)) { return ResponseMCPApprovalResponseItem.fromJson(readerToUse.reset()); + } else if ("web_search_call".equals(discriminatorValue)) { + return ResponseWebSearchCallItem.fromJson(readerToUse.reset()); + } else if ("file_search_call".equals(discriminatorValue)) { + return ResponseFileSearchCallItem.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionUpdate.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionUpdate.java index 20c39fa32c38..edb634601605 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionUpdate.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionUpdate.java @@ -194,6 +194,28 @@ public static SessionUpdate fromJson(JsonReader jsonReader) throws IOException { return ServerEventResponseMcpCallCompleted.fromJson(readerToUse.reset()); } else if ("response.mcp_call.failed".equals(discriminatorValue)) { return ServerEventResponseMcpCallFailed.fromJson(readerToUse.reset()); + } else if ("session.avatar.switch_to_speaking".equals(discriminatorValue)) { + return ServerEventSessionAvatarSwitchToSpeaking.fromJson(readerToUse.reset()); + } else if ("session.avatar.switch_to_idle".equals(discriminatorValue)) { + return ServerEventSessionAvatarSwitchToIdle.fromJson(readerToUse.reset()); + } else if ("response.video.delta".equals(discriminatorValue)) { + return ServerEventResponseVideoDelta.fromJson(readerToUse.reset()); + } else if ("response.web_search_call.searching".equals(discriminatorValue)) { + return ServerEventResponseWebSearchCallSearching.fromJson(readerToUse.reset()); + } else if ("response.web_search_call.in_progress".equals(discriminatorValue)) { + return ServerEventResponseWebSearchCallInProgress.fromJson(readerToUse.reset()); + } else if ("response.web_search_call.completed".equals(discriminatorValue)) { + return ServerEventResponseWebSearchCallCompleted.fromJson(readerToUse.reset()); + } else if ("response.file_search_call.searching".equals(discriminatorValue)) { + return ServerEventResponseFileSearchCallSearching.fromJson(readerToUse.reset()); + } else if ("response.file_search_call.in_progress".equals(discriminatorValue)) { + return ServerEventResponseFileSearchCallInProgress.fromJson(readerToUse.reset()); + } else if ("response.file_search_call.completed".equals(discriminatorValue)) { + return ServerEventResponseFileSearchCallCompleted.fromJson(readerToUse.reset()); + } else if ("output_audio_buffer.cleared".equals(discriminatorValue)) { + return ServerEventOutputAudioBufferCleared.fromJson(readerToUse.reset()); + } else if ("response.audio_transcript.annotation.added".equals(discriminatorValue)) { + return ServerEventResponseAudioTranscriptAnnotationAdded.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionCompleted.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionCompleted.java index 0c6746fa4c2c..42bf07e72145 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionCompleted.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionCompleted.java @@ -9,6 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * This event is the output of audio transcription for user audio written to the @@ -116,6 +117,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeIntField("content_index", this.contentIndex); jsonWriter.writeStringField("transcript", this.transcript); jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeArrayField("logprobs", this.logprobs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("phrases", this.phrases, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -138,6 +141,8 @@ public static SessionUpdateConversationItemInputAudioTranscriptionCompleted from int contentIndex = 0; String transcript = null; ServerEventType type = ServerEventType.CONVERSATION_ITEM_INPUT_AUDIO_TRANSCRIPTION_COMPLETED; + List logprobs = null; + List phrases = null; while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -151,6 +156,10 @@ public static SessionUpdateConversationItemInputAudioTranscriptionCompleted from transcript = reader.getString(); } else if ("type".equals(fieldName)) { type = ServerEventType.fromString(reader.getString()); + } else if ("logprobs".equals(fieldName)) { + logprobs = reader.readArray(reader1 -> LogProbProperties.fromJson(reader1)); + } else if ("phrases".equals(fieldName)) { + phrases = reader.readArray(reader1 -> TranscriptionPhrase.fromJson(reader1)); } else { reader.skipChildren(); } @@ -159,7 +168,41 @@ public static SessionUpdateConversationItemInputAudioTranscriptionCompleted from = new SessionUpdateConversationItemInputAudioTranscriptionCompleted(itemId, contentIndex, transcript); deserializedSessionUpdateConversationItemInputAudioTranscriptionCompleted.setEventId(eventId); deserializedSessionUpdateConversationItemInputAudioTranscriptionCompleted.type = type; + deserializedSessionUpdateConversationItemInputAudioTranscriptionCompleted.logprobs = logprobs; + deserializedSessionUpdateConversationItemInputAudioTranscriptionCompleted.phrases = phrases; return deserializedSessionUpdateConversationItemInputAudioTranscriptionCompleted; }); } + + /* + * The log probabilities of the transcription tokens. + */ + @Generated + private List logprobs; + + /* + * The transcription phrases with timing information. + */ + @Generated + private List phrases; + + /** + * Get the logprobs property: The log probabilities of the transcription tokens. + * + * @return the logprobs value. + */ + @Generated + public List getLogprobs() { + return this.logprobs; + } + + /** + * Get the phrases property: The transcription phrases with timing information. + * + * @return the phrases value. + */ + @Generated + public List getPhrases() { + return this.phrases; + } } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/TranscriptionPhrase.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/TranscriptionPhrase.java new file mode 100644 index 000000000000..855a361ca0a0 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/TranscriptionPhrase.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A transcribed phrase with timing information. + */ +@Immutable +public final class TranscriptionPhrase implements JsonSerializable { + /* + * Offset from the start of the audio in milliseconds. + */ + @Generated + private final int offsetMilliseconds; + + /* + * Duration of the phrase in milliseconds. + */ + @Generated + private final int durationMilliseconds; + + /* + * The transcribed text of the phrase. + */ + @Generated + private final String text; + + /* + * The individual words in the phrase with timing information. + */ + @Generated + private List words; + + /* + * The locale of the transcription (e.g., 'en-US'). + */ + @Generated + private String locale; + + /* + * The confidence score of the transcription. + */ + @Generated + private Double confidence; + + /** + * Creates an instance of TranscriptionPhrase class. + * + * @param offsetMilliseconds the offsetMilliseconds value to set. + * @param durationMilliseconds the durationMilliseconds value to set. + * @param text the text value to set. + */ + @Generated + private TranscriptionPhrase(int offsetMilliseconds, int durationMilliseconds, String text) { + this.offsetMilliseconds = offsetMilliseconds; + this.durationMilliseconds = durationMilliseconds; + this.text = text; + } + + /** + * Get the offsetMilliseconds property: Offset from the start of the audio in milliseconds. + * + * @return the offsetMilliseconds value. + */ + @Generated + public int getOffsetMilliseconds() { + return this.offsetMilliseconds; + } + + /** + * Get the durationMilliseconds property: Duration of the phrase in milliseconds. + * + * @return the durationMilliseconds value. + */ + @Generated + public int getDurationMilliseconds() { + return this.durationMilliseconds; + } + + /** + * Get the text property: The transcribed text of the phrase. + * + * @return the text value. + */ + @Generated + public String getText() { + return this.text; + } + + /** + * Get the words property: The individual words in the phrase with timing information. + * + * @return the words value. + */ + @Generated + public List getWords() { + return this.words; + } + + /** + * Get the locale property: The locale of the transcription (e.g., 'en-US'). + * + * @return the locale value. + */ + @Generated + public String getLocale() { + return this.locale; + } + + /** + * Get the confidence property: The confidence score of the transcription. + * + * @return the confidence value. + */ + @Generated + public Double getConfidence() { + return this.confidence; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("offset_milliseconds", this.offsetMilliseconds); + jsonWriter.writeIntField("duration_milliseconds", this.durationMilliseconds); + jsonWriter.writeStringField("text", this.text); + jsonWriter.writeArrayField("words", this.words, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("locale", this.locale); + jsonWriter.writeNumberField("confidence", this.confidence); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TranscriptionPhrase from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TranscriptionPhrase if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TranscriptionPhrase. + */ + @Generated + public static TranscriptionPhrase fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + int offsetMilliseconds = 0; + int durationMilliseconds = 0; + String text = null; + List words = null; + String locale = null; + Double confidence = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("offset_milliseconds".equals(fieldName)) { + offsetMilliseconds = reader.getInt(); + } else if ("duration_milliseconds".equals(fieldName)) { + durationMilliseconds = reader.getInt(); + } else if ("text".equals(fieldName)) { + text = reader.getString(); + } else if ("words".equals(fieldName)) { + words = reader.readArray(reader1 -> TranscriptionWord.fromJson(reader1)); + } else if ("locale".equals(fieldName)) { + locale = reader.getString(); + } else if ("confidence".equals(fieldName)) { + confidence = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + TranscriptionPhrase deserializedTranscriptionPhrase + = new TranscriptionPhrase(offsetMilliseconds, durationMilliseconds, text); + deserializedTranscriptionPhrase.words = words; + deserializedTranscriptionPhrase.locale = locale; + deserializedTranscriptionPhrase.confidence = confidence; + + return deserializedTranscriptionPhrase; + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/TranscriptionWord.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/TranscriptionWord.java new file mode 100644 index 000000000000..c53c0f0bf17e --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/TranscriptionWord.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A time-stamped word in the transcription. + */ +@Immutable +public final class TranscriptionWord implements JsonSerializable { + /* + * The transcribed word text. + */ + @Generated + private final String text; + + /* + * Offset from the start of the audio in milliseconds. + */ + @Generated + private final int offsetMilliseconds; + + /* + * Duration of the word in milliseconds. + */ + @Generated + private final int durationMilliseconds; + + /** + * Creates an instance of TranscriptionWord class. + * + * @param text the text value to set. + * @param offsetMilliseconds the offsetMilliseconds value to set. + * @param durationMilliseconds the durationMilliseconds value to set. + */ + @Generated + private TranscriptionWord(String text, int offsetMilliseconds, int durationMilliseconds) { + this.text = text; + this.offsetMilliseconds = offsetMilliseconds; + this.durationMilliseconds = durationMilliseconds; + } + + /** + * Get the text property: The transcribed word text. + * + * @return the text value. + */ + @Generated + public String getText() { + return this.text; + } + + /** + * Get the offsetMilliseconds property: Offset from the start of the audio in milliseconds. + * + * @return the offsetMilliseconds value. + */ + @Generated + public int getOffsetMilliseconds() { + return this.offsetMilliseconds; + } + + /** + * Get the durationMilliseconds property: Duration of the word in milliseconds. + * + * @return the durationMilliseconds value. + */ + @Generated + public int getDurationMilliseconds() { + return this.durationMilliseconds; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("text", this.text); + jsonWriter.writeIntField("offset_milliseconds", this.offsetMilliseconds); + jsonWriter.writeIntField("duration_milliseconds", this.durationMilliseconds); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TranscriptionWord from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TranscriptionWord if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TranscriptionWord. + */ + @Generated + public static TranscriptionWord fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String text = null; + int offsetMilliseconds = 0; + int durationMilliseconds = 0; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("text".equals(fieldName)) { + text = reader.getString(); + } else if ("offset_milliseconds".equals(fieldName)) { + offsetMilliseconds = reader.getInt(); + } else if ("duration_milliseconds".equals(fieldName)) { + durationMilliseconds = reader.getInt(); + } else { + reader.skipChildren(); + } + } + return new TranscriptionWord(text, offsetMilliseconds, durationMilliseconds); + }); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionOptions.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionOptions.java index 6fb7f6edcdea..da9f1c71bf9d 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionOptions.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionOptions.java @@ -12,6 +12,7 @@ import com.azure.json.JsonWriter; import java.io.IOException; import java.util.List; +import java.util.Map; /** * Base for session configuration shared between request and response. @@ -553,6 +554,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeFieldName("interim_response"); this.interimResponse.writeTo(jsonWriter); } + jsonWriter.writeArrayField("include", this.include, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -626,6 +630,13 @@ public static VoiceLiveSessionOptions fromJson(JsonReader jsonReader) throws IOE } else if ("interim_response".equals(fieldName)) { deserializedVoiceLiveSessionOptions.interimResponse = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + } else if ("include".equals(fieldName)) { + List include + = reader.readArray(reader1 -> SessionIncludeOption.fromString(reader1.getString())); + deserializedVoiceLiveSessionOptions.include = include; + } else if ("metadata".equals(fieldName)) { + Map metadata = reader.readMap(reader1 -> reader1.getString()); + deserializedVoiceLiveSessionOptions.metadata = metadata; } else { reader.skipChildren(); } @@ -732,4 +743,74 @@ public VoiceLiveSessionOptions setInterimResponse(BinaryData interimResponse) { this.interimResponse = interimResponse; return this; } + + /* + * List of include options for the session (e.g., logprobs, phrases, file search results). + */ + @Generated + private List include; + + /* + * Set of up to 16 key-value pairs that can be attached to the session. This is useful for + * storing additional information about the session in a structured format, such as tracking IDs, + * user context, or application-specific labels. These key-value pairs are also included in + * Foundry resource logs for tracing and diagnostics. Keys can be a maximum of 64 characters + * long and values can be a maximum of 512 characters long. + */ + @Generated + private Map metadata; + + /** + * Get the include property: List of include options for the session (e.g., logprobs, phrases, file search results). + * + * @return the include value. + */ + @Generated + public List getInclude() { + return this.include; + } + + /** + * Set the include property: List of include options for the session (e.g., logprobs, phrases, file search results). + * + * @param include the include value to set. + * @return the VoiceLiveSessionOptions object itself. + */ + @Generated + public VoiceLiveSessionOptions setInclude(List include) { + this.include = include; + return this; + } + + /** + * Get the metadata property: Set of up to 16 key-value pairs that can be attached to the session. This is useful + * for + * storing additional information about the session in a structured format, such as tracking IDs, + * user context, or application-specific labels. These key-value pairs are also included in + * Foundry resource logs for tracing and diagnostics. Keys can be a maximum of 64 characters + * long and values can be a maximum of 512 characters long. + * + * @return the metadata value. + */ + @Generated + public Map getMetadata() { + return this.metadata; + } + + /** + * Set the metadata property: Set of up to 16 key-value pairs that can be attached to the session. This is useful + * for + * storing additional information about the session in a structured format, such as tracking IDs, + * user context, or application-specific labels. These key-value pairs are also included in + * Foundry resource logs for tracing and diagnostics. Keys can be a maximum of 64 characters + * long and values can be a maximum of 512 characters long. + * + * @param metadata the metadata value to set. + * @return the VoiceLiveSessionOptions object itself. + */ + @Generated + public VoiceLiveSessionOptions setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionResponse.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionResponse.java index a1ab170bf416..4c89d045e6d4 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionResponse.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionResponse.java @@ -12,6 +12,7 @@ import com.azure.json.JsonWriter; import java.io.IOException; import java.util.List; +import java.util.Map; /** * Base for session configuration in the response. @@ -609,6 +610,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeFieldName("interim_response"); this.interimResponse.writeTo(jsonWriter); } + jsonWriter.writeArrayField("include", this.include, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("agent", this.agent); jsonWriter.writeStringField("id", this.id); return jsonWriter.writeEndObject(); @@ -686,6 +690,13 @@ public static VoiceLiveSessionResponse fromJson(JsonReader jsonReader) throws IO } else if ("interim_response".equals(fieldName)) { deserializedVoiceLiveSessionResponse.interimResponse = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + } else if ("include".equals(fieldName)) { + List include + = reader.readArray(reader1 -> SessionIncludeOption.fromString(reader1.getString())); + deserializedVoiceLiveSessionResponse.include = include; + } else if ("metadata".equals(fieldName)) { + Map metadata = reader.readMap(reader1 -> reader1.getString()); + deserializedVoiceLiveSessionResponse.metadata = metadata; } else if ("agent".equals(fieldName)) { deserializedVoiceLiveSessionResponse.agent = RespondingAgentOptions.fromJson(reader); } else if ("id".equals(fieldName)) { @@ -796,4 +807,74 @@ public VoiceLiveSessionResponse setInterimResponse(BinaryData interimResponse) { this.interimResponse = interimResponse; return this; } + + /* + * List of include options for the session (e.g., logprobs, phrases, file search results). + */ + @Generated + private List include; + + /* + * Set of up to 16 key-value pairs that can be attached to the session. This is useful for + * storing additional information about the session in a structured format, such as tracking IDs, + * user context, or application-specific labels. These key-value pairs are also included in + * Foundry resource logs for tracing and diagnostics. Keys can be a maximum of 64 characters + * long and values can be a maximum of 512 characters long. + */ + @Generated + private Map metadata; + + /** + * Get the include property: List of include options for the session (e.g., logprobs, phrases, file search results). + * + * @return the include value. + */ + @Generated + public List getInclude() { + return this.include; + } + + /** + * Set the include property: List of include options for the session (e.g., logprobs, phrases, file search results). + * + * @param include the include value to set. + * @return the VoiceLiveSessionResponse object itself. + */ + @Generated + public VoiceLiveSessionResponse setInclude(List include) { + this.include = include; + return this; + } + + /** + * Get the metadata property: Set of up to 16 key-value pairs that can be attached to the session. This is useful + * for + * storing additional information about the session in a structured format, such as tracking IDs, + * user context, or application-specific labels. These key-value pairs are also included in + * Foundry resource logs for tracing and diagnostics. Keys can be a maximum of 64 characters + * long and values can be a maximum of 512 characters long. + * + * @return the metadata value. + */ + @Generated + public Map getMetadata() { + return this.metadata; + } + + /** + * Set the metadata property: Set of up to 16 key-value pairs that can be attached to the session. This is useful + * for + * storing additional information about the session in a structured format, such as tracking IDs, + * user context, or application-specific labels. These key-value pairs are also included in + * Foundry resource logs for tracing and diagnostics. Keys can be a maximum of 64 characters + * long and values can be a maximum of 512 characters long. + * + * @param metadata the metadata value to set. + * @return the VoiceLiveSessionResponse object itself. + */ + @Generated + public VoiceLiveSessionResponse setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/resources/META-INF/azure-ai-voicelive_metadata.json b/sdk/voicelive/azure-ai-voicelive/src/main/resources/META-INF/azure-ai-voicelive_metadata.json index c002e73652be..d9644fbb2074 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/resources/META-INF/azure-ai-voicelive_metadata.json +++ b/sdk/voicelive/azure-ai-voicelive/src/main/resources/META-INF/azure-ai-voicelive_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"VoiceLive":"2026-01-01-preview"},"crossLanguageDefinitions":{"com.azure.ai.voicelive.models.AnimationOptions":"VoiceLive.Animation","com.azure.ai.voicelive.models.AnimationOutputType":"VoiceLive.AnimationOutputType","com.azure.ai.voicelive.models.AssistantMessageItem":"VoiceLive.AssistantMessageItem","com.azure.ai.voicelive.models.AudioEchoCancellation":"VoiceLive.AudioEchoCancellation","com.azure.ai.voicelive.models.AudioInputTranscriptionOptions":"VoiceLive.AudioInputTranscriptionOptions","com.azure.ai.voicelive.models.AudioInputTranscriptionOptionsModel":"VoiceLive.AudioInputTranscriptionOptions.model.anonymous","com.azure.ai.voicelive.models.AudioNoiseReduction":"VoiceLive.AudioNoiseReduction","com.azure.ai.voicelive.models.AudioNoiseReductionType":"VoiceLive.AudioNoiseReduction.type.anonymous","com.azure.ai.voicelive.models.AudioTimestampType":"VoiceLive.AudioTimestampType","com.azure.ai.voicelive.models.AvatarConfigTypes":"VoiceLive.AvatarConfigTypes","com.azure.ai.voicelive.models.AvatarConfiguration":"VoiceLive.AvatarConfig","com.azure.ai.voicelive.models.AvatarOutputProtocol":"VoiceLive.AvatarOutputProtocol","com.azure.ai.voicelive.models.AzureCustomVoice":"VoiceLive.AzureCustomVoice","com.azure.ai.voicelive.models.AzurePersonalVoice":"VoiceLive.AzurePersonalVoice","com.azure.ai.voicelive.models.AzureSemanticEouDetection":"VoiceLive.AzureSemanticDetection","com.azure.ai.voicelive.models.AzureSemanticEouDetectionEn":"VoiceLive.AzureSemanticDetectionEn","com.azure.ai.voicelive.models.AzureSemanticEouDetectionMultilingual":"VoiceLive.AzureSemanticDetectionMultilingual","com.azure.ai.voicelive.models.AzureSemanticVadTurnDetection":"VoiceLive.AzureSemanticVad","com.azure.ai.voicelive.models.AzureSemanticVadTurnDetectionEn":"VoiceLive.AzureSemanticVadEn","com.azure.ai.voicelive.models.AzureSemanticVadTurnDetectionMultilingual":"VoiceLive.AzureSemanticVadMultilingual","com.azure.ai.voicelive.models.AzureStandardVoice":"VoiceLive.AzureStandardVoice","com.azure.ai.voicelive.models.AzureVoice":"VoiceLive.AzureVoice","com.azure.ai.voicelive.models.AzureVoiceType":"VoiceLive.AzureVoiceType","com.azure.ai.voicelive.models.CachedTokenDetails":"VoiceLive.CachedTokenDetails","com.azure.ai.voicelive.models.ClientEvent":"VoiceLive.ClientEvent","com.azure.ai.voicelive.models.ClientEventConversationItemCreate":"VoiceLive.ClientEventConversationItemCreate","com.azure.ai.voicelive.models.ClientEventConversationItemDelete":"VoiceLive.ClientEventConversationItemDelete","com.azure.ai.voicelive.models.ClientEventConversationItemRetrieve":"VoiceLive.ClientEventConversationItemRetrieve","com.azure.ai.voicelive.models.ClientEventConversationItemTruncate":"VoiceLive.ClientEventConversationItemTruncate","com.azure.ai.voicelive.models.ClientEventInputAudioBufferAppend":"VoiceLive.ClientEventInputAudioBufferAppend","com.azure.ai.voicelive.models.ClientEventInputAudioBufferClear":"VoiceLive.ClientEventInputAudioBufferClear","com.azure.ai.voicelive.models.ClientEventInputAudioBufferCommit":"VoiceLive.ClientEventInputAudioBufferCommit","com.azure.ai.voicelive.models.ClientEventInputAudioClear":"VoiceLive.ClientEventInputAudioClear","com.azure.ai.voicelive.models.ClientEventInputAudioTurnAppend":"VoiceLive.ClientEventInputAudioTurnAppend","com.azure.ai.voicelive.models.ClientEventInputAudioTurnCancel":"VoiceLive.ClientEventInputAudioTurnCancel","com.azure.ai.voicelive.models.ClientEventInputAudioTurnEnd":"VoiceLive.ClientEventInputAudioTurnEnd","com.azure.ai.voicelive.models.ClientEventInputAudioTurnStart":"VoiceLive.ClientEventInputAudioTurnStart","com.azure.ai.voicelive.models.ClientEventResponseCancel":"VoiceLive.ClientEventResponseCancel","com.azure.ai.voicelive.models.ClientEventResponseCreate":"VoiceLive.ClientEventResponseCreate","com.azure.ai.voicelive.models.ClientEventSessionAvatarConnect":"VoiceLive.ClientEventSessionAvatarConnect","com.azure.ai.voicelive.models.ClientEventSessionUpdate":"VoiceLive.ClientEventSessionUpdate","com.azure.ai.voicelive.models.ClientEventType":"VoiceLive.ClientEventType","com.azure.ai.voicelive.models.ContentPartType":"VoiceLive.ContentPartType","com.azure.ai.voicelive.models.ConversationRequestItem":"VoiceLive.ConversationRequestItem","com.azure.ai.voicelive.models.EouDetection":"VoiceLive.EouDetection","com.azure.ai.voicelive.models.EouDetectionModel":"VoiceLive.EouDetection.model.anonymous","com.azure.ai.voicelive.models.EouThresholdLevel":"VoiceLive.EouThresholdLevel","com.azure.ai.voicelive.models.FunctionCallItem":"VoiceLive.FunctionCallItem","com.azure.ai.voicelive.models.FunctionCallOutputItem":"VoiceLive.FunctionCallOutputItem","com.azure.ai.voicelive.models.IceServer":"VoiceLive.IceServer","com.azure.ai.voicelive.models.InputAudioContentPart":"VoiceLive.InputAudioContentPart","com.azure.ai.voicelive.models.InputAudioFormat":"VoiceLive.InputAudioFormat","com.azure.ai.voicelive.models.InputTextContentPart":"VoiceLive.InputTextContentPart","com.azure.ai.voicelive.models.InputTokenDetails":"VoiceLive.InputTokenDetails","com.azure.ai.voicelive.models.InteractionModality":"VoiceLive.Modality","com.azure.ai.voicelive.models.InterimResponseConfigBase":"VoiceLive.InterimResponseConfigBase","com.azure.ai.voicelive.models.InterimResponseConfigType":"VoiceLive.InterimResponseConfigType","com.azure.ai.voicelive.models.InterimResponseTrigger":"VoiceLive.InterimResponseTrigger","com.azure.ai.voicelive.models.ItemParamStatus":"VoiceLive.ItemParamStatus","com.azure.ai.voicelive.models.ItemType":"VoiceLive.ItemType","com.azure.ai.voicelive.models.LlmInterimResponseConfig":"VoiceLive.LlmInterimResponseConfig","com.azure.ai.voicelive.models.LogProbProperties":"VoiceLive.LogProbProperties","com.azure.ai.voicelive.models.MCPApprovalResponseRequestItem":"VoiceLive.MCPApprovalResponseRequestItem","com.azure.ai.voicelive.models.MCPApprovalType":"VoiceLive.MCPApprovalType","com.azure.ai.voicelive.models.MCPServer":"VoiceLive.MCPServer","com.azure.ai.voicelive.models.MCPTool":"VoiceLive.MCPTool","com.azure.ai.voicelive.models.MessageContentPart":"VoiceLive.MessageContentPart","com.azure.ai.voicelive.models.MessageItem":"VoiceLive.MessageItem","com.azure.ai.voicelive.models.OpenAIVoice":"VoiceLive.OpenAIVoice","com.azure.ai.voicelive.models.OpenAIVoiceName":"VoiceLive.OAIVoice","com.azure.ai.voicelive.models.OutputAudioFormat":"VoiceLive.OutputAudioFormat","com.azure.ai.voicelive.models.OutputTextContentPart":"VoiceLive.OutputTextContentPart","com.azure.ai.voicelive.models.OutputTokenDetails":"VoiceLive.OutputTokenDetails","com.azure.ai.voicelive.models.PersonalVoiceModels":"VoiceLive.PersonalVoiceModels","com.azure.ai.voicelive.models.PhotoAvatarBaseModes":"VoiceLive.PhotoAvatarBaseModes","com.azure.ai.voicelive.models.ReasoningEffort":"VoiceLive.ReasoningEffort","com.azure.ai.voicelive.models.RequestAudioContentPart":"VoiceLive.RequestAudioContentPart","com.azure.ai.voicelive.models.RequestImageContentPart":"VoiceLive.RequestImageContentPart","com.azure.ai.voicelive.models.RequestImageContentPartDetail":"VoiceLive.RequestImageContentPartDetail","com.azure.ai.voicelive.models.RequestTextContentPart":"VoiceLive.RequestTextContentPart","com.azure.ai.voicelive.models.RespondingAgentOptions":"VoiceLive.AgentConfig","com.azure.ai.voicelive.models.ResponseAudioContentPart":"VoiceLive.ResponseAudioContentPart","com.azure.ai.voicelive.models.ResponseCancelledDetails":"VoiceLive.ResponseCancelledDetails","com.azure.ai.voicelive.models.ResponseCancelledDetailsReason":"VoiceLive.ResponseCancelledDetails.reason.anonymous","com.azure.ai.voicelive.models.ResponseCreateParams":"VoiceLive.ResponseCreateParams","com.azure.ai.voicelive.models.ResponseFailedDetails":"VoiceLive.ResponseFailedDetails","com.azure.ai.voicelive.models.ResponseFunctionCallItem":"VoiceLive.ResponseFunctionCallItem","com.azure.ai.voicelive.models.ResponseFunctionCallOutputItem":"VoiceLive.ResponseFunctionCallOutputItem","com.azure.ai.voicelive.models.ResponseIncompleteDetails":"VoiceLive.ResponseIncompleteDetails","com.azure.ai.voicelive.models.ResponseIncompleteDetailsReason":"VoiceLive.ResponseIncompleteDetails.reason.anonymous","com.azure.ai.voicelive.models.ResponseItemObject":null,"com.azure.ai.voicelive.models.ResponseMCPApprovalRequestItem":"VoiceLive.ResponseMCPApprovalRequestItem","com.azure.ai.voicelive.models.ResponseMCPApprovalResponseItem":"VoiceLive.ResponseMCPApprovalResponseItem","com.azure.ai.voicelive.models.ResponseMCPCallItem":"VoiceLive.ResponseMCPCallItem","com.azure.ai.voicelive.models.ResponseMCPListToolItem":"VoiceLive.ResponseMCPListToolItem","com.azure.ai.voicelive.models.ResponseMessageRole":"VoiceLive.MessageRole","com.azure.ai.voicelive.models.ResponseObject":null,"com.azure.ai.voicelive.models.ResponseStatusDetails":"VoiceLive.ResponseStatusDetails","com.azure.ai.voicelive.models.ResponseTextContentPart":"VoiceLive.ResponseTextContentPart","com.azure.ai.voicelive.models.ResponseTokenStatistics":"VoiceLive.TokenUsage","com.azure.ai.voicelive.models.Scene":"VoiceLive.Scene","com.azure.ai.voicelive.models.ServerEventMcpListToolsCompleted":"VoiceLive.ServerEventMcpListToolsCompleted","com.azure.ai.voicelive.models.ServerEventMcpListToolsFailed":"VoiceLive.ServerEventMcpListToolsFailed","com.azure.ai.voicelive.models.ServerEventMcpListToolsInProgress":"VoiceLive.ServerEventMcpListToolsInProgress","com.azure.ai.voicelive.models.ServerEventResponseMcpCallArgumentsDelta":"VoiceLive.ServerEventResponseMcpCallArgumentsDelta","com.azure.ai.voicelive.models.ServerEventResponseMcpCallArgumentsDone":"VoiceLive.ServerEventResponseMcpCallArgumentsDone","com.azure.ai.voicelive.models.ServerEventResponseMcpCallCompleted":"VoiceLive.ServerEventResponseMcpCallCompleted","com.azure.ai.voicelive.models.ServerEventResponseMcpCallFailed":"VoiceLive.ServerEventResponseMcpCallFailed","com.azure.ai.voicelive.models.ServerEventResponseMcpCallInProgress":"VoiceLive.ServerEventResponseMcpCallInProgress","com.azure.ai.voicelive.models.ServerEventType":"VoiceLive.ServerEventType","com.azure.ai.voicelive.models.ServerEventWarning":"VoiceLive.ServerEventWarning","com.azure.ai.voicelive.models.ServerEventWarningDetails":"VoiceLive.ServerEventWarningDetails","com.azure.ai.voicelive.models.ServerVadTurnDetection":"VoiceLive.ServerVad","com.azure.ai.voicelive.models.SessionResponse":"VoiceLive.Response","com.azure.ai.voicelive.models.SessionResponseItem":"VoiceLive.ResponseItem","com.azure.ai.voicelive.models.SessionResponseItemStatus":"VoiceLive.ResponseItemStatus","com.azure.ai.voicelive.models.SessionResponseMessageItem":"VoiceLive.ResponseMessageItem","com.azure.ai.voicelive.models.SessionResponseStatus":"VoiceLive.ResponseStatus","com.azure.ai.voicelive.models.SessionUpdate":"VoiceLive.ServerEvent","com.azure.ai.voicelive.models.SessionUpdateAvatarConnecting":"VoiceLive.ServerEventSessionAvatarConnecting","com.azure.ai.voicelive.models.SessionUpdateConversationItemCreated":"VoiceLive.ServerEventConversationItemCreated","com.azure.ai.voicelive.models.SessionUpdateConversationItemDeleted":"VoiceLive.ServerEventConversationItemDeleted","com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionCompleted":"VoiceLive.ServerEventConversationItemInputAudioTranscriptionCompleted","com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionDelta":"VoiceLive.ServerEventConversationItemInputAudioTranscriptionDelta","com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionFailed":"VoiceLive.ServerEventConversationItemInputAudioTranscriptionFailed","com.azure.ai.voicelive.models.SessionUpdateConversationItemRetrieved":"VoiceLive.ServerEventConversationItemRetrieved","com.azure.ai.voicelive.models.SessionUpdateConversationItemTruncated":"VoiceLive.ServerEventConversationItemTruncated","com.azure.ai.voicelive.models.SessionUpdateError":"VoiceLive.ServerEventError","com.azure.ai.voicelive.models.SessionUpdateErrorDetails":"VoiceLive.ServerEventErrorDetails","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferCleared":"VoiceLive.ServerEventInputAudioBufferCleared","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferCommitted":"VoiceLive.ServerEventInputAudioBufferCommitted","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferSpeechStarted":"VoiceLive.ServerEventInputAudioBufferSpeechStarted","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferSpeechStopped":"VoiceLive.ServerEventInputAudioBufferSpeechStopped","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationBlendshapeDelta":"VoiceLive.ServerEventResponseAnimationBlendshapeDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationBlendshapeDone":"VoiceLive.ServerEventResponseAnimationBlendshapeDone","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationVisemeDelta":"VoiceLive.ServerEventResponseAnimationVisemeDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationVisemeDone":"VoiceLive.ServerEventResponseAnimationVisemeDone","com.azure.ai.voicelive.models.SessionUpdateResponseAudioDelta":"VoiceLive.ServerEventResponseAudioDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAudioDone":"VoiceLive.ServerEventResponseAudioDone","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTimestampDelta":"VoiceLive.ServerEventResponseAudioTimestampDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTimestampDone":"VoiceLive.ServerEventResponseAudioTimestampDone","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTranscriptDelta":"VoiceLive.ServerEventResponseAudioTranscriptDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTranscriptDone":"VoiceLive.ServerEventResponseAudioTranscriptDone","com.azure.ai.voicelive.models.SessionUpdateResponseContentPartAdded":"VoiceLive.ServerEventResponseContentPartAdded","com.azure.ai.voicelive.models.SessionUpdateResponseContentPartDone":"VoiceLive.ServerEventResponseContentPartDone","com.azure.ai.voicelive.models.SessionUpdateResponseCreated":"VoiceLive.ServerEventResponseCreated","com.azure.ai.voicelive.models.SessionUpdateResponseDone":"VoiceLive.ServerEventResponseDone","com.azure.ai.voicelive.models.SessionUpdateResponseFunctionCallArgumentsDelta":"VoiceLive.ServerEventResponseFunctionCallArgumentsDelta","com.azure.ai.voicelive.models.SessionUpdateResponseFunctionCallArgumentsDone":"VoiceLive.ServerEventResponseFunctionCallArgumentsDone","com.azure.ai.voicelive.models.SessionUpdateResponseOutputItemAdded":"VoiceLive.ServerEventResponseOutputItemAdded","com.azure.ai.voicelive.models.SessionUpdateResponseOutputItemDone":"VoiceLive.ServerEventResponseOutputItemDone","com.azure.ai.voicelive.models.SessionUpdateResponseTextDelta":"VoiceLive.ServerEventResponseTextDelta","com.azure.ai.voicelive.models.SessionUpdateResponseTextDone":"VoiceLive.ServerEventResponseTextDone","com.azure.ai.voicelive.models.SessionUpdateSessionCreated":"VoiceLive.ServerEventSessionCreated","com.azure.ai.voicelive.models.SessionUpdateSessionUpdated":"VoiceLive.ServerEventSessionUpdated","com.azure.ai.voicelive.models.StaticInterimResponseConfig":"VoiceLive.StaticInterimResponseConfig","com.azure.ai.voicelive.models.SystemMessageItem":"VoiceLive.SystemMessageItem","com.azure.ai.voicelive.models.ToolChoiceFunctionSelection":"VoiceLive.ToolChoiceFunctionObject","com.azure.ai.voicelive.models.ToolChoiceLiteral":"VoiceLive.ToolChoiceLiteral","com.azure.ai.voicelive.models.ToolChoiceSelection":"VoiceLive.ToolChoiceObject","com.azure.ai.voicelive.models.ToolType":"VoiceLive.ToolType","com.azure.ai.voicelive.models.TurnDetection":"VoiceLive.TurnDetection","com.azure.ai.voicelive.models.TurnDetectionType":"VoiceLive.TurnDetectionType","com.azure.ai.voicelive.models.UserMessageItem":"VoiceLive.UserMessageItem","com.azure.ai.voicelive.models.VideoBackground":"VoiceLive.Background","com.azure.ai.voicelive.models.VideoCrop":"VoiceLive.VideoCrop","com.azure.ai.voicelive.models.VideoParams":"VoiceLive.VideoParams","com.azure.ai.voicelive.models.VideoParamsCodec":null,"com.azure.ai.voicelive.models.VideoResolution":"VoiceLive.VideoResolution","com.azure.ai.voicelive.models.VoiceLiveContentPart":"VoiceLive.ContentPart","com.azure.ai.voicelive.models.VoiceLiveErrorDetails":"VoiceLive.VoiceLiveErrorDetails","com.azure.ai.voicelive.models.VoiceLiveFunctionDefinition":"VoiceLive.FunctionTool","com.azure.ai.voicelive.models.VoiceLiveSessionOptions":"VoiceLive.RequestSession","com.azure.ai.voicelive.models.VoiceLiveSessionResponse":"VoiceLive.ResponseSession","com.azure.ai.voicelive.models.VoiceLiveToolDefinition":"VoiceLive.Tool"},"generatedFiles":["src/main/java/com/azure/ai/voicelive/implementation/package-info.java","src/main/java/com/azure/ai/voicelive/models/AnimationOptions.java","src/main/java/com/azure/ai/voicelive/models/AnimationOutputType.java","src/main/java/com/azure/ai/voicelive/models/AssistantMessageItem.java","src/main/java/com/azure/ai/voicelive/models/AudioEchoCancellation.java","src/main/java/com/azure/ai/voicelive/models/AudioInputTranscriptionOptions.java","src/main/java/com/azure/ai/voicelive/models/AudioInputTranscriptionOptionsModel.java","src/main/java/com/azure/ai/voicelive/models/AudioNoiseReduction.java","src/main/java/com/azure/ai/voicelive/models/AudioNoiseReductionType.java","src/main/java/com/azure/ai/voicelive/models/AudioTimestampType.java","src/main/java/com/azure/ai/voicelive/models/AvatarConfigTypes.java","src/main/java/com/azure/ai/voicelive/models/AvatarConfiguration.java","src/main/java/com/azure/ai/voicelive/models/AvatarOutputProtocol.java","src/main/java/com/azure/ai/voicelive/models/AzureCustomVoice.java","src/main/java/com/azure/ai/voicelive/models/AzurePersonalVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticEouDetection.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticEouDetectionEn.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticEouDetectionMultilingual.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetection.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionEn.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionMultilingual.java","src/main/java/com/azure/ai/voicelive/models/AzureStandardVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureVoiceType.java","src/main/java/com/azure/ai/voicelive/models/CachedTokenDetails.java","src/main/java/com/azure/ai/voicelive/models/ClientEvent.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemCreate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemDelete.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemRetrieve.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemTruncate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioBufferAppend.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioBufferClear.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioBufferCommit.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioClear.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnAppend.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnCancel.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnEnd.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnStart.java","src/main/java/com/azure/ai/voicelive/models/ClientEventResponseCancel.java","src/main/java/com/azure/ai/voicelive/models/ClientEventResponseCreate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventSessionAvatarConnect.java","src/main/java/com/azure/ai/voicelive/models/ClientEventSessionUpdate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventType.java","src/main/java/com/azure/ai/voicelive/models/ContentPartType.java","src/main/java/com/azure/ai/voicelive/models/ConversationRequestItem.java","src/main/java/com/azure/ai/voicelive/models/EouDetection.java","src/main/java/com/azure/ai/voicelive/models/EouDetectionModel.java","src/main/java/com/azure/ai/voicelive/models/EouThresholdLevel.java","src/main/java/com/azure/ai/voicelive/models/FunctionCallItem.java","src/main/java/com/azure/ai/voicelive/models/FunctionCallOutputItem.java","src/main/java/com/azure/ai/voicelive/models/IceServer.java","src/main/java/com/azure/ai/voicelive/models/InputAudioContentPart.java","src/main/java/com/azure/ai/voicelive/models/InputAudioFormat.java","src/main/java/com/azure/ai/voicelive/models/InputTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/InputTokenDetails.java","src/main/java/com/azure/ai/voicelive/models/InteractionModality.java","src/main/java/com/azure/ai/voicelive/models/InterimResponseConfigBase.java","src/main/java/com/azure/ai/voicelive/models/InterimResponseConfigType.java","src/main/java/com/azure/ai/voicelive/models/InterimResponseTrigger.java","src/main/java/com/azure/ai/voicelive/models/ItemParamStatus.java","src/main/java/com/azure/ai/voicelive/models/ItemType.java","src/main/java/com/azure/ai/voicelive/models/LlmInterimResponseConfig.java","src/main/java/com/azure/ai/voicelive/models/LogProbProperties.java","src/main/java/com/azure/ai/voicelive/models/MCPApprovalResponseRequestItem.java","src/main/java/com/azure/ai/voicelive/models/MCPApprovalType.java","src/main/java/com/azure/ai/voicelive/models/MCPServer.java","src/main/java/com/azure/ai/voicelive/models/MCPTool.java","src/main/java/com/azure/ai/voicelive/models/MessageContentPart.java","src/main/java/com/azure/ai/voicelive/models/MessageItem.java","src/main/java/com/azure/ai/voicelive/models/OpenAIVoice.java","src/main/java/com/azure/ai/voicelive/models/OpenAIVoiceName.java","src/main/java/com/azure/ai/voicelive/models/OutputAudioFormat.java","src/main/java/com/azure/ai/voicelive/models/OutputTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/OutputTokenDetails.java","src/main/java/com/azure/ai/voicelive/models/PersonalVoiceModels.java","src/main/java/com/azure/ai/voicelive/models/PhotoAvatarBaseModes.java","src/main/java/com/azure/ai/voicelive/models/ReasoningEffort.java","src/main/java/com/azure/ai/voicelive/models/RequestAudioContentPart.java","src/main/java/com/azure/ai/voicelive/models/RequestImageContentPart.java","src/main/java/com/azure/ai/voicelive/models/RequestImageContentPartDetail.java","src/main/java/com/azure/ai/voicelive/models/RequestTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/RespondingAgentOptions.java","src/main/java/com/azure/ai/voicelive/models/ResponseAudioContentPart.java","src/main/java/com/azure/ai/voicelive/models/ResponseCancelledDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseCancelledDetailsReason.java","src/main/java/com/azure/ai/voicelive/models/ResponseCreateParams.java","src/main/java/com/azure/ai/voicelive/models/ResponseFailedDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseFunctionCallItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseFunctionCallOutputItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseIncompleteDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseIncompleteDetailsReason.java","src/main/java/com/azure/ai/voicelive/models/ResponseItemObject.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPApprovalRequestItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPApprovalResponseItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPCallItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPListToolItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMessageRole.java","src/main/java/com/azure/ai/voicelive/models/ResponseObject.java","src/main/java/com/azure/ai/voicelive/models/ResponseStatusDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/ResponseTokenStatistics.java","src/main/java/com/azure/ai/voicelive/models/Scene.java","src/main/java/com/azure/ai/voicelive/models/ServerEventMcpListToolsCompleted.java","src/main/java/com/azure/ai/voicelive/models/ServerEventMcpListToolsFailed.java","src/main/java/com/azure/ai/voicelive/models/ServerEventMcpListToolsInProgress.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallArgumentsDelta.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallArgumentsDone.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallCompleted.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallFailed.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallInProgress.java","src/main/java/com/azure/ai/voicelive/models/ServerEventType.java","src/main/java/com/azure/ai/voicelive/models/ServerEventWarning.java","src/main/java/com/azure/ai/voicelive/models/ServerEventWarningDetails.java","src/main/java/com/azure/ai/voicelive/models/ServerVadTurnDetection.java","src/main/java/com/azure/ai/voicelive/models/SessionResponse.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseItem.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseItemStatus.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseMessageItem.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseStatus.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdate.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateAvatarConnecting.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemCreated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemDeleted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionCompleted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionFailed.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemRetrieved.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemTruncated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateError.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateErrorDetails.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferCleared.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferCommitted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferSpeechStarted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferSpeechStopped.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationBlendshapeDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationBlendshapeDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationVisemeDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationVisemeDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTimestampDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTimestampDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTranscriptDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTranscriptDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseContentPartAdded.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseContentPartDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseCreated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseFunctionCallArgumentsDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseFunctionCallArgumentsDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseOutputItemAdded.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseOutputItemDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseTextDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseTextDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateSessionCreated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateSessionUpdated.java","src/main/java/com/azure/ai/voicelive/models/StaticInterimResponseConfig.java","src/main/java/com/azure/ai/voicelive/models/SystemMessageItem.java","src/main/java/com/azure/ai/voicelive/models/ToolChoiceFunctionSelection.java","src/main/java/com/azure/ai/voicelive/models/ToolChoiceLiteral.java","src/main/java/com/azure/ai/voicelive/models/ToolChoiceSelection.java","src/main/java/com/azure/ai/voicelive/models/ToolType.java","src/main/java/com/azure/ai/voicelive/models/TurnDetection.java","src/main/java/com/azure/ai/voicelive/models/TurnDetectionType.java","src/main/java/com/azure/ai/voicelive/models/UserMessageItem.java","src/main/java/com/azure/ai/voicelive/models/VideoBackground.java","src/main/java/com/azure/ai/voicelive/models/VideoCrop.java","src/main/java/com/azure/ai/voicelive/models/VideoParams.java","src/main/java/com/azure/ai/voicelive/models/VideoParamsCodec.java","src/main/java/com/azure/ai/voicelive/models/VideoResolution.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveContentPart.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveErrorDetails.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveFunctionDefinition.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionOptions.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionResponse.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveToolDefinition.java","src/main/java/com/azure/ai/voicelive/models/package-info.java","src/main/java/com/azure/ai/voicelive/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"VoiceLive":"2026-04-10"},"crossLanguageDefinitions":{"com.azure.ai.voicelive.models.AnimationOptions":"VoiceLive.Animation","com.azure.ai.voicelive.models.AnimationOutputType":"VoiceLive.AnimationOutputType","com.azure.ai.voicelive.models.AssistantMessageItem":"VoiceLive.AssistantMessageItem","com.azure.ai.voicelive.models.AudioEchoCancellation":"VoiceLive.AudioEchoCancellation","com.azure.ai.voicelive.models.AudioInputTranscriptionOptions":"VoiceLive.AudioInputTranscriptionOptions","com.azure.ai.voicelive.models.AudioInputTranscriptionOptionsModel":"VoiceLive.AudioInputTranscriptionOptions.model.anonymous","com.azure.ai.voicelive.models.AudioNoiseReduction":"VoiceLive.AudioNoiseReduction","com.azure.ai.voicelive.models.AudioNoiseReductionType":"VoiceLive.AudioNoiseReduction.type.anonymous","com.azure.ai.voicelive.models.AudioTimestampType":"VoiceLive.AudioTimestampType","com.azure.ai.voicelive.models.AvatarConfigTypes":"VoiceLive.AvatarConfigTypes","com.azure.ai.voicelive.models.AvatarConfiguration":"VoiceLive.AvatarConfig","com.azure.ai.voicelive.models.AvatarOutputProtocol":"VoiceLive.AvatarOutputProtocol","com.azure.ai.voicelive.models.AzureAvatarVoiceSyncVoice":"VoiceLive.AzureAvatarVoiceSyncVoice","com.azure.ai.voicelive.models.AzureCustomVoice":"VoiceLive.AzureCustomVoice","com.azure.ai.voicelive.models.AzurePersonalVoice":"VoiceLive.AzurePersonalVoice","com.azure.ai.voicelive.models.AzureSemanticEouDetection":"VoiceLive.AzureSemanticDetection","com.azure.ai.voicelive.models.AzureSemanticEouDetectionEn":"VoiceLive.AzureSemanticDetectionEn","com.azure.ai.voicelive.models.AzureSemanticEouDetectionMultilingual":"VoiceLive.AzureSemanticDetectionMultilingual","com.azure.ai.voicelive.models.AzureSemanticVadTurnDetection":"VoiceLive.AzureSemanticVad","com.azure.ai.voicelive.models.AzureSemanticVadTurnDetectionEn":"VoiceLive.AzureSemanticVadEn","com.azure.ai.voicelive.models.AzureSemanticVadTurnDetectionMultilingual":"VoiceLive.AzureSemanticVadMultilingual","com.azure.ai.voicelive.models.AzureStandardVoice":"VoiceLive.AzureStandardVoice","com.azure.ai.voicelive.models.AzureVoice":"VoiceLive.AzureVoice","com.azure.ai.voicelive.models.AzureVoiceType":"VoiceLive.AzureVoiceType","com.azure.ai.voicelive.models.CachedTokenDetails":"VoiceLive.CachedTokenDetails","com.azure.ai.voicelive.models.ClientEvent":"VoiceLive.ClientEvent","com.azure.ai.voicelive.models.ClientEventConversationItemCreate":"VoiceLive.ClientEventConversationItemCreate","com.azure.ai.voicelive.models.ClientEventConversationItemDelete":"VoiceLive.ClientEventConversationItemDelete","com.azure.ai.voicelive.models.ClientEventConversationItemRetrieve":"VoiceLive.ClientEventConversationItemRetrieve","com.azure.ai.voicelive.models.ClientEventConversationItemTruncate":"VoiceLive.ClientEventConversationItemTruncate","com.azure.ai.voicelive.models.ClientEventInputAudioBufferAppend":"VoiceLive.ClientEventInputAudioBufferAppend","com.azure.ai.voicelive.models.ClientEventInputAudioBufferClear":"VoiceLive.ClientEventInputAudioBufferClear","com.azure.ai.voicelive.models.ClientEventInputAudioBufferCommit":"VoiceLive.ClientEventInputAudioBufferCommit","com.azure.ai.voicelive.models.ClientEventInputAudioClear":"VoiceLive.ClientEventInputAudioClear","com.azure.ai.voicelive.models.ClientEventInputAudioTurnAppend":"VoiceLive.ClientEventInputAudioTurnAppend","com.azure.ai.voicelive.models.ClientEventInputAudioTurnCancel":"VoiceLive.ClientEventInputAudioTurnCancel","com.azure.ai.voicelive.models.ClientEventInputAudioTurnEnd":"VoiceLive.ClientEventInputAudioTurnEnd","com.azure.ai.voicelive.models.ClientEventInputAudioTurnStart":"VoiceLive.ClientEventInputAudioTurnStart","com.azure.ai.voicelive.models.ClientEventOutputAudioBufferClear":"VoiceLive.ClientEventOutputAudioBufferClear","com.azure.ai.voicelive.models.ClientEventResponseCancel":"VoiceLive.ClientEventResponseCancel","com.azure.ai.voicelive.models.ClientEventResponseCreate":"VoiceLive.ClientEventResponseCreate","com.azure.ai.voicelive.models.ClientEventSessionAvatarConnect":"VoiceLive.ClientEventSessionAvatarConnect","com.azure.ai.voicelive.models.ClientEventSessionUpdate":"VoiceLive.ClientEventSessionUpdate","com.azure.ai.voicelive.models.ClientEventType":"VoiceLive.ClientEventType","com.azure.ai.voicelive.models.ContentPartType":"VoiceLive.ContentPartType","com.azure.ai.voicelive.models.ConversationRequestItem":"VoiceLive.ConversationRequestItem","com.azure.ai.voicelive.models.EouDetection":"VoiceLive.EouDetection","com.azure.ai.voicelive.models.EouDetectionModel":"VoiceLive.EouDetection.model.anonymous","com.azure.ai.voicelive.models.EouThresholdLevel":"VoiceLive.EouThresholdLevel","com.azure.ai.voicelive.models.FileSearchResult":"VoiceLive.FileSearchResult","com.azure.ai.voicelive.models.FunctionCallItem":"VoiceLive.FunctionCallItem","com.azure.ai.voicelive.models.FunctionCallOutputItem":"VoiceLive.FunctionCallOutputItem","com.azure.ai.voicelive.models.IceServer":"VoiceLive.IceServer","com.azure.ai.voicelive.models.InputAudioContentPart":"VoiceLive.InputAudioContentPart","com.azure.ai.voicelive.models.InputAudioFormat":"VoiceLive.InputAudioFormat","com.azure.ai.voicelive.models.InputTextContentPart":"VoiceLive.InputTextContentPart","com.azure.ai.voicelive.models.InputTokenDetails":"VoiceLive.InputTokenDetails","com.azure.ai.voicelive.models.InteractionModality":"VoiceLive.Modality","com.azure.ai.voicelive.models.InterimResponseConfigBase":"VoiceLive.InterimResponseConfigBase","com.azure.ai.voicelive.models.InterimResponseConfigType":"VoiceLive.InterimResponseConfigType","com.azure.ai.voicelive.models.InterimResponseTrigger":"VoiceLive.InterimResponseTrigger","com.azure.ai.voicelive.models.ItemParamStatus":"VoiceLive.ItemParamStatus","com.azure.ai.voicelive.models.ItemType":"VoiceLive.ItemType","com.azure.ai.voicelive.models.LlmInterimResponseConfig":"VoiceLive.LlmInterimResponseConfig","com.azure.ai.voicelive.models.LogProbProperties":"VoiceLive.LogProbProperties","com.azure.ai.voicelive.models.MCPApprovalResponseRequestItem":"VoiceLive.MCPApprovalResponseRequestItem","com.azure.ai.voicelive.models.MCPApprovalType":"VoiceLive.MCPApprovalType","com.azure.ai.voicelive.models.MCPServer":"VoiceLive.MCPServer","com.azure.ai.voicelive.models.MCPTool":"VoiceLive.MCPTool","com.azure.ai.voicelive.models.MessageContentPart":"VoiceLive.MessageContentPart","com.azure.ai.voicelive.models.MessageItem":"VoiceLive.MessageItem","com.azure.ai.voicelive.models.OpenAIVoice":"VoiceLive.OpenAIVoice","com.azure.ai.voicelive.models.OpenAIVoiceName":"VoiceLive.OAIVoice","com.azure.ai.voicelive.models.OutputAudioFormat":"VoiceLive.OutputAudioFormat","com.azure.ai.voicelive.models.OutputTextContentPart":"VoiceLive.OutputTextContentPart","com.azure.ai.voicelive.models.OutputTokenDetails":"VoiceLive.OutputTokenDetails","com.azure.ai.voicelive.models.PersonalVoiceModels":"VoiceLive.PersonalVoiceModels","com.azure.ai.voicelive.models.PhotoAvatarBaseModes":"VoiceLive.PhotoAvatarBaseModes","com.azure.ai.voicelive.models.ReasoningEffort":"VoiceLive.ReasoningEffort","com.azure.ai.voicelive.models.RequestAudioContentPart":"VoiceLive.RequestAudioContentPart","com.azure.ai.voicelive.models.RequestImageContentPart":"VoiceLive.RequestImageContentPart","com.azure.ai.voicelive.models.RequestImageContentPartDetail":"VoiceLive.RequestImageContentPartDetail","com.azure.ai.voicelive.models.RequestTextContentPart":"VoiceLive.RequestTextContentPart","com.azure.ai.voicelive.models.RespondingAgentOptions":"VoiceLive.AgentConfig","com.azure.ai.voicelive.models.ResponseAudioContentPart":"VoiceLive.ResponseAudioContentPart","com.azure.ai.voicelive.models.ResponseCancelledDetails":"VoiceLive.ResponseCancelledDetails","com.azure.ai.voicelive.models.ResponseCancelledDetailsReason":"VoiceLive.ResponseCancelledDetails.reason.anonymous","com.azure.ai.voicelive.models.ResponseCreateParams":"VoiceLive.ResponseCreateParams","com.azure.ai.voicelive.models.ResponseFailedDetails":"VoiceLive.ResponseFailedDetails","com.azure.ai.voicelive.models.ResponseFileSearchCallItem":"VoiceLive.ResponseFileSearchCallItem","com.azure.ai.voicelive.models.ResponseFileSearchCallItemStatus":"VoiceLive.ResponseFileSearchCallItem.status.anonymous","com.azure.ai.voicelive.models.ResponseFunctionCallItem":"VoiceLive.ResponseFunctionCallItem","com.azure.ai.voicelive.models.ResponseFunctionCallOutputItem":"VoiceLive.ResponseFunctionCallOutputItem","com.azure.ai.voicelive.models.ResponseIncompleteDetails":"VoiceLive.ResponseIncompleteDetails","com.azure.ai.voicelive.models.ResponseIncompleteDetailsReason":"VoiceLive.ResponseIncompleteDetails.reason.anonymous","com.azure.ai.voicelive.models.ResponseItemObject":null,"com.azure.ai.voicelive.models.ResponseMCPApprovalRequestItem":"VoiceLive.ResponseMCPApprovalRequestItem","com.azure.ai.voicelive.models.ResponseMCPApprovalResponseItem":"VoiceLive.ResponseMCPApprovalResponseItem","com.azure.ai.voicelive.models.ResponseMCPCallItem":"VoiceLive.ResponseMCPCallItem","com.azure.ai.voicelive.models.ResponseMCPListToolItem":"VoiceLive.ResponseMCPListToolItem","com.azure.ai.voicelive.models.ResponseMessageRole":"VoiceLive.MessageRole","com.azure.ai.voicelive.models.ResponseObject":null,"com.azure.ai.voicelive.models.ResponseStatusDetails":"VoiceLive.ResponseStatusDetails","com.azure.ai.voicelive.models.ResponseTextContentPart":"VoiceLive.ResponseTextContentPart","com.azure.ai.voicelive.models.ResponseTokenStatistics":"VoiceLive.TokenUsage","com.azure.ai.voicelive.models.ResponseWebSearchCallItem":"VoiceLive.ResponseWebSearchCallItem","com.azure.ai.voicelive.models.ResponseWebSearchCallItemStatus":"VoiceLive.ResponseWebSearchCallItem.status.anonymous","com.azure.ai.voicelive.models.Scene":"VoiceLive.Scene","com.azure.ai.voicelive.models.ServerEventMcpListToolsCompleted":"VoiceLive.ServerEventMcpListToolsCompleted","com.azure.ai.voicelive.models.ServerEventMcpListToolsFailed":"VoiceLive.ServerEventMcpListToolsFailed","com.azure.ai.voicelive.models.ServerEventMcpListToolsInProgress":"VoiceLive.ServerEventMcpListToolsInProgress","com.azure.ai.voicelive.models.ServerEventOutputAudioBufferCleared":"VoiceLive.ServerEventOutputAudioBufferCleared","com.azure.ai.voicelive.models.ServerEventResponseAudioTranscriptAnnotationAdded":"VoiceLive.ServerEventResponseAudioTranscriptAnnotationAdded","com.azure.ai.voicelive.models.ServerEventResponseFileSearchCallCompleted":"VoiceLive.ServerEventResponseFileSearchCallCompleted","com.azure.ai.voicelive.models.ServerEventResponseFileSearchCallInProgress":"VoiceLive.ServerEventResponseFileSearchCallInProgress","com.azure.ai.voicelive.models.ServerEventResponseFileSearchCallSearching":"VoiceLive.ServerEventResponseFileSearchCallSearching","com.azure.ai.voicelive.models.ServerEventResponseMcpCallArgumentsDelta":"VoiceLive.ServerEventResponseMcpCallArgumentsDelta","com.azure.ai.voicelive.models.ServerEventResponseMcpCallArgumentsDone":"VoiceLive.ServerEventResponseMcpCallArgumentsDone","com.azure.ai.voicelive.models.ServerEventResponseMcpCallCompleted":"VoiceLive.ServerEventResponseMcpCallCompleted","com.azure.ai.voicelive.models.ServerEventResponseMcpCallFailed":"VoiceLive.ServerEventResponseMcpCallFailed","com.azure.ai.voicelive.models.ServerEventResponseMcpCallInProgress":"VoiceLive.ServerEventResponseMcpCallInProgress","com.azure.ai.voicelive.models.ServerEventResponseVideoDelta":"VoiceLive.ServerEventResponseVideoDelta","com.azure.ai.voicelive.models.ServerEventResponseWebSearchCallCompleted":"VoiceLive.ServerEventResponseWebSearchCallCompleted","com.azure.ai.voicelive.models.ServerEventResponseWebSearchCallInProgress":"VoiceLive.ServerEventResponseWebSearchCallInProgress","com.azure.ai.voicelive.models.ServerEventResponseWebSearchCallSearching":"VoiceLive.ServerEventResponseWebSearchCallSearching","com.azure.ai.voicelive.models.ServerEventSessionAvatarSwitchToIdle":"VoiceLive.ServerEventSessionAvatarSwitchToIdle","com.azure.ai.voicelive.models.ServerEventSessionAvatarSwitchToSpeaking":"VoiceLive.ServerEventSessionAvatarSwitchToSpeaking","com.azure.ai.voicelive.models.ServerEventType":"VoiceLive.ServerEventType","com.azure.ai.voicelive.models.ServerEventWarning":"VoiceLive.ServerEventWarning","com.azure.ai.voicelive.models.ServerEventWarningDetails":"VoiceLive.ServerEventWarningDetails","com.azure.ai.voicelive.models.ServerVadTurnDetection":"VoiceLive.ServerVad","com.azure.ai.voicelive.models.SessionIncludeOption":"VoiceLive.SessionIncludeOption","com.azure.ai.voicelive.models.SessionResponse":"VoiceLive.Response","com.azure.ai.voicelive.models.SessionResponseItem":"VoiceLive.ResponseItem","com.azure.ai.voicelive.models.SessionResponseItemStatus":"VoiceLive.ResponseItemStatus","com.azure.ai.voicelive.models.SessionResponseMessageItem":"VoiceLive.ResponseMessageItem","com.azure.ai.voicelive.models.SessionResponseStatus":"VoiceLive.ResponseStatus","com.azure.ai.voicelive.models.SessionUpdate":"VoiceLive.ServerEvent","com.azure.ai.voicelive.models.SessionUpdateAvatarConnecting":"VoiceLive.ServerEventSessionAvatarConnecting","com.azure.ai.voicelive.models.SessionUpdateConversationItemCreated":"VoiceLive.ServerEventConversationItemCreated","com.azure.ai.voicelive.models.SessionUpdateConversationItemDeleted":"VoiceLive.ServerEventConversationItemDeleted","com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionCompleted":"VoiceLive.ServerEventConversationItemInputAudioTranscriptionCompleted","com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionDelta":"VoiceLive.ServerEventConversationItemInputAudioTranscriptionDelta","com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionFailed":"VoiceLive.ServerEventConversationItemInputAudioTranscriptionFailed","com.azure.ai.voicelive.models.SessionUpdateConversationItemRetrieved":"VoiceLive.ServerEventConversationItemRetrieved","com.azure.ai.voicelive.models.SessionUpdateConversationItemTruncated":"VoiceLive.ServerEventConversationItemTruncated","com.azure.ai.voicelive.models.SessionUpdateError":"VoiceLive.ServerEventError","com.azure.ai.voicelive.models.SessionUpdateErrorDetails":"VoiceLive.ServerEventErrorDetails","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferCleared":"VoiceLive.ServerEventInputAudioBufferCleared","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferCommitted":"VoiceLive.ServerEventInputAudioBufferCommitted","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferSpeechStarted":"VoiceLive.ServerEventInputAudioBufferSpeechStarted","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferSpeechStopped":"VoiceLive.ServerEventInputAudioBufferSpeechStopped","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationBlendshapeDelta":"VoiceLive.ServerEventResponseAnimationBlendshapeDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationBlendshapeDone":"VoiceLive.ServerEventResponseAnimationBlendshapeDone","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationVisemeDelta":"VoiceLive.ServerEventResponseAnimationVisemeDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationVisemeDone":"VoiceLive.ServerEventResponseAnimationVisemeDone","com.azure.ai.voicelive.models.SessionUpdateResponseAudioDelta":"VoiceLive.ServerEventResponseAudioDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAudioDone":"VoiceLive.ServerEventResponseAudioDone","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTimestampDelta":"VoiceLive.ServerEventResponseAudioTimestampDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTimestampDone":"VoiceLive.ServerEventResponseAudioTimestampDone","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTranscriptDelta":"VoiceLive.ServerEventResponseAudioTranscriptDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTranscriptDone":"VoiceLive.ServerEventResponseAudioTranscriptDone","com.azure.ai.voicelive.models.SessionUpdateResponseContentPartAdded":"VoiceLive.ServerEventResponseContentPartAdded","com.azure.ai.voicelive.models.SessionUpdateResponseContentPartDone":"VoiceLive.ServerEventResponseContentPartDone","com.azure.ai.voicelive.models.SessionUpdateResponseCreated":"VoiceLive.ServerEventResponseCreated","com.azure.ai.voicelive.models.SessionUpdateResponseDone":"VoiceLive.ServerEventResponseDone","com.azure.ai.voicelive.models.SessionUpdateResponseFunctionCallArgumentsDelta":"VoiceLive.ServerEventResponseFunctionCallArgumentsDelta","com.azure.ai.voicelive.models.SessionUpdateResponseFunctionCallArgumentsDone":"VoiceLive.ServerEventResponseFunctionCallArgumentsDone","com.azure.ai.voicelive.models.SessionUpdateResponseOutputItemAdded":"VoiceLive.ServerEventResponseOutputItemAdded","com.azure.ai.voicelive.models.SessionUpdateResponseOutputItemDone":"VoiceLive.ServerEventResponseOutputItemDone","com.azure.ai.voicelive.models.SessionUpdateResponseTextDelta":"VoiceLive.ServerEventResponseTextDelta","com.azure.ai.voicelive.models.SessionUpdateResponseTextDone":"VoiceLive.ServerEventResponseTextDone","com.azure.ai.voicelive.models.SessionUpdateSessionCreated":"VoiceLive.ServerEventSessionCreated","com.azure.ai.voicelive.models.SessionUpdateSessionUpdated":"VoiceLive.ServerEventSessionUpdated","com.azure.ai.voicelive.models.StaticInterimResponseConfig":"VoiceLive.StaticInterimResponseConfig","com.azure.ai.voicelive.models.SystemMessageItem":"VoiceLive.SystemMessageItem","com.azure.ai.voicelive.models.ToolChoiceFunctionSelection":"VoiceLive.ToolChoiceFunctionObject","com.azure.ai.voicelive.models.ToolChoiceLiteral":"VoiceLive.ToolChoiceLiteral","com.azure.ai.voicelive.models.ToolChoiceSelection":"VoiceLive.ToolChoiceObject","com.azure.ai.voicelive.models.ToolType":"VoiceLive.ToolType","com.azure.ai.voicelive.models.TranscriptionPhrase":"VoiceLive.TranscriptionPhrase","com.azure.ai.voicelive.models.TranscriptionWord":"VoiceLive.TranscriptionWord","com.azure.ai.voicelive.models.TurnDetection":"VoiceLive.TurnDetection","com.azure.ai.voicelive.models.TurnDetectionType":"VoiceLive.TurnDetectionType","com.azure.ai.voicelive.models.UserMessageItem":"VoiceLive.UserMessageItem","com.azure.ai.voicelive.models.VideoBackground":"VoiceLive.Background","com.azure.ai.voicelive.models.VideoCrop":"VoiceLive.VideoCrop","com.azure.ai.voicelive.models.VideoParams":"VoiceLive.VideoParams","com.azure.ai.voicelive.models.VideoParamsCodec":null,"com.azure.ai.voicelive.models.VideoResolution":"VoiceLive.VideoResolution","com.azure.ai.voicelive.models.VoiceLiveContentPart":"VoiceLive.ContentPart","com.azure.ai.voicelive.models.VoiceLiveErrorDetails":"VoiceLive.VoiceLiveErrorDetails","com.azure.ai.voicelive.models.VoiceLiveFunctionDefinition":"VoiceLive.FunctionTool","com.azure.ai.voicelive.models.VoiceLiveSessionOptions":"VoiceLive.RequestSession","com.azure.ai.voicelive.models.VoiceLiveSessionResponse":"VoiceLive.ResponseSession","com.azure.ai.voicelive.models.VoiceLiveToolDefinition":"VoiceLive.Tool"},"generatedFiles":["src/main/java/com/azure/ai/voicelive/implementation/package-info.java","src/main/java/com/azure/ai/voicelive/models/AnimationOptions.java","src/main/java/com/azure/ai/voicelive/models/AnimationOutputType.java","src/main/java/com/azure/ai/voicelive/models/AssistantMessageItem.java","src/main/java/com/azure/ai/voicelive/models/AudioEchoCancellation.java","src/main/java/com/azure/ai/voicelive/models/AudioInputTranscriptionOptions.java","src/main/java/com/azure/ai/voicelive/models/AudioInputTranscriptionOptionsModel.java","src/main/java/com/azure/ai/voicelive/models/AudioNoiseReduction.java","src/main/java/com/azure/ai/voicelive/models/AudioNoiseReductionType.java","src/main/java/com/azure/ai/voicelive/models/AudioTimestampType.java","src/main/java/com/azure/ai/voicelive/models/AvatarConfigTypes.java","src/main/java/com/azure/ai/voicelive/models/AvatarConfiguration.java","src/main/java/com/azure/ai/voicelive/models/AvatarOutputProtocol.java","src/main/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureCustomVoice.java","src/main/java/com/azure/ai/voicelive/models/AzurePersonalVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticEouDetection.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticEouDetectionEn.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticEouDetectionMultilingual.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetection.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionEn.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionMultilingual.java","src/main/java/com/azure/ai/voicelive/models/AzureStandardVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureVoiceType.java","src/main/java/com/azure/ai/voicelive/models/CachedTokenDetails.java","src/main/java/com/azure/ai/voicelive/models/ClientEvent.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemCreate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemDelete.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemRetrieve.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemTruncate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioBufferAppend.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioBufferClear.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioBufferCommit.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioClear.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnAppend.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnCancel.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnEnd.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnStart.java","src/main/java/com/azure/ai/voicelive/models/ClientEventOutputAudioBufferClear.java","src/main/java/com/azure/ai/voicelive/models/ClientEventResponseCancel.java","src/main/java/com/azure/ai/voicelive/models/ClientEventResponseCreate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventSessionAvatarConnect.java","src/main/java/com/azure/ai/voicelive/models/ClientEventSessionUpdate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventType.java","src/main/java/com/azure/ai/voicelive/models/ContentPartType.java","src/main/java/com/azure/ai/voicelive/models/ConversationRequestItem.java","src/main/java/com/azure/ai/voicelive/models/EouDetection.java","src/main/java/com/azure/ai/voicelive/models/EouDetectionModel.java","src/main/java/com/azure/ai/voicelive/models/EouThresholdLevel.java","src/main/java/com/azure/ai/voicelive/models/FileSearchResult.java","src/main/java/com/azure/ai/voicelive/models/FunctionCallItem.java","src/main/java/com/azure/ai/voicelive/models/FunctionCallOutputItem.java","src/main/java/com/azure/ai/voicelive/models/IceServer.java","src/main/java/com/azure/ai/voicelive/models/InputAudioContentPart.java","src/main/java/com/azure/ai/voicelive/models/InputAudioFormat.java","src/main/java/com/azure/ai/voicelive/models/InputTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/InputTokenDetails.java","src/main/java/com/azure/ai/voicelive/models/InteractionModality.java","src/main/java/com/azure/ai/voicelive/models/InterimResponseConfigBase.java","src/main/java/com/azure/ai/voicelive/models/InterimResponseConfigType.java","src/main/java/com/azure/ai/voicelive/models/InterimResponseTrigger.java","src/main/java/com/azure/ai/voicelive/models/ItemParamStatus.java","src/main/java/com/azure/ai/voicelive/models/ItemType.java","src/main/java/com/azure/ai/voicelive/models/LlmInterimResponseConfig.java","src/main/java/com/azure/ai/voicelive/models/LogProbProperties.java","src/main/java/com/azure/ai/voicelive/models/MCPApprovalResponseRequestItem.java","src/main/java/com/azure/ai/voicelive/models/MCPApprovalType.java","src/main/java/com/azure/ai/voicelive/models/MCPServer.java","src/main/java/com/azure/ai/voicelive/models/MCPTool.java","src/main/java/com/azure/ai/voicelive/models/MessageContentPart.java","src/main/java/com/azure/ai/voicelive/models/MessageItem.java","src/main/java/com/azure/ai/voicelive/models/OpenAIVoice.java","src/main/java/com/azure/ai/voicelive/models/OpenAIVoiceName.java","src/main/java/com/azure/ai/voicelive/models/OutputAudioFormat.java","src/main/java/com/azure/ai/voicelive/models/OutputTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/OutputTokenDetails.java","src/main/java/com/azure/ai/voicelive/models/PersonalVoiceModels.java","src/main/java/com/azure/ai/voicelive/models/PhotoAvatarBaseModes.java","src/main/java/com/azure/ai/voicelive/models/ReasoningEffort.java","src/main/java/com/azure/ai/voicelive/models/RequestAudioContentPart.java","src/main/java/com/azure/ai/voicelive/models/RequestImageContentPart.java","src/main/java/com/azure/ai/voicelive/models/RequestImageContentPartDetail.java","src/main/java/com/azure/ai/voicelive/models/RequestTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/RespondingAgentOptions.java","src/main/java/com/azure/ai/voicelive/models/ResponseAudioContentPart.java","src/main/java/com/azure/ai/voicelive/models/ResponseCancelledDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseCancelledDetailsReason.java","src/main/java/com/azure/ai/voicelive/models/ResponseCreateParams.java","src/main/java/com/azure/ai/voicelive/models/ResponseFailedDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItemStatus.java","src/main/java/com/azure/ai/voicelive/models/ResponseFunctionCallItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseFunctionCallOutputItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseIncompleteDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseIncompleteDetailsReason.java","src/main/java/com/azure/ai/voicelive/models/ResponseItemObject.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPApprovalRequestItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPApprovalResponseItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPCallItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPListToolItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMessageRole.java","src/main/java/com/azure/ai/voicelive/models/ResponseObject.java","src/main/java/com/azure/ai/voicelive/models/ResponseStatusDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/ResponseTokenStatistics.java","src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItemStatus.java","src/main/java/com/azure/ai/voicelive/models/Scene.java","src/main/java/com/azure/ai/voicelive/models/ServerEventMcpListToolsCompleted.java","src/main/java/com/azure/ai/voicelive/models/ServerEventMcpListToolsFailed.java","src/main/java/com/azure/ai/voicelive/models/ServerEventMcpListToolsInProgress.java","src/main/java/com/azure/ai/voicelive/models/ServerEventOutputAudioBufferCleared.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseAudioTranscriptAnnotationAdded.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallCompleted.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallInProgress.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallSearching.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallArgumentsDelta.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallArgumentsDone.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallCompleted.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallFailed.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallInProgress.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseVideoDelta.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallCompleted.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallInProgress.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallSearching.java","src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToIdle.java","src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToSpeaking.java","src/main/java/com/azure/ai/voicelive/models/ServerEventType.java","src/main/java/com/azure/ai/voicelive/models/ServerEventWarning.java","src/main/java/com/azure/ai/voicelive/models/ServerEventWarningDetails.java","src/main/java/com/azure/ai/voicelive/models/ServerVadTurnDetection.java","src/main/java/com/azure/ai/voicelive/models/SessionIncludeOption.java","src/main/java/com/azure/ai/voicelive/models/SessionResponse.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseItem.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseItemStatus.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseMessageItem.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseStatus.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdate.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateAvatarConnecting.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemCreated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemDeleted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionCompleted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionFailed.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemRetrieved.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemTruncated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateError.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateErrorDetails.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferCleared.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferCommitted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferSpeechStarted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferSpeechStopped.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationBlendshapeDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationBlendshapeDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationVisemeDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationVisemeDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTimestampDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTimestampDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTranscriptDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTranscriptDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseContentPartAdded.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseContentPartDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseCreated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseFunctionCallArgumentsDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseFunctionCallArgumentsDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseOutputItemAdded.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseOutputItemDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseTextDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseTextDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateSessionCreated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateSessionUpdated.java","src/main/java/com/azure/ai/voicelive/models/StaticInterimResponseConfig.java","src/main/java/com/azure/ai/voicelive/models/SystemMessageItem.java","src/main/java/com/azure/ai/voicelive/models/ToolChoiceFunctionSelection.java","src/main/java/com/azure/ai/voicelive/models/ToolChoiceLiteral.java","src/main/java/com/azure/ai/voicelive/models/ToolChoiceSelection.java","src/main/java/com/azure/ai/voicelive/models/ToolType.java","src/main/java/com/azure/ai/voicelive/models/TranscriptionPhrase.java","src/main/java/com/azure/ai/voicelive/models/TranscriptionWord.java","src/main/java/com/azure/ai/voicelive/models/TurnDetection.java","src/main/java/com/azure/ai/voicelive/models/TurnDetectionType.java","src/main/java/com/azure/ai/voicelive/models/UserMessageItem.java","src/main/java/com/azure/ai/voicelive/models/VideoBackground.java","src/main/java/com/azure/ai/voicelive/models/VideoCrop.java","src/main/java/com/azure/ai/voicelive/models/VideoParams.java","src/main/java/com/azure/ai/voicelive/models/VideoParamsCodec.java","src/main/java/com/azure/ai/voicelive/models/VideoResolution.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveContentPart.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveErrorDetails.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveFunctionDefinition.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionOptions.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionResponse.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveToolDefinition.java","src/main/java/com/azure/ai/voicelive/models/package-info.java","src/main/java/com/azure/ai/voicelive/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/voicelive/azure-ai-voicelive/src/samples/java/com/azure/ai/voicelive/ReadmeSamples.java b/sdk/voicelive/azure-ai-voicelive/src/samples/java/com/azure/ai/voicelive/ReadmeSamples.java index 24dd5e6fb5dd..8ae874d527d2 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/samples/java/com/azure/ai/voicelive/ReadmeSamples.java +++ b/sdk/voicelive/azure-ai-voicelive/src/samples/java/com/azure/ai/voicelive/ReadmeSamples.java @@ -336,7 +336,7 @@ public void voiceConfigurationAzure() { .setVoice(BinaryData.fromObject(new AzureCustomVoice("myCustomVoice", "myEndpointId"))); // Azure Personal Voice - requires speaker profile ID and model - // Models: DRAGON_LATEST_NEURAL, PHOENIX_LATEST_NEURAL, PHOENIX_V2NEURAL + // Models: DRAGON_LATEST_NEURAL, DRAGON_HDOMNI_LATEST_NEURAL, PHOENIX_LATEST_NEURAL, MAI_VOICE_1 VoiceLiveSessionOptions options3 = new VoiceLiveSessionOptions() .setVoice(BinaryData.fromObject( new AzurePersonalVoice("speakerProfileId", PersonalVoiceModels.PHOENIX_LATEST_NEURAL))); diff --git a/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AvatarAndAudioBufferEventsTest.java b/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AvatarAndAudioBufferEventsTest.java new file mode 100644 index 000000000000..dc0a1c127a64 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AvatarAndAudioBufferEventsTest.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.voicelive.models; + +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit tests for the new avatar lifecycle events and the output-audio-buffer clear/cleared events + * introduced for video avatar support. + */ +class AvatarAndAudioBufferEventsTest { + + @Test + void testAvatarSwitchEventTypesRegistered() { + assertEquals("session.avatar.switch_to_speaking", ServerEventType.SESSION_AVATAR_SWITCH_TO_SPEAKING.toString()); + assertEquals("session.avatar.switch_to_idle", ServerEventType.SESSION_AVATAR_SWITCH_TO_IDLE.toString()); + assertEquals("response.video.delta", ServerEventType.RESPONSE_VIDEO_DELTA.toString()); + assertEquals("output_audio_buffer.cleared", ServerEventType.OUTPUT_AUDIO_BUFFER_CLEARED.toString()); + } + + @Test + void testClientEventOutputAudioBufferClearTypeRegistered() { + assertEquals("output_audio_buffer.clear", ClientEventType.OUTPUT_AUDIO_BUFFER_CLEAR.toString()); + } + + @Test + void testAvatarSwitchToSpeakingDeserialization() { + String json = "{\"type\":\"session.avatar.switch_to_speaking\",\"event_id\":\"e1\",\"turn_id\":\"t1\"}"; + + ServerEventSessionAvatarSwitchToSpeaking event + = BinaryData.fromString(json).toObject(ServerEventSessionAvatarSwitchToSpeaking.class); + + assertNotNull(event); + assertEquals(ServerEventType.SESSION_AVATAR_SWITCH_TO_SPEAKING, event.getType()); + assertEquals("e1", event.getEventId()); + assertEquals("t1", event.getTurnId()); + } + + @Test + void testAvatarSwitchToIdleDeserialization() { + String json = "{\"type\":\"session.avatar.switch_to_idle\",\"event_id\":\"e2\",\"turn_id\":\"t2\"}"; + + ServerEventSessionAvatarSwitchToIdle event + = BinaryData.fromString(json).toObject(ServerEventSessionAvatarSwitchToIdle.class); + + assertNotNull(event); + assertEquals(ServerEventType.SESSION_AVATAR_SWITCH_TO_IDLE, event.getType()); + assertEquals("e2", event.getEventId()); + assertEquals("t2", event.getTurnId()); + } + + @Test + void testAvatarSwitchToSpeakingPolymorphicViaSessionUpdate() { + String json = "{\"type\":\"session.avatar.switch_to_speaking\",\"event_id\":\"e3\",\"turn_id\":\"t3\"}"; + + SessionUpdate update = BinaryData.fromString(json).toObject(SessionUpdate.class); + + assertTrue(update instanceof ServerEventSessionAvatarSwitchToSpeaking, + "Expected ServerEventSessionAvatarSwitchToSpeaking, got " + update.getClass()); + assertEquals("t3", ((ServerEventSessionAvatarSwitchToSpeaking) update).getTurnId()); + } + + @Test + void testResponseVideoDeltaDeserialization() { + String json = "{\"type\":\"response.video.delta\",\"event_id\":\"e4\"," + + "\"output_index\":3,\"codec\":\"h264\",\"delta\":\"AAAAAQ==\"}"; + + ServerEventResponseVideoDelta event = BinaryData.fromString(json).toObject(ServerEventResponseVideoDelta.class); + + assertEquals(ServerEventType.RESPONSE_VIDEO_DELTA, event.getType()); + assertEquals("e4", event.getEventId()); + assertEquals(3, event.getOutputIndex()); + assertEquals("h264", event.getCodec()); + assertEquals("AAAAAQ==", event.getDelta()); + } + + @Test + void testResponseVideoDeltaRoundTrip() { + String json = "{\"type\":\"response.video.delta\",\"event_id\":\"e5\"," + + "\"output_index\":0,\"codec\":\"vp8\",\"delta\":\"ZGVsdGE=\"}"; + ServerEventResponseVideoDelta event = BinaryData.fromString(json).toObject(ServerEventResponseVideoDelta.class); + + ServerEventResponseVideoDelta deserialized + = BinaryData.fromObject(event).toObject(ServerEventResponseVideoDelta.class); + + assertEquals(event.getType(), deserialized.getType()); + assertEquals(event.getEventId(), deserialized.getEventId()); + assertEquals(event.getOutputIndex(), deserialized.getOutputIndex()); + assertEquals(event.getCodec(), deserialized.getCodec()); + assertEquals(event.getDelta(), deserialized.getDelta()); + } + + @Test + void testServerEventOutputAudioBufferClearedDeserialization() { + String json = "{\"type\":\"output_audio_buffer.cleared\",\"event_id\":\"e6\"}"; + + ServerEventOutputAudioBufferCleared event + = BinaryData.fromString(json).toObject(ServerEventOutputAudioBufferCleared.class); + + assertEquals(ServerEventType.OUTPUT_AUDIO_BUFFER_CLEARED, event.getType()); + assertEquals("e6", event.getEventId()); + } + + @Test + void testServerEventOutputAudioBufferClearedPolymorphicViaSessionUpdate() { + String json = "{\"type\":\"output_audio_buffer.cleared\",\"event_id\":\"e7\"}"; + + SessionUpdate update = BinaryData.fromString(json).toObject(SessionUpdate.class); + + assertTrue(update instanceof ServerEventOutputAudioBufferCleared, + "Expected ServerEventOutputAudioBufferCleared, got " + update.getClass()); + assertEquals("e7", update.getEventId()); + } + + @Test + void testClientEventOutputAudioBufferClearConstruction() { + ClientEventOutputAudioBufferClear event = new ClientEventOutputAudioBufferClear(); + + assertEquals(ClientEventType.OUTPUT_AUDIO_BUFFER_CLEAR, event.getType()); + + ClientEventOutputAudioBufferClear chained = event.setEventId("evt-1"); + assertSame(event, chained, "setEventId should return this for fluent chaining"); + assertEquals("evt-1", event.getEventId()); + } + + @Test + void testClientEventOutputAudioBufferClearSerialization() { + ClientEventOutputAudioBufferClear event = new ClientEventOutputAudioBufferClear().setEventId("clear-1"); + + String json = BinaryData.fromObject(event).toString(); + + assertTrue(json.contains("\"type\":\"output_audio_buffer.clear\""), json); + assertTrue(json.contains("\"event_id\":\"clear-1\""), json); + } + + @Test + void testClientEventOutputAudioBufferClearRoundTrip() { + ClientEventOutputAudioBufferClear original = new ClientEventOutputAudioBufferClear().setEventId("clear-2"); + + ClientEventOutputAudioBufferClear deserialized + = BinaryData.fromObject(original).toObject(ClientEventOutputAudioBufferClear.class); + + assertEquals(original.getType(), deserialized.getType()); + assertEquals(original.getEventId(), deserialized.getEventId()); + } + + @Test + void testClientEventOutputAudioBufferClearPolymorphicViaClientEvent() { + ClientEventOutputAudioBufferClear original = new ClientEventOutputAudioBufferClear().setEventId("clear-3"); + + ClientEvent deserialized = BinaryData.fromObject(original).toObject(ClientEvent.class); + + assertTrue(deserialized instanceof ClientEventOutputAudioBufferClear, + "Expected ClientEventOutputAudioBufferClear, got " + deserialized.getClass()); + assertEquals(ClientEventType.OUTPUT_AUDIO_BUFFER_CLEAR, deserialized.getType()); + assertEquals("clear-3", deserialized.getEventId()); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoiceTest.java b/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoiceTest.java new file mode 100644 index 000000000000..ff2f32897621 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoiceTest.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.voicelive.models; + +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Test; + +import java.util.Arrays; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit tests for {@link AzureAvatarVoiceSyncVoice} (the new {@code avatar-voice-sync} voice type + * introduced for video avatar voice synchronization). + */ +class AzureAvatarVoiceSyncVoiceTest { + + @Test + void testAvatarVoiceSyncTypeRegistered() { + assertNotNull(AzureVoiceType.AVATAR_VOICE_SYNC); + assertEquals("avatar-voice-sync", AzureVoiceType.AVATAR_VOICE_SYNC.toString()); + assertEquals(AzureVoiceType.AVATAR_VOICE_SYNC, AzureVoiceType.fromString("avatar-voice-sync")); + } + + @Test + void testConstructionAndDefaults() { + AzureAvatarVoiceSyncVoice voice = new AzureAvatarVoiceSyncVoice(PersonalVoiceModels.PHOENIX_LATEST_NEURAL); + + assertEquals(AzureVoiceType.AVATAR_VOICE_SYNC, voice.getType()); + assertEquals(PersonalVoiceModels.PHOENIX_LATEST_NEURAL, voice.getModel()); + assertNull(voice.getTemperature()); + assertNull(voice.getStyle()); + assertNull(voice.getLocale()); + assertNull(voice.getPitch()); + assertNull(voice.getRate()); + assertNull(voice.getVolume()); + assertNull(voice.getCustomLexiconUrl()); + assertNull(voice.getCustomTextNormalizationUrl()); + assertNull(voice.getPreferLocales()); + } + + @Test + void testFluentSettersAndGetters() { + List preferLocales = Arrays.asList("en-GB", "es-ES"); + AzureAvatarVoiceSyncVoice voice + = new AzureAvatarVoiceSyncVoice(PersonalVoiceModels.MAI_VOICE_1).setTemperature(0.7) + .setStyle("cheerful") + .setLocale("en-US") + .setPitch("+10%") + .setRate("medium") + .setVolume("loud") + .setCustomLexiconUrl("https://example.com/lexicon.xml") + .setCustomTextNormalizationUrl("https://example.com/normalize") + .setPreferLocales(preferLocales); + + assertEquals(PersonalVoiceModels.MAI_VOICE_1, voice.getModel()); + assertEquals(0.7, voice.getTemperature()); + assertEquals("cheerful", voice.getStyle()); + assertEquals("en-US", voice.getLocale()); + assertEquals("+10%", voice.getPitch()); + assertEquals("medium", voice.getRate()); + assertEquals("loud", voice.getVolume()); + assertEquals("https://example.com/lexicon.xml", voice.getCustomLexiconUrl()); + assertEquals("https://example.com/normalize", voice.getCustomTextNormalizationUrl()); + assertEquals(preferLocales, voice.getPreferLocales()); + } + + @Test + void testSerializesDiscriminatorType() { + AzureAvatarVoiceSyncVoice voice + = new AzureAvatarVoiceSyncVoice(PersonalVoiceModels.DRAGON_HDOMNI_LATEST_NEURAL).setStyle("neutral"); + + String json = BinaryData.fromObject(voice).toString(); + + assertTrue(json.contains("\"type\":\"avatar-voice-sync\""), "expected discriminator: " + json); + assertTrue(json.contains("\"model\":\"DragonHDOmniLatestNeural\""), "expected model: " + json); + assertTrue(json.contains("\"style\":\"neutral\""), "expected style: " + json); + } + + @Test + void testJsonRoundTrip() { + AzureAvatarVoiceSyncVoice original + = new AzureAvatarVoiceSyncVoice(PersonalVoiceModels.MAI_VOICE_1).setTemperature(0.5) + .setStyle("sad") + .setLocale("ja-JP") + .setRate("0.9") + .setPreferLocales(Arrays.asList("ja-JP")); + + BinaryData serialized = BinaryData.fromObject(original); + AzureAvatarVoiceSyncVoice deserialized = serialized.toObject(AzureAvatarVoiceSyncVoice.class); + + assertEquals(original.getType(), deserialized.getType()); + assertEquals(original.getModel(), deserialized.getModel()); + assertEquals(original.getTemperature(), deserialized.getTemperature()); + assertEquals(original.getStyle(), deserialized.getStyle()); + assertEquals(original.getLocale(), deserialized.getLocale()); + assertEquals(original.getRate(), deserialized.getRate()); + assertEquals(original.getPreferLocales(), deserialized.getPreferLocales()); + } + + @Test + void testPolymorphicDeserializationViaAzureVoice() { + AzureAvatarVoiceSyncVoice original + = new AzureAvatarVoiceSyncVoice(PersonalVoiceModels.PHOENIX_LATEST_NEURAL).setStyle("cheerful"); + BinaryData serialized = BinaryData.fromObject(original); + + AzureVoice deserialized = serialized.toObject(AzureVoice.class); + + assertNotNull(deserialized); + assertTrue(deserialized instanceof AzureAvatarVoiceSyncVoice, + "Expected AzureAvatarVoiceSyncVoice, got " + deserialized.getClass()); + AzureAvatarVoiceSyncVoice typed = (AzureAvatarVoiceSyncVoice) deserialized; + assertEquals(AzureVoiceType.AVATAR_VOICE_SYNC, typed.getType()); + assertEquals(PersonalVoiceModels.PHOENIX_LATEST_NEURAL, typed.getModel()); + assertEquals("cheerful", typed.getStyle()); + } + + @Test + void testNewPersonalVoiceModelConstants() { + // Newly added GA personal voice models should be registered. + assertNotNull(PersonalVoiceModels.DRAGON_HDOMNI_LATEST_NEURAL); + assertNotNull(PersonalVoiceModels.MAI_VOICE_1); + assertEquals("DragonHDOmniLatestNeural", PersonalVoiceModels.DRAGON_HDOMNI_LATEST_NEURAL.toString()); + assertEquals("MAI-Voice-1", PersonalVoiceModels.MAI_VOICE_1.toString()); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/TranscriptionAndIncludeOptionsTest.java b/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/TranscriptionAndIncludeOptionsTest.java new file mode 100644 index 000000000000..6132a1cfc051 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/TranscriptionAndIncludeOptionsTest.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.voicelive.models; + +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Test; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit tests for transcription enhancements (phrases / words / annotation event), session + * include + metadata options, the {@code reasoning_tokens} output token detail, and the new + * transcription model enum values. + */ +class TranscriptionAndIncludeOptionsTest { + + // -------- TranscriptionWord -------- + + @Test + void testTranscriptionWordRoundTrip() { + String json = "{\"text\":\"hello\",\"offset_milliseconds\":100,\"duration_milliseconds\":250}"; + + TranscriptionWord word = BinaryData.fromString(json).toObject(TranscriptionWord.class); + + assertEquals("hello", word.getText()); + assertEquals(100, word.getOffsetMilliseconds()); + assertEquals(250, word.getDurationMilliseconds()); + + TranscriptionWord roundTripped = BinaryData.fromObject(word).toObject(TranscriptionWord.class); + assertEquals(word.getText(), roundTripped.getText()); + assertEquals(word.getOffsetMilliseconds(), roundTripped.getOffsetMilliseconds()); + assertEquals(word.getDurationMilliseconds(), roundTripped.getDurationMilliseconds()); + } + + // -------- TranscriptionPhrase -------- + + @Test + void testTranscriptionPhraseDeserialization() { + String json = "{\"offset_milliseconds\":0,\"duration_milliseconds\":1000," + + "\"text\":\"hello world\",\"locale\":\"en-US\",\"confidence\":0.95," + + "\"words\":[{\"text\":\"hello\",\"offset_milliseconds\":0,\"duration_milliseconds\":400}," + + "{\"text\":\"world\",\"offset_milliseconds\":500,\"duration_milliseconds\":500}]}"; + + TranscriptionPhrase phrase = BinaryData.fromString(json).toObject(TranscriptionPhrase.class); + + assertEquals(0, phrase.getOffsetMilliseconds()); + assertEquals(1000, phrase.getDurationMilliseconds()); + assertEquals("hello world", phrase.getText()); + assertEquals("en-US", phrase.getLocale()); + assertEquals(0.95, phrase.getConfidence()); + + List words = phrase.getWords(); + assertNotNull(words); + assertEquals(2, words.size()); + assertEquals("hello", words.get(0).getText()); + assertEquals("world", words.get(1).getText()); + } + + @Test + void testTranscriptionPhraseRoundTrip() { + String json = "{\"offset_milliseconds\":10,\"duration_milliseconds\":20,\"text\":\"hi\"}"; + TranscriptionPhrase phrase = BinaryData.fromString(json).toObject(TranscriptionPhrase.class); + + TranscriptionPhrase deserialized = BinaryData.fromObject(phrase).toObject(TranscriptionPhrase.class); + + assertEquals(phrase.getOffsetMilliseconds(), deserialized.getOffsetMilliseconds()); + assertEquals(phrase.getDurationMilliseconds(), deserialized.getDurationMilliseconds()); + assertEquals(phrase.getText(), deserialized.getText()); + assertNull(deserialized.getLocale()); + assertNull(deserialized.getConfidence()); + assertNull(deserialized.getWords()); + } + + // -------- AudioInputTranscriptionOptionsModel new values -------- + + @Test + void testTranscriptionModelNewValues() { + assertEquals("gpt-4o-transcribe-diarize", + AudioInputTranscriptionOptionsModel.GPT_4O_TRANSCRIBE_DIARIZE.toString()); + assertEquals("mai-transcribe-1", AudioInputTranscriptionOptionsModel.MAI_TRANSCRIBE_1.toString()); + } + + // -------- SessionIncludeOption -------- + + @Test + void testSessionIncludeOptionValues() { + assertEquals("item.input_audio_transcription.logprobs", + SessionIncludeOption.ITEM_INPUT_AUDIO_TRANSCRIPTION_LOGPROBS.toString()); + assertEquals("item.input_audio_transcription.phrases", + SessionIncludeOption.ITEM_INPUT_AUDIO_TRANSCRIPTION_PHRASES.toString()); + assertEquals("file_search_call.results", SessionIncludeOption.FILE_SEARCH_CALL_RESULTS.toString()); + } + + // -------- VoiceLiveSessionOptions include + metadata -------- + + @Test + void testSessionOptionsIncludeFluent() { + VoiceLiveSessionOptions options = new VoiceLiveSessionOptions(); + List include = Arrays.asList(SessionIncludeOption.ITEM_INPUT_AUDIO_TRANSCRIPTION_LOGPROBS, + SessionIncludeOption.FILE_SEARCH_CALL_RESULTS); + + VoiceLiveSessionOptions chained = options.setInclude(include); + + assertSame(options, chained); + assertEquals(include, options.getInclude()); + } + + @Test + void testSessionOptionsMetadataFluent() { + VoiceLiveSessionOptions options = new VoiceLiveSessionOptions(); + Map metadata = new LinkedHashMap<>(); + metadata.put("user_id", "u-42"); + metadata.put("env", "prod"); + + VoiceLiveSessionOptions chained = options.setMetadata(metadata); + + assertSame(options, chained); + assertNotNull(options.getMetadata()); + assertEquals(2, options.getMetadata().size()); + assertEquals("u-42", options.getMetadata().get("user_id")); + assertEquals("prod", options.getMetadata().get("env")); + } + + @Test + void testSessionOptionsIncludeAndMetadataJsonRoundTrip() { + Map metadata = new HashMap<>(); + metadata.put("key", "value"); + + VoiceLiveSessionOptions options = new VoiceLiveSessionOptions().setModel("gpt-4o-realtime-preview") + .setInclude(Arrays.asList(SessionIncludeOption.ITEM_INPUT_AUDIO_TRANSCRIPTION_PHRASES)) + .setMetadata(metadata); + + BinaryData serialized = BinaryData.fromObject(options); + VoiceLiveSessionOptions deserialized = serialized.toObject(VoiceLiveSessionOptions.class); + + assertEquals(options.getModel(), deserialized.getModel()); + assertNotNull(deserialized.getInclude()); + assertEquals(1, deserialized.getInclude().size()); + assertEquals(SessionIncludeOption.ITEM_INPUT_AUDIO_TRANSCRIPTION_PHRASES, deserialized.getInclude().get(0)); + assertNotNull(deserialized.getMetadata()); + assertEquals("value", deserialized.getMetadata().get("key")); + } + + @Test + void testSessionResponseIncludeAndMetadata() { + Map metadata = new HashMap<>(); + metadata.put("k", "v"); + VoiceLiveSessionResponse response + = new VoiceLiveSessionResponse().setInclude(Arrays.asList(SessionIncludeOption.FILE_SEARCH_CALL_RESULTS)) + .setMetadata(metadata); + + VoiceLiveSessionResponse deserialized + = BinaryData.fromObject(response).toObject(VoiceLiveSessionResponse.class); + + assertNotNull(deserialized.getInclude()); + assertEquals(1, deserialized.getInclude().size()); + assertEquals(SessionIncludeOption.FILE_SEARCH_CALL_RESULTS, deserialized.getInclude().get(0)); + assertNotNull(deserialized.getMetadata()); + assertEquals("v", deserialized.getMetadata().get("k")); + } + + // -------- OutputTokenDetails reasoning_tokens -------- + + @Test + void testOutputTokenDetailsReasoningTokens() { + String json = "{\"text_tokens\":10,\"audio_tokens\":20,\"reasoning_tokens\":7}"; + + OutputTokenDetails details = BinaryData.fromString(json).toObject(OutputTokenDetails.class); + + assertEquals(10, details.getTextTokens()); + assertEquals(20, details.getAudioTokens()); + assertEquals(Integer.valueOf(7), details.getReasoningTokens()); + } + + @Test + void testOutputTokenDetailsReasoningTokensNullable() { + String json = "{\"text_tokens\":1,\"audio_tokens\":2}"; + + OutputTokenDetails details = BinaryData.fromString(json).toObject(OutputTokenDetails.class); + + assertNull(details.getReasoningTokens()); + } + + // -------- ResponseAudioTranscriptAnnotationAdded -------- + + @Test + void testResponseAudioTranscriptAnnotationAddedDeserialization() { + String json = "{\"type\":\"response.audio_transcript.annotation.added\"," + + "\"event_id\":\"e1\",\"response_id\":\"r1\",\"item_id\":\"i1\"," + + "\"output_index\":0,\"content_index\":1,\"annotation_index\":2," + + "\"annotation\":{\"kind\":\"citation\",\"text\":\"ref\"}}"; + + ServerEventResponseAudioTranscriptAnnotationAdded event + = BinaryData.fromString(json).toObject(ServerEventResponseAudioTranscriptAnnotationAdded.class); + + assertEquals(ServerEventType.RESPONSE_AUDIO_TRANSCRIPT_ANNOTATION_ADDED, event.getType()); + assertEquals("e1", event.getEventId()); + assertEquals("r1", event.getResponseId()); + assertEquals("i1", event.getItemId()); + assertEquals(0, event.getOutputIndex()); + assertEquals(1, event.getContentIndex()); + assertEquals(2, event.getAnnotationIndex()); + assertNotNull(event.getAnnotation()); + String annotationJson = event.getAnnotation().toString(); + assertTrue(annotationJson.contains("citation"), "annotation payload should be preserved: " + annotationJson); + } + + // -------- ResponseCreateParams.setInterimResponse(BinaryData) -------- + + @Test + void testResponseCreateParamsInterimResponse() { + StaticInterimResponseConfig interim = new StaticInterimResponseConfig().setTexts(Arrays.asList("hold on")) + .setTriggers(Arrays.asList(InterimResponseTrigger.LATENCY)) + .setLatencyThresholdMs(1000); + BinaryData interimData = BinaryData.fromObject(interim); + + ResponseCreateParams params = new ResponseCreateParams(); + ResponseCreateParams chained = params.setInterimResponse(interimData); + + assertSame(params, chained); + assertNotNull(params.getInterimResponse()); + + ResponseCreateParams deserialized = BinaryData.fromObject(params).toObject(ResponseCreateParams.class); + assertNotNull(deserialized.getInterimResponse()); + assertTrue(deserialized.getInterimResponse().toString().contains("static_interim_response"), + deserialized.getInterimResponse().toString()); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/WebAndFileSearchTest.java b/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/WebAndFileSearchTest.java new file mode 100644 index 000000000000..68c7a6d35024 --- /dev/null +++ b/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/WebAndFileSearchTest.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.voicelive.models; + +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Test; + +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit tests for the new web-search and file-search response items and their lifecycle server events. + */ +class WebAndFileSearchTest { + + @Test + void testItemTypeNewValues() { + assertNotNull(ItemType.WEB_SEARCH_CALL); + assertNotNull(ItemType.FILE_SEARCH_CALL); + assertEquals("web_search_call", ItemType.WEB_SEARCH_CALL.toString()); + assertEquals("file_search_call", ItemType.FILE_SEARCH_CALL.toString()); + } + + @Test + void testWebSearchCallItemDeserialization() { + String json = "{\"type\":\"web_search_call\",\"id\":\"ws_1\",\"status\":\"in_progress\"}"; + + ResponseWebSearchCallItem item = BinaryData.fromString(json).toObject(ResponseWebSearchCallItem.class); + + assertNotNull(item); + assertEquals(ItemType.WEB_SEARCH_CALL, item.getType()); + assertEquals("ws_1", item.getId()); + assertEquals(ResponseWebSearchCallItemStatus.IN_PROGRESS, item.getStatus()); + } + + @Test + void testWebSearchCallItemRoundTrip() { + String json = "{\"type\":\"web_search_call\",\"id\":\"ws_2\",\"status\":\"completed\"}"; + ResponseWebSearchCallItem item = BinaryData.fromString(json).toObject(ResponseWebSearchCallItem.class); + + BinaryData serialized = BinaryData.fromObject(item); + ResponseWebSearchCallItem deserialized = serialized.toObject(ResponseWebSearchCallItem.class); + + assertEquals(item.getId(), deserialized.getId()); + assertEquals(item.getType(), deserialized.getType()); + assertEquals(item.getStatus(), deserialized.getStatus()); + assertTrue(serialized.toString().contains("\"type\":\"web_search_call\"")); + } + + @Test + void testWebSearchCallItemPolymorphicViaSessionResponseItem() { + String json = "{\"type\":\"web_search_call\",\"id\":\"ws_3\",\"status\":\"searching\"}"; + + SessionResponseItem item = BinaryData.fromString(json).toObject(SessionResponseItem.class); + + assertTrue(item instanceof ResponseWebSearchCallItem, + "Expected ResponseWebSearchCallItem, got " + item.getClass()); + assertEquals(ItemType.WEB_SEARCH_CALL, item.getType()); + assertEquals(ResponseWebSearchCallItemStatus.SEARCHING, ((ResponseWebSearchCallItem) item).getStatus()); + } + + @Test + void testFileSearchCallItemDeserialization() { + String json = "{\"type\":\"file_search_call\",\"id\":\"fs_1\",\"status\":\"in_progress\"," + + "\"queries\":[\"alpha\",\"beta\"]," + + "\"results\":[{\"file_id\":\"f1\",\"filename\":\"a.txt\",\"score\":0.92,\"text\":\"hello\"," + + "\"attributes\":{\"k1\":\"v1\"}}]}"; + + ResponseFileSearchCallItem item = BinaryData.fromString(json).toObject(ResponseFileSearchCallItem.class); + + assertNotNull(item); + assertEquals(ItemType.FILE_SEARCH_CALL, item.getType()); + assertEquals("fs_1", item.getId()); + assertEquals(ResponseFileSearchCallItemStatus.IN_PROGRESS, item.getStatus()); + + List queries = item.getQueries(); + assertNotNull(queries); + assertEquals(2, queries.size()); + assertEquals("alpha", queries.get(0)); + assertEquals("beta", queries.get(1)); + + List results = item.getResults(); + assertNotNull(results); + assertEquals(1, results.size()); + FileSearchResult r = results.get(0); + assertEquals("f1", r.getFileId()); + assertEquals("a.txt", r.getFilename()); + assertEquals(0.92, r.getScore()); + assertEquals("hello", r.getText()); + assertNotNull(r.getAttributes()); + assertEquals("v1", r.getAttributes().get("k1")); + } + + @Test + void testFileSearchCallItemRoundTrip() { + String json = "{\"type\":\"file_search_call\",\"id\":\"fs_2\",\"status\":\"completed\"," + + "\"queries\":[\"q\"],\"results\":[]}"; + ResponseFileSearchCallItem item = BinaryData.fromString(json).toObject(ResponseFileSearchCallItem.class); + + ResponseFileSearchCallItem deserialized + = BinaryData.fromObject(item).toObject(ResponseFileSearchCallItem.class); + + assertEquals(item.getId(), deserialized.getId()); + assertEquals(item.getType(), deserialized.getType()); + assertEquals(item.getStatus(), deserialized.getStatus()); + assertEquals(item.getQueries(), deserialized.getQueries()); + } + + @Test + void testFileSearchCallItemPolymorphicViaSessionResponseItem() { + String json = "{\"type\":\"file_search_call\",\"id\":\"fs_3\",\"status\":\"searching\"}"; + + SessionResponseItem item = BinaryData.fromString(json).toObject(SessionResponseItem.class); + + assertTrue(item instanceof ResponseFileSearchCallItem, + "Expected ResponseFileSearchCallItem, got " + item.getClass()); + assertEquals(ResponseFileSearchCallItemStatus.SEARCHING, ((ResponseFileSearchCallItem) item).getStatus()); + } + + @Test + void testFileSearchResultDeserializationWithNullScore() { + String json = "{\"file_id\":\"fid\",\"filename\":\"name.txt\",\"text\":\"t\"}"; + + FileSearchResult result = BinaryData.fromString(json).toObject(FileSearchResult.class); + + assertEquals("fid", result.getFileId()); + assertEquals("name.txt", result.getFilename()); + assertEquals("t", result.getText()); + assertNull(result.getScore()); + assertNull(result.getAttributes()); + } + + @Test + void testWebSearchCallItemStatusValues() { + assertEquals(ResponseWebSearchCallItemStatus.IN_PROGRESS, + ResponseWebSearchCallItemStatus.fromString("in_progress")); + assertEquals(ResponseWebSearchCallItemStatus.SEARCHING, + ResponseWebSearchCallItemStatus.fromString("searching")); + assertEquals(ResponseWebSearchCallItemStatus.COMPLETED, + ResponseWebSearchCallItemStatus.fromString("completed")); + } + + @Test + void testFileSearchCallItemStatusValues() { + assertEquals(ResponseFileSearchCallItemStatus.IN_PROGRESS, + ResponseFileSearchCallItemStatus.fromString("in_progress")); + assertEquals(ResponseFileSearchCallItemStatus.SEARCHING, + ResponseFileSearchCallItemStatus.fromString("searching")); + assertEquals(ResponseFileSearchCallItemStatus.COMPLETED, + ResponseFileSearchCallItemStatus.fromString("completed")); + } + + // -------- Lifecycle server events -------- + + @Test + void testWebSearchCallLifecycleEventTypes() { + assertEquals("response.web_search_call.searching", + ServerEventType.RESPONSE_WEB_SEARCH_CALL_SEARCHING.toString()); + assertEquals("response.web_search_call.in_progress", + ServerEventType.RESPONSE_WEB_SEARCH_CALL_IN_PROGRESS.toString()); + assertEquals("response.web_search_call.completed", + ServerEventType.RESPONSE_WEB_SEARCH_CALL_COMPLETED.toString()); + } + + @Test + void testFileSearchCallLifecycleEventTypes() { + assertEquals("response.file_search_call.searching", + ServerEventType.RESPONSE_FILE_SEARCH_CALL_SEARCHING.toString()); + assertEquals("response.file_search_call.in_progress", + ServerEventType.RESPONSE_FILE_SEARCH_CALL_IN_PROGRESS.toString()); + assertEquals("response.file_search_call.completed", + ServerEventType.RESPONSE_FILE_SEARCH_CALL_COMPLETED.toString()); + } + + @Test + void testWebSearchCallSearchingDeserialization() { + String json = "{\"type\":\"response.web_search_call.searching\",\"event_id\":\"e1\"," + + "\"response_id\":\"r1\",\"item_id\":\"i1\",\"output_index\":0,\"sequence_number\":2}"; + + ServerEventResponseWebSearchCallSearching event + = BinaryData.fromString(json).toObject(ServerEventResponseWebSearchCallSearching.class); + + assertEquals(ServerEventType.RESPONSE_WEB_SEARCH_CALL_SEARCHING, event.getType()); + assertEquals("e1", event.getEventId()); + assertEquals("r1", event.getResponseId()); + assertEquals("i1", event.getItemId()); + assertEquals(0, event.getOutputIndex()); + assertEquals(2, event.getSequenceNumber()); + } + + @Test + void testFileSearchCallCompletedDeserialization() { + String json = "{\"type\":\"response.file_search_call.completed\",\"event_id\":\"e2\"," + + "\"response_id\":\"r2\",\"item_id\":\"i2\",\"output_index\":1,\"sequence_number\":5}"; + + ServerEventResponseFileSearchCallCompleted event + = BinaryData.fromString(json).toObject(ServerEventResponseFileSearchCallCompleted.class); + + assertEquals(ServerEventType.RESPONSE_FILE_SEARCH_CALL_COMPLETED, event.getType()); + assertEquals("e2", event.getEventId()); + assertEquals("r2", event.getResponseId()); + assertEquals("i2", event.getItemId()); + assertEquals(1, event.getOutputIndex()); + assertEquals(5, event.getSequenceNumber()); + } + + @Test + void testFileSearchCallInProgressRoundTrip() { + String json = "{\"type\":\"response.file_search_call.in_progress\",\"event_id\":\"e3\"," + + "\"response_id\":\"r3\",\"item_id\":\"i3\",\"output_index\":0,\"sequence_number\":1}"; + ServerEventResponseFileSearchCallInProgress event + = BinaryData.fromString(json).toObject(ServerEventResponseFileSearchCallInProgress.class); + + ServerEventResponseFileSearchCallInProgress deserialized + = BinaryData.fromObject(event).toObject(ServerEventResponseFileSearchCallInProgress.class); + + assertEquals(event.getType(), deserialized.getType()); + assertEquals(event.getResponseId(), deserialized.getResponseId()); + assertEquals(event.getItemId(), deserialized.getItemId()); + assertEquals(event.getOutputIndex(), deserialized.getOutputIndex()); + assertEquals(event.getSequenceNumber(), deserialized.getSequenceNumber()); + } + + @Test + void testWebSearchCallCompletedPolymorphicViaSessionUpdate() { + String json = "{\"type\":\"response.web_search_call.completed\",\"event_id\":\"e4\"," + + "\"response_id\":\"r4\",\"item_id\":\"i4\",\"output_index\":2,\"sequence_number\":7}"; + + SessionUpdate update = BinaryData.fromString(json).toObject(SessionUpdate.class); + + assertTrue(update instanceof ServerEventResponseWebSearchCallCompleted, + "Expected ServerEventResponseWebSearchCallCompleted, got " + update.getClass()); + ServerEventResponseWebSearchCallCompleted typed = (ServerEventResponseWebSearchCallCompleted) update; + assertEquals("r4", typed.getResponseId()); + assertEquals(7, typed.getSequenceNumber()); + } +} diff --git a/sdk/voicelive/azure-ai-voicelive/tsp-location.yaml b/sdk/voicelive/azure-ai-voicelive/tsp-location.yaml index d539a717285f..c24eef1be09e 100644 --- a/sdk/voicelive/azure-ai-voicelive/tsp-location.yaml +++ b/sdk/voicelive/azure-ai-voicelive/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/ai/data-plane/VoiceLive -commit: 3c8fbb08a317a149aa37dfbbb035b67ae54e9588 +commit: 8f6c6371d91394a88ddd135eac7f96410263f9d6 repo: Azure/azure-rest-api-specs additionalDirectories: From 3192d5b502e228eb1abd9dfec7138e322337f8cc Mon Sep 17 00:00:00 2001 From: Xiting Zhang Date: Tue, 5 May 2026 14:03:47 -0700 Subject: [PATCH 2/4] update change log --- sdk/voicelive/azure-ai-voicelive/CHANGELOG.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/sdk/voicelive/azure-ai-voicelive/CHANGELOG.md b/sdk/voicelive/azure-ai-voicelive/CHANGELOG.md index 554617099ad1..3917dacb66bb 100644 --- a/sdk/voicelive/azure-ai-voicelive/CHANGELOG.md +++ b/sdk/voicelive/azure-ai-voicelive/CHANGELOG.md @@ -3,22 +3,6 @@ ## 1.0.0 (Unreleased) This is the first General Availability (GA) release of the Azure VoiceLive client library for Java. -As of this release the public API is considered stable and will follow [Semantic Versioning](https://semver.org/); -future non-breaking enhancements will ship in `1.x` minor releases, and any breaking changes will require a `2.0.0` major bump. - -### Highlights since `1.0.0-beta.1` - -For users upgrading from an earlier beta, the cumulative changes between `1.0.0-beta.1` and `1.0.0` are: - -- **New session entry points** — direct Azure AI Foundry agent sessions via `VoiceLiveAsyncClient.startSession(AgentSessionConfig)` (added in beta.5). -- **Video avatar support** — `AvatarConfiguration` (with `Scene`, audit-audio forwarding), `AzureVoiceType.AVATAR_VOICE_SYNC` / `AzureAvatarVoiceSyncVoice`, the `response.video.delta` stream, `session.avatar.switch_to_{speaking,idle}` lifecycle events, and `output_audio_buffer.{clear,cleared}` events for the avatar audio buffer. -- **Tool calling expansion** — built-in MCP tool calls (items, approval flow, list-tools / call lifecycle events) plus new web-search and file-search tool calls (`ResponseWebSearchCallItem`, `ResponseFileSearchCallItem` with `FileSearchResult`, and full `*_search_call.{searching,in_progress,completed}` lifecycle events). -- **Transcription** — `TranscriptionPhrase` / `TranscriptionWord` with timing/confidence, `getLogprobs()` / `getPhrases()` on the transcription-completed event, the `response.audio_transcript.annotation.added` event, and new transcription models `gpt-4o-transcribe-diarize` and `mai-transcribe-1`. -- **Reasoning + interim responses** — `ReasoningEffort` configuration, `OutputTokenDetails.getReasoningTokens()`, and interim response configuration (`StaticInterimResponseConfig` / `LlmInterimResponseConfig`, plus per-request `ResponseCreateParams.setInterimResponse(BinaryData)`) to cover latency and tool-call gaps. -- **Session payload control** — `SessionIncludeOption` opt-in payloads (logprobs, phrases, file-search results) and free-form `metadata` (`Map`, up to 16 entries) on both `VoiceLiveSessionOptions` and `VoiceLiveSessionResponse`. -- **Personal voice catalog refresh** — added `DRAGON_HDOMNI_LATEST_NEURAL` and `MAI_VOICE_1`; removed `PHOENIX_V2NEURAL` (use `PHOENIX_LATEST_NEURAL` or one of the `DRAGON_*` / `MAI_VOICE_1` models). -- **Observability** — built-in OpenTelemetry tracing for `connect`/`send`/`recv`/`close` following GenAI semantic conventions, with session counters, content-recording opt-in, and `gen_ai.client.*` metrics (added in beta.6). -- **Reliability and ergonomics** — switched the WebSocket transport to the JDK DNS resolver to fix `UnknownHostException` on IPv6-limited networks, hardened all runnable samples (receive-first barrier, daemon worker threads, bounded queues, proper error propagation), and significantly improved Javadoc across voice and turn-detection model types. ### Features Added From e86899e2b663fb44f56f4d17c8afebe82a9005c4 Mon Sep 17 00:00:00 2001 From: Xiting Zhang Date: Tue, 5 May 2026 14:41:41 -0700 Subject: [PATCH 3/4] [voicelive] Add transcription completed tests and changelog/cspell tweaks - Add 4 unit tests for SessionUpdateConversationItemInputAudioTranscriptionCompleted covering the new logprobs and phrases arrays (full payload, backward-compat without arrays, JSON round-trip, polymorphic dispatch via SessionUpdate). - Trim CHANGELOG sections that don't apply to the GA delta from 1.0.0-beta.6. - Add HDOMNI and SSML to the workspace cspell dictionary. --- .vscode/cspell.json | 2 + sdk/voicelive/azure-ai-voicelive/CHANGELOG.md | 12 -- .../TranscriptionAndIncludeOptionsTest.java | 108 ++++++++++++++++++ 3 files changed, 110 insertions(+), 12 deletions(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index bca4fa270c16..3f01f6f81789 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -1498,6 +1498,8 @@ "FOUNDRY", "genai", "GENAI", + "HDOMNI", + "SSML", "Unpooled", "viseme", "VISEME", diff --git a/sdk/voicelive/azure-ai-voicelive/CHANGELOG.md b/sdk/voicelive/azure-ai-voicelive/CHANGELOG.md index 3917dacb66bb..e960f8a3269c 100644 --- a/sdk/voicelive/azure-ai-voicelive/CHANGELOG.md +++ b/sdk/voicelive/azure-ai-voicelive/CHANGELOG.md @@ -32,20 +32,8 @@ This is the first General Availability (GA) release of the Azure VoiceLive clien - Removed `PersonalVoiceModels.PHOENIX_V2NEURAL` (no longer supported by the service). Use `PHOENIX_LATEST_NEURAL` or one of the new `DRAGON_*` / `MAI_VOICE_1` models instead. -### Bugs Fixed - -- **Sample threading and reactive lifecycle hardening** (addresses production hazards in async samples): - - Added a receive-first barrier (`Sinks.One` gated on `receiveEvents().doOnSubscribe(...)`) in all runnable samples so `sendEvent(sessionConfig)` only runs after the hot multicast event stream is subscribed; this prevents missed events on session start. - - Composed receive + send pipelines into a single `Flux.merge(...).then()` lifecycle (notably `AgentV2Sample`) instead of detached `subscribe()` calls. - - Audio capture/playback worker threads are now daemon threads, block on `take()` / `read()` instead of busy-polling, and are explicitly interrupted during cleanup so JVM shutdown completes promptly. - - Used `volatile` and `AtomicReference` for cross-thread audio line / thread handles to fix Java Memory Model visibility races. - - Replaced unbounded queues with bounded `LinkedBlockingQueue(1000)`; `offer()` overflow now logs a warning instead of silently dropping audio. - - Replaced `doOnError().subscribe()` and bare `subscribe()` patterns with `subscribe(onNext, onError)` so errors are no longer swallowed. - - Fixed an unreachable completion message in `AuthenticationMethodsSample` and a `runMCPSample` signature mismatch in `MCPSample`. - ### Other Changes -- Updated all 9 runnable samples with user-friendly Javadoc ("when to use this sample" / "what happens when you run it") sections. - Updated default service API version to track the latest TypeSpec spec. ## 1.0.0-beta.6 (2026-05-01) diff --git a/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/TranscriptionAndIncludeOptionsTest.java b/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/TranscriptionAndIncludeOptionsTest.java index 6132a1cfc051..9be1614a3c0e 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/TranscriptionAndIncludeOptionsTest.java +++ b/sdk/voicelive/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/TranscriptionAndIncludeOptionsTest.java @@ -82,6 +82,114 @@ void testTranscriptionPhraseRoundTrip() { assertNull(deserialized.getWords()); } + // -------- SessionUpdateConversationItemInputAudioTranscriptionCompleted (logprobs + phrases) -------- + + @Test + void testTranscriptionCompletedWithLogprobsAndPhrases() { + String json = "{\"type\":\"conversation.item.input_audio_transcription.completed\"," + + "\"event_id\":\"e1\",\"item_id\":\"i1\",\"content_index\":0,\"transcript\":\"hello world\"," + + "\"logprobs\":[" + "{\"token\":\"hello\",\"logprob\":-0.12,\"bytes\":[104,101,108,108,111]}," + + "{\"token\":\" world\",\"logprob\":-0.34,\"bytes\":[32,119,111,114,108,100]}" + "]," + "\"phrases\":[" + + "{\"offset_milliseconds\":0,\"duration_milliseconds\":1000,\"text\":\"hello world\"," + + "\"locale\":\"en-US\",\"confidence\":0.97," + + "\"words\":[{\"text\":\"hello\",\"offset_milliseconds\":0,\"duration_milliseconds\":400}," + + "{\"text\":\"world\",\"offset_milliseconds\":500,\"duration_milliseconds\":500}]}" + "]}"; + + SessionUpdateConversationItemInputAudioTranscriptionCompleted event + = BinaryData.fromString(json).toObject(SessionUpdateConversationItemInputAudioTranscriptionCompleted.class); + + assertEquals(ServerEventType.CONVERSATION_ITEM_INPUT_AUDIO_TRANSCRIPTION_COMPLETED, event.getType()); + assertEquals("e1", event.getEventId()); + assertEquals("i1", event.getItemId()); + assertEquals(0, event.getContentIndex()); + assertEquals("hello world", event.getTranscript()); + + List logprobs = event.getLogprobs(); + assertNotNull(logprobs); + assertEquals(2, logprobs.size()); + assertEquals("hello", logprobs.get(0).getToken()); + assertEquals(-0.12, logprobs.get(0).getLogprob()); + assertNotNull(logprobs.get(0).getBytes()); + assertEquals(5, logprobs.get(0).getBytes().size()); + assertEquals(Integer.valueOf(104), logprobs.get(0).getBytes().get(0)); + assertEquals(" world", logprobs.get(1).getToken()); + assertEquals(-0.34, logprobs.get(1).getLogprob()); + + List phrases = event.getPhrases(); + assertNotNull(phrases); + assertEquals(1, phrases.size()); + TranscriptionPhrase phrase = phrases.get(0); + assertEquals(0, phrase.getOffsetMilliseconds()); + assertEquals(1000, phrase.getDurationMilliseconds()); + assertEquals("hello world", phrase.getText()); + assertEquals("en-US", phrase.getLocale()); + assertEquals(0.97, phrase.getConfidence()); + assertNotNull(phrase.getWords()); + assertEquals(2, phrase.getWords().size()); + assertEquals("hello", phrase.getWords().get(0).getText()); + assertEquals("world", phrase.getWords().get(1).getText()); + } + + @Test + void testTranscriptionCompletedWithoutLogprobsOrPhrases() { + // Backward compatibility: payloads without the new fields must still deserialize and expose null arrays. + String json = "{\"type\":\"conversation.item.input_audio_transcription.completed\"," + + "\"event_id\":\"e2\",\"item_id\":\"i2\",\"content_index\":3,\"transcript\":\"hi\"}"; + + SessionUpdateConversationItemInputAudioTranscriptionCompleted event + = BinaryData.fromString(json).toObject(SessionUpdateConversationItemInputAudioTranscriptionCompleted.class); + + assertEquals("hi", event.getTranscript()); + assertEquals(3, event.getContentIndex()); + assertNull(event.getLogprobs()); + assertNull(event.getPhrases()); + } + + @Test + void testTranscriptionCompletedJsonRoundTripPreservesArrays() { + String json = "{\"type\":\"conversation.item.input_audio_transcription.completed\"," + + "\"event_id\":\"e3\",\"item_id\":\"i3\",\"content_index\":0,\"transcript\":\"hi\"," + + "\"logprobs\":[{\"token\":\"hi\",\"logprob\":-0.5,\"bytes\":[104,105]}]," + + "\"phrases\":[{\"offset_milliseconds\":10,\"duration_milliseconds\":20,\"text\":\"hi\"}]}"; + + SessionUpdateConversationItemInputAudioTranscriptionCompleted original + = BinaryData.fromString(json).toObject(SessionUpdateConversationItemInputAudioTranscriptionCompleted.class); + + SessionUpdateConversationItemInputAudioTranscriptionCompleted roundTripped = BinaryData.fromObject(original) + .toObject(SessionUpdateConversationItemInputAudioTranscriptionCompleted.class); + + assertNotNull(roundTripped.getLogprobs()); + assertEquals(1, roundTripped.getLogprobs().size()); + assertEquals("hi", roundTripped.getLogprobs().get(0).getToken()); + assertEquals(-0.5, roundTripped.getLogprobs().get(0).getLogprob()); + assertEquals(Arrays.asList(104, 105), roundTripped.getLogprobs().get(0).getBytes()); + + assertNotNull(roundTripped.getPhrases()); + assertEquals(1, roundTripped.getPhrases().size()); + assertEquals(10, roundTripped.getPhrases().get(0).getOffsetMilliseconds()); + assertEquals(20, roundTripped.getPhrases().get(0).getDurationMilliseconds()); + assertEquals("hi", roundTripped.getPhrases().get(0).getText()); + } + + @Test + void testTranscriptionCompletedPolymorphicViaSessionUpdate() { + String json = "{\"type\":\"conversation.item.input_audio_transcription.completed\"," + + "\"event_id\":\"e4\",\"item_id\":\"i4\",\"content_index\":0,\"transcript\":\"yo\"," + + "\"logprobs\":[{\"token\":\"yo\",\"logprob\":-0.1,\"bytes\":[121,111]}]," + + "\"phrases\":[{\"offset_milliseconds\":0,\"duration_milliseconds\":50,\"text\":\"yo\"}]}"; + + SessionUpdate update = BinaryData.fromString(json).toObject(SessionUpdate.class); + + assertTrue(update instanceof SessionUpdateConversationItemInputAudioTranscriptionCompleted, + "Expected SessionUpdateConversationItemInputAudioTranscriptionCompleted, got " + update.getClass()); + SessionUpdateConversationItemInputAudioTranscriptionCompleted typed + = (SessionUpdateConversationItemInputAudioTranscriptionCompleted) update; + assertNotNull(typed.getLogprobs()); + assertEquals(1, typed.getLogprobs().size()); + assertNotNull(typed.getPhrases()); + assertEquals(1, typed.getPhrases().size()); + } + // -------- AudioInputTranscriptionOptionsModel new values -------- @Test From 6e400c76660865a48b5c03974dda9fb06b595522 Mon Sep 17 00:00:00 2001 From: Xiting Zhang Date: Tue, 5 May 2026 15:05:40 -0700 Subject: [PATCH 4/4] update format --- .../models/AzureAvatarVoiceSyncVoice.java | 48 +++++++++---------- .../ClientEventOutputAudioBufferClear.java | 8 ++-- .../ai/voicelive/models/FileSearchResult.java | 16 +++---- .../models/ResponseFileSearchCallItem.java | 18 ++++--- .../ResponseFileSearchCallItemStatus.java | 8 ++-- .../models/ResponseWebSearchCallItem.java | 14 +++--- .../ResponseWebSearchCallItemStatus.java | 8 ++-- .../ServerEventOutputAudioBufferCleared.java | 8 ++-- ...esponseAudioTranscriptAnnotationAdded.java | 22 ++++----- ...rEventResponseFileSearchCallCompleted.java | 18 ++++--- ...EventResponseFileSearchCallInProgress.java | 18 ++++--- ...rEventResponseFileSearchCallSearching.java | 18 ++++--- .../models/ServerEventResponseVideoDelta.java | 16 +++---- ...erEventResponseWebSearchCallCompleted.java | 18 ++++--- ...rEventResponseWebSearchCallInProgress.java | 18 ++++--- ...erEventResponseWebSearchCallSearching.java | 18 ++++--- .../ServerEventSessionAvatarSwitchToIdle.java | 10 ++-- ...verEventSessionAvatarSwitchToSpeaking.java | 10 ++-- .../models/SessionIncludeOption.java | 8 ++-- .../voicelive/models/TranscriptionPhrase.java | 20 ++++---- .../voicelive/models/TranscriptionWord.java | 13 +++-- 21 files changed, 150 insertions(+), 185 deletions(-) diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoice.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoice.java index 563041e217c6..c6e420b328b2 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoice.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzureAvatarVoiceSyncVoice.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Fluent; @@ -17,6 +16,7 @@ */ @Fluent public final class AzureAvatarVoiceSyncVoice extends AzureVoice { + /* * The type of the Azure voice. */ @@ -105,7 +105,7 @@ public final class AzureAvatarVoiceSyncVoice extends AzureVoice { /** * Creates an instance of AzureAvatarVoiceSyncVoice class. - * + * * @param model the model value to set. */ @Generated @@ -115,7 +115,7 @@ public AzureAvatarVoiceSyncVoice(PersonalVoiceModels model) { /** * Get the type property: The type of the Azure voice. - * + * * @return the type value. */ @Generated @@ -126,7 +126,7 @@ public AzureVoiceType getType() { /** * Get the model property: Underlying neural model to use. - * + * * @return the model value. */ @Generated @@ -136,7 +136,7 @@ public PersonalVoiceModels getModel() { /** * Get the temperature property: Temperature must be between 0.0 and 1.0. - * + * * @return the temperature value. */ @Generated @@ -146,7 +146,7 @@ public Double getTemperature() { /** * Set the temperature property: Temperature must be between 0.0 and 1.0. - * + * * @param temperature the temperature value to set. * @return the AzureAvatarVoiceSyncVoice object itself. */ @@ -158,7 +158,7 @@ public AzureAvatarVoiceSyncVoice setTemperature(Double temperature) { /** * Get the customLexiconUrl property: URL of a custom lexicon file for pronunciation customization. - * + * * @return the customLexiconUrl value. */ @Generated @@ -168,7 +168,7 @@ public String getCustomLexiconUrl() { /** * Set the customLexiconUrl property: URL of a custom lexicon file for pronunciation customization. - * + * * @param customLexiconUrl the customLexiconUrl value to set. * @return the AzureAvatarVoiceSyncVoice object itself. */ @@ -180,7 +180,7 @@ public AzureAvatarVoiceSyncVoice setCustomLexiconUrl(String customLexiconUrl) { /** * Get the customTextNormalizationUrl property: URL of a custom text normalization endpoint. - * + * * @return the customTextNormalizationUrl value. */ @Generated @@ -190,7 +190,7 @@ public String getCustomTextNormalizationUrl() { /** * Set the customTextNormalizationUrl property: URL of a custom text normalization endpoint. - * + * * @param customTextNormalizationUrl the customTextNormalizationUrl value to set. * @return the AzureAvatarVoiceSyncVoice object itself. */ @@ -206,7 +206,7 @@ public AzureAvatarVoiceSyncVoice setCustomTextNormalizationUrl(String customText * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent * to British English and the Spanish accent to European Spanish, while TTS can still speak other * languages like French or Chinese with their default accents. - * + * * @return the preferLocales value. */ @Generated @@ -220,7 +220,7 @@ public List getPreferLocales() { * Mexican Spanish for Spanish). Setting this to `["en-GB", "es-ES"]` changes the English accent * to British English and the Spanish accent to European Spanish, while TTS can still speak other * languages like French or Chinese with their default accents. - * + * * @param preferLocales the preferLocales value to set. * @return the AzureAvatarVoiceSyncVoice object itself. */ @@ -237,7 +237,7 @@ public AzureAvatarVoiceSyncVoice setPreferLocales(List preferLocales) { * text content, even if the text is in another language, and TTS will output silence for * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically * detects the language from the text content. - * + * * @return the locale value. */ @Generated @@ -252,7 +252,7 @@ public String getLocale() { * text content, even if the text is in another language, and TTS will output silence for * unsupported languages (e.g., Chinese text with `en-US` locale). If not set, TTS automatically * detects the language from the text content. - * + * * @param locale the locale value to set. * @return the AzureAvatarVoiceSyncVoice object itself. */ @@ -264,7 +264,7 @@ public AzureAvatarVoiceSyncVoice setLocale(String locale) { /** * Get the style property: Speaking style for the voice (e.g., 'cheerful', 'sad'). - * + * * @return the style value. */ @Generated @@ -274,7 +274,7 @@ public String getStyle() { /** * Set the style property: Speaking style for the voice (e.g., 'cheerful', 'sad'). - * + * * @param style the style value to set. * @return the AzureAvatarVoiceSyncVoice object itself. */ @@ -291,7 +291,7 @@ public AzureAvatarVoiceSyncVoice setStyle(String style) { * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). - * + * * @return the pitch value. */ @Generated @@ -306,7 +306,7 @@ public String getPitch() { * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). * Typical values: a named level (`x-low`, `low`, `medium`, `high`, `x-high`, `default`), * a relative change (e.g., `+10%`, `-5%`, `+50Hz`, `-2st`), or an absolute frequency (e.g., `200Hz`). - * + * * @param pitch the pitch value to set. * @return the AzureAvatarVoiceSyncVoice object itself. */ @@ -323,7 +323,7 @@ public AzureAvatarVoiceSyncVoice setPitch(String pitch) { * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). - * + * * @return the rate value. */ @Generated @@ -338,7 +338,7 @@ public String getRate() { * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). * Typical values: a named level (`x-slow`, `slow`, `medium`, `fast`, `x-fast`, `default`), * a relative percentage (e.g., `+20%`, `-10%`), or a non-negative multiplier (e.g., `0.5`, `1.5`). - * + * * @param rate the rate value to set. * @return the AzureAvatarVoiceSyncVoice object itself. */ @@ -355,7 +355,7 @@ public AzureAvatarVoiceSyncVoice setRate(String rate) { * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). - * + * * @return the volume value. */ @Generated @@ -370,7 +370,7 @@ public String getVolume() { * https://learn.microsoft.com/azure/ai-services/speech-service/speech-synthesis-markup-voice#adjust-prosody). * Typical values: a named level (`silent`, `x-soft`, `soft`, `medium`, `loud`, `x-loud`, `default`), * an absolute number from 0.0 to 100.0, or a relative change (e.g., `+10`, `-6dB`). - * + * * @param volume the volume value to set. * @return the AzureAvatarVoiceSyncVoice object itself. */ @@ -404,7 +404,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of AzureAvatarVoiceSyncVoice from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of AzureAvatarVoiceSyncVoice if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. @@ -428,7 +428,6 @@ public static AzureAvatarVoiceSyncVoice fromJson(JsonReader jsonReader) throws I while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("model".equals(fieldName)) { model = PersonalVoiceModels.fromString(reader.getString()); } else if ("type".equals(fieldName)) { @@ -466,7 +465,6 @@ public static AzureAvatarVoiceSyncVoice fromJson(JsonReader jsonReader) throws I deserializedAzureAvatarVoiceSyncVoice.pitch = pitch; deserializedAzureAvatarVoiceSyncVoice.rate = rate; deserializedAzureAvatarVoiceSyncVoice.volume = volume; - return deserializedAzureAvatarVoiceSyncVoice; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEventOutputAudioBufferClear.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEventOutputAudioBufferClear.java index 7be920b04673..ef91bf12ec76 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEventOutputAudioBufferClear.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ClientEventOutputAudioBufferClear.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Fluent; @@ -16,6 +15,7 @@ */ @Fluent public final class ClientEventOutputAudioBufferClear extends ClientEvent { + /* * The type of event. */ @@ -31,7 +31,7 @@ public ClientEventOutputAudioBufferClear() { /** * Get the type property: The type of event. - * + * * @return the type value. */ @Generated @@ -64,7 +64,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ClientEventOutputAudioBufferClear from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ClientEventOutputAudioBufferClear if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. @@ -78,7 +78,6 @@ public static ClientEventOutputAudioBufferClear fromJson(JsonReader jsonReader) while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("event_id".equals(fieldName)) { deserializedClientEventOutputAudioBufferClear.setEventId(reader.getString()); } else if ("type".equals(fieldName)) { @@ -87,7 +86,6 @@ public static ClientEventOutputAudioBufferClear fromJson(JsonReader jsonReader) reader.skipChildren(); } } - return deserializedClientEventOutputAudioBufferClear; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/FileSearchResult.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/FileSearchResult.java index 3c14f5d77623..82bf67b584f9 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/FileSearchResult.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/FileSearchResult.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -18,6 +17,7 @@ */ @Immutable public final class FileSearchResult implements JsonSerializable { + /* * Key-value pairs for filtering file search results. */ @@ -57,7 +57,7 @@ private FileSearchResult() { /** * Get the attributes property: Key-value pairs for filtering file search results. - * + * * @return the attributes value. */ @Generated @@ -67,7 +67,7 @@ public Map getAttributes() { /** * Get the fileId property: The unique ID of the file. - * + * * @return the fileId value. */ @Generated @@ -77,7 +77,7 @@ public String getFileId() { /** * Get the filename property: The name of the file. - * + * * @return the filename value. */ @Generated @@ -87,7 +87,7 @@ public String getFilename() { /** * Get the score property: The relevance score of the file search result. - * + * * @return the score value. */ @Generated @@ -97,7 +97,7 @@ public Double getScore() { /** * Get the text property: The text content of the file that matched the query. - * + * * @return the text value. */ @Generated @@ -122,7 +122,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of FileSearchResult from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of FileSearchResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -135,7 +135,6 @@ public static FileSearchResult fromJson(JsonReader jsonReader) throws IOExceptio while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("attributes".equals(fieldName)) { Map attributes = reader.readMap(reader1 -> reader1.getString()); deserializedFileSearchResult.attributes = attributes; @@ -151,7 +150,6 @@ public static FileSearchResult fromJson(JsonReader jsonReader) throws IOExceptio reader.skipChildren(); } } - return deserializedFileSearchResult; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItem.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItem.java index 6f7796f12854..da1b727fd861 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItem.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItem.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -17,6 +16,7 @@ */ @Immutable public final class ResponseFileSearchCallItem extends SessionResponseItem { + /* * The type property. */ @@ -49,7 +49,7 @@ public final class ResponseFileSearchCallItem extends SessionResponseItem { /** * Creates an instance of ResponseFileSearchCallItem class. - * + * * @param status the status value to set. */ @Generated @@ -59,7 +59,7 @@ private ResponseFileSearchCallItem(ResponseFileSearchCallItemStatus status) { /** * Get the type property: The type property. - * + * * @return the type value. */ @Generated @@ -70,7 +70,7 @@ public ItemType getType() { /** * Get the id property: The unique ID of the file search tool call. - * + * * @return the id value. */ @Generated @@ -81,7 +81,7 @@ public String getId() { /** * Get the queries property: The queries used for the file search. - * + * * @return the queries value. */ @Generated @@ -91,7 +91,7 @@ public List getQueries() { /** * Get the status property: The status of the file search tool call. - * + * * @return the status value. */ @Generated @@ -101,7 +101,7 @@ public ResponseFileSearchCallItemStatus getStatus() { /** * Get the results property: The results of the file search. - * + * * @return the results value. */ @Generated @@ -127,7 +127,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ResponseFileSearchCallItem from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ResponseFileSearchCallItem if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. @@ -146,7 +146,6 @@ public static ResponseFileSearchCallItem fromJson(JsonReader jsonReader) throws while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("object".equals(fieldName)) { object = ResponseItemObject.fromString(reader.getString()); } else if ("status".equals(fieldName)) { @@ -169,7 +168,6 @@ public static ResponseFileSearchCallItem fromJson(JsonReader jsonReader) throws deserializedResponseFileSearchCallItem.id = id; deserializedResponseFileSearchCallItem.queries = queries; deserializedResponseFileSearchCallItem.results = results; - return deserializedResponseFileSearchCallItem; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItemStatus.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItemStatus.java index b4f8106b0d01..3de712fdcf0f 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItemStatus.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseFileSearchCallItemStatus.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -12,6 +11,7 @@ * Defines values for ResponseFileSearchCallItemStatus. */ public final class ResponseFileSearchCallItemStatus extends ExpandableStringEnum { + /** * Static value in_progress for ResponseFileSearchCallItemStatus. */ @@ -44,7 +44,7 @@ public final class ResponseFileSearchCallItemStatus extends ExpandableStringEnum /** * Creates a new instance of ResponseFileSearchCallItemStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -54,7 +54,7 @@ public ResponseFileSearchCallItemStatus() { /** * Creates or finds a ResponseFileSearchCallItemStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ResponseFileSearchCallItemStatus. */ @@ -65,7 +65,7 @@ public static ResponseFileSearchCallItemStatus fromString(String name) { /** * Gets known ResponseFileSearchCallItemStatus values. - * + * * @return known ResponseFileSearchCallItemStatus values. */ @Generated diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItem.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItem.java index f86178473f5a..65354f660511 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItem.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItem.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -16,6 +15,7 @@ */ @Immutable public final class ResponseWebSearchCallItem extends SessionResponseItem { + /* * The type property. */ @@ -36,7 +36,7 @@ public final class ResponseWebSearchCallItem extends SessionResponseItem { /** * Creates an instance of ResponseWebSearchCallItem class. - * + * * @param status the status value to set. */ @Generated @@ -46,7 +46,7 @@ private ResponseWebSearchCallItem(ResponseWebSearchCallItemStatus status) { /** * Get the type property: The type property. - * + * * @return the type value. */ @Generated @@ -57,7 +57,7 @@ public ItemType getType() { /** * Get the id property: The unique ID of the web search tool call. - * + * * @return the id value. */ @Generated @@ -68,7 +68,7 @@ public String getId() { /** * Get the status property: The status of the web search tool call. - * + * * @return the status value. */ @Generated @@ -92,7 +92,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ResponseWebSearchCallItem from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ResponseWebSearchCallItem if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. @@ -109,7 +109,6 @@ public static ResponseWebSearchCallItem fromJson(JsonReader jsonReader) throws I while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("object".equals(fieldName)) { object = ResponseItemObject.fromString(reader.getString()); } else if ("status".equals(fieldName)) { @@ -126,7 +125,6 @@ public static ResponseWebSearchCallItem fromJson(JsonReader jsonReader) throws I deserializedResponseWebSearchCallItem.setObject(object); deserializedResponseWebSearchCallItem.type = type; deserializedResponseWebSearchCallItem.id = id; - return deserializedResponseWebSearchCallItem; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItemStatus.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItemStatus.java index 52196e2487c1..cfc7f98f9592 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItemStatus.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseWebSearchCallItemStatus.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -12,6 +11,7 @@ * Defines values for ResponseWebSearchCallItemStatus. */ public final class ResponseWebSearchCallItemStatus extends ExpandableStringEnum { + /** * Static value in_progress for ResponseWebSearchCallItemStatus. */ @@ -38,7 +38,7 @@ public final class ResponseWebSearchCallItemStatus extends ExpandableStringEnum< /** * Creates a new instance of ResponseWebSearchCallItemStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -48,7 +48,7 @@ public ResponseWebSearchCallItemStatus() { /** * Creates or finds a ResponseWebSearchCallItemStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ResponseWebSearchCallItemStatus. */ @@ -59,7 +59,7 @@ public static ResponseWebSearchCallItemStatus fromString(String name) { /** * Gets known ResponseWebSearchCallItemStatus values. - * + * * @return known ResponseWebSearchCallItemStatus values. */ @Generated diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventOutputAudioBufferCleared.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventOutputAudioBufferCleared.java index d66b20110b42..db8be39b514d 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventOutputAudioBufferCleared.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventOutputAudioBufferCleared.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -16,6 +15,7 @@ */ @Immutable public final class ServerEventOutputAudioBufferCleared extends SessionUpdate { + /* * The type of event. */ @@ -31,7 +31,7 @@ private ServerEventOutputAudioBufferCleared() { /** * Get the type property: The type of event. - * + * * @return the type value. */ @Generated @@ -54,7 +54,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ServerEventOutputAudioBufferCleared from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ServerEventOutputAudioBufferCleared if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. @@ -68,7 +68,6 @@ public static ServerEventOutputAudioBufferCleared fromJson(JsonReader jsonReader while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("event_id".equals(fieldName)) { deserializedServerEventOutputAudioBufferCleared.setEventId(reader.getString()); } else if ("type".equals(fieldName)) { @@ -78,7 +77,6 @@ public static ServerEventOutputAudioBufferCleared fromJson(JsonReader jsonReader reader.skipChildren(); } } - return deserializedServerEventOutputAudioBufferCleared; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseAudioTranscriptAnnotationAdded.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseAudioTranscriptAnnotationAdded.java index af592c976f59..ff8de4caa71f 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseAudioTranscriptAnnotationAdded.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseAudioTranscriptAnnotationAdded.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -17,6 +16,7 @@ */ @Immutable public final class ServerEventResponseAudioTranscriptAnnotationAdded extends SessionUpdate { + /* * The type of event. */ @@ -61,7 +61,7 @@ public final class ServerEventResponseAudioTranscriptAnnotationAdded extends Ses /** * Creates an instance of ServerEventResponseAudioTranscriptAnnotationAdded class. - * + * * @param responseId the responseId value to set. * @param itemId the itemId value to set. * @param outputIndex the outputIndex value to set. @@ -82,7 +82,7 @@ private ServerEventResponseAudioTranscriptAnnotationAdded(String responseId, Str /** * Get the type property: The type of event. - * + * * @return the type value. */ @Generated @@ -93,7 +93,7 @@ public ServerEventType getType() { /** * Get the responseId property: The ID of the response. - * + * * @return the responseId value. */ @Generated @@ -103,7 +103,7 @@ public String getResponseId() { /** * Get the itemId property: The ID of the item. - * + * * @return the itemId value. */ @Generated @@ -113,7 +113,7 @@ public String getItemId() { /** * Get the outputIndex property: The index of the output item in the response. - * + * * @return the outputIndex value. */ @Generated @@ -123,7 +123,7 @@ public int getOutputIndex() { /** * Get the contentIndex property: The index of the content part in the item's content array. - * + * * @return the contentIndex value. */ @Generated @@ -133,7 +133,7 @@ public int getContentIndex() { /** * Get the annotationIndex property: The index of the annotation. - * + * * @return the annotationIndex value. */ @Generated @@ -143,7 +143,7 @@ public int getAnnotationIndex() { /** * Get the annotation property: The annotation object. - * + * * @return the annotation value. */ @Generated @@ -172,7 +172,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ServerEventResponseAudioTranscriptAnnotationAdded from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ServerEventResponseAudioTranscriptAnnotationAdded if the JsonReader was pointing to an * instance of it, or null if it was pointing to JSON null. @@ -193,7 +193,6 @@ public static ServerEventResponseAudioTranscriptAnnotationAdded fromJson(JsonRea while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("event_id".equals(fieldName)) { eventId = reader.getString(); } else if ("response_id".equals(fieldName)) { @@ -220,7 +219,6 @@ public static ServerEventResponseAudioTranscriptAnnotationAdded fromJson(JsonRea annotationIndex, annotation); deserializedServerEventResponseAudioTranscriptAnnotationAdded.setEventId(eventId); deserializedServerEventResponseAudioTranscriptAnnotationAdded.type = type; - return deserializedServerEventResponseAudioTranscriptAnnotationAdded; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallCompleted.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallCompleted.java index 9a2c30c7a1c6..16b76d56af91 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallCompleted.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallCompleted.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -16,6 +15,7 @@ */ @Immutable public final class ServerEventResponseFileSearchCallCompleted extends SessionUpdate { + /* * The type of event. */ @@ -48,7 +48,7 @@ public final class ServerEventResponseFileSearchCallCompleted extends SessionUpd /** * Creates an instance of ServerEventResponseFileSearchCallCompleted class. - * + * * @param responseId the responseId value to set. * @param itemId the itemId value to set. * @param outputIndex the outputIndex value to set. @@ -65,7 +65,7 @@ private ServerEventResponseFileSearchCallCompleted(String responseId, String ite /** * Get the type property: The type of event. - * + * * @return the type value. */ @Generated @@ -76,7 +76,7 @@ public ServerEventType getType() { /** * Get the responseId property: The ID of the response. - * + * * @return the responseId value. */ @Generated @@ -86,7 +86,7 @@ public String getResponseId() { /** * Get the itemId property: The ID of the item. - * + * * @return the itemId value. */ @Generated @@ -96,7 +96,7 @@ public String getItemId() { /** * Get the outputIndex property: The index of the output item in the response. - * + * * @return the outputIndex value. */ @Generated @@ -106,7 +106,7 @@ public int getOutputIndex() { /** * Get the sequenceNumber property: The sequence number of the file search call. - * + * * @return the sequenceNumber value. */ @Generated @@ -132,7 +132,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ServerEventResponseFileSearchCallCompleted from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ServerEventResponseFileSearchCallCompleted if the JsonReader was pointing to an instance * of it, or null if it was pointing to JSON null. @@ -151,7 +151,6 @@ public static ServerEventResponseFileSearchCallCompleted fromJson(JsonReader jso while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("event_id".equals(fieldName)) { eventId = reader.getString(); } else if ("response_id".equals(fieldName)) { @@ -172,7 +171,6 @@ public static ServerEventResponseFileSearchCallCompleted fromJson(JsonReader jso = new ServerEventResponseFileSearchCallCompleted(responseId, itemId, outputIndex, sequenceNumber); deserializedServerEventResponseFileSearchCallCompleted.setEventId(eventId); deserializedServerEventResponseFileSearchCallCompleted.type = type; - return deserializedServerEventResponseFileSearchCallCompleted; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallInProgress.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallInProgress.java index 8d5feef876d9..e38a3b835bfc 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallInProgress.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallInProgress.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -16,6 +15,7 @@ */ @Immutable public final class ServerEventResponseFileSearchCallInProgress extends SessionUpdate { + /* * The type of event. */ @@ -48,7 +48,7 @@ public final class ServerEventResponseFileSearchCallInProgress extends SessionUp /** * Creates an instance of ServerEventResponseFileSearchCallInProgress class. - * + * * @param responseId the responseId value to set. * @param itemId the itemId value to set. * @param outputIndex the outputIndex value to set. @@ -65,7 +65,7 @@ private ServerEventResponseFileSearchCallInProgress(String responseId, String it /** * Get the type property: The type of event. - * + * * @return the type value. */ @Generated @@ -76,7 +76,7 @@ public ServerEventType getType() { /** * Get the responseId property: The ID of the response. - * + * * @return the responseId value. */ @Generated @@ -86,7 +86,7 @@ public String getResponseId() { /** * Get the itemId property: The ID of the item. - * + * * @return the itemId value. */ @Generated @@ -96,7 +96,7 @@ public String getItemId() { /** * Get the outputIndex property: The index of the output item in the response. - * + * * @return the outputIndex value. */ @Generated @@ -106,7 +106,7 @@ public int getOutputIndex() { /** * Get the sequenceNumber property: The sequence number of the file search call. - * + * * @return the sequenceNumber value. */ @Generated @@ -132,7 +132,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ServerEventResponseFileSearchCallInProgress from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ServerEventResponseFileSearchCallInProgress if the JsonReader was pointing to an instance * of it, or null if it was pointing to JSON null. @@ -151,7 +151,6 @@ public static ServerEventResponseFileSearchCallInProgress fromJson(JsonReader js while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("event_id".equals(fieldName)) { eventId = reader.getString(); } else if ("response_id".equals(fieldName)) { @@ -172,7 +171,6 @@ public static ServerEventResponseFileSearchCallInProgress fromJson(JsonReader js = new ServerEventResponseFileSearchCallInProgress(responseId, itemId, outputIndex, sequenceNumber); deserializedServerEventResponseFileSearchCallInProgress.setEventId(eventId); deserializedServerEventResponseFileSearchCallInProgress.type = type; - return deserializedServerEventResponseFileSearchCallInProgress; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallSearching.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallSearching.java index 7c87ee1cf4ca..981d3c8d69a7 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallSearching.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseFileSearchCallSearching.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -16,6 +15,7 @@ */ @Immutable public final class ServerEventResponseFileSearchCallSearching extends SessionUpdate { + /* * The type of event. */ @@ -48,7 +48,7 @@ public final class ServerEventResponseFileSearchCallSearching extends SessionUpd /** * Creates an instance of ServerEventResponseFileSearchCallSearching class. - * + * * @param responseId the responseId value to set. * @param itemId the itemId value to set. * @param outputIndex the outputIndex value to set. @@ -65,7 +65,7 @@ private ServerEventResponseFileSearchCallSearching(String responseId, String ite /** * Get the type property: The type of event. - * + * * @return the type value. */ @Generated @@ -76,7 +76,7 @@ public ServerEventType getType() { /** * Get the responseId property: The ID of the response. - * + * * @return the responseId value. */ @Generated @@ -86,7 +86,7 @@ public String getResponseId() { /** * Get the itemId property: The ID of the item. - * + * * @return the itemId value. */ @Generated @@ -96,7 +96,7 @@ public String getItemId() { /** * Get the outputIndex property: The index of the output item in the response. - * + * * @return the outputIndex value. */ @Generated @@ -106,7 +106,7 @@ public int getOutputIndex() { /** * Get the sequenceNumber property: The sequence number of the file search call. - * + * * @return the sequenceNumber value. */ @Generated @@ -132,7 +132,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ServerEventResponseFileSearchCallSearching from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ServerEventResponseFileSearchCallSearching if the JsonReader was pointing to an instance * of it, or null if it was pointing to JSON null. @@ -151,7 +151,6 @@ public static ServerEventResponseFileSearchCallSearching fromJson(JsonReader jso while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("event_id".equals(fieldName)) { eventId = reader.getString(); } else if ("response_id".equals(fieldName)) { @@ -172,7 +171,6 @@ public static ServerEventResponseFileSearchCallSearching fromJson(JsonReader jso = new ServerEventResponseFileSearchCallSearching(responseId, itemId, outputIndex, sequenceNumber); deserializedServerEventResponseFileSearchCallSearching.setEventId(eventId); deserializedServerEventResponseFileSearchCallSearching.type = type; - return deserializedServerEventResponseFileSearchCallSearching; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseVideoDelta.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseVideoDelta.java index 1fe45a68e82b..18b172acf841 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseVideoDelta.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseVideoDelta.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -16,6 +15,7 @@ */ @Immutable public final class ServerEventResponseVideoDelta extends SessionUpdate { + /* * The type of event. */ @@ -42,7 +42,7 @@ public final class ServerEventResponseVideoDelta extends SessionUpdate { /** * Creates an instance of ServerEventResponseVideoDelta class. - * + * * @param outputIndex the outputIndex value to set. * @param codec the codec value to set. * @param delta the delta value to set. @@ -56,7 +56,7 @@ private ServerEventResponseVideoDelta(int outputIndex, String codec, String delt /** * Get the type property: The type of event. - * + * * @return the type value. */ @Generated @@ -67,7 +67,7 @@ public ServerEventType getType() { /** * Get the outputIndex property: The index of the output item in the response. - * + * * @return the outputIndex value. */ @Generated @@ -77,7 +77,7 @@ public int getOutputIndex() { /** * Get the codec property: The codec used for the video data. - * + * * @return the codec value. */ @Generated @@ -87,7 +87,7 @@ public String getCodec() { /** * Get the delta property: The base64-encoded video frame data. - * + * * @return the delta value. */ @Generated @@ -112,7 +112,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ServerEventResponseVideoDelta from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ServerEventResponseVideoDelta if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. @@ -130,7 +130,6 @@ public static ServerEventResponseVideoDelta fromJson(JsonReader jsonReader) thro while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("event_id".equals(fieldName)) { eventId = reader.getString(); } else if ("output_index".equals(fieldName)) { @@ -149,7 +148,6 @@ public static ServerEventResponseVideoDelta fromJson(JsonReader jsonReader) thro = new ServerEventResponseVideoDelta(outputIndex, codec, delta); deserializedServerEventResponseVideoDelta.setEventId(eventId); deserializedServerEventResponseVideoDelta.type = type; - return deserializedServerEventResponseVideoDelta; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallCompleted.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallCompleted.java index 4c733df70713..04592ec6954a 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallCompleted.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallCompleted.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -16,6 +15,7 @@ */ @Immutable public final class ServerEventResponseWebSearchCallCompleted extends SessionUpdate { + /* * The type of event. */ @@ -48,7 +48,7 @@ public final class ServerEventResponseWebSearchCallCompleted extends SessionUpda /** * Creates an instance of ServerEventResponseWebSearchCallCompleted class. - * + * * @param responseId the responseId value to set. * @param itemId the itemId value to set. * @param outputIndex the outputIndex value to set. @@ -65,7 +65,7 @@ private ServerEventResponseWebSearchCallCompleted(String responseId, String item /** * Get the type property: The type of event. - * + * * @return the type value. */ @Generated @@ -76,7 +76,7 @@ public ServerEventType getType() { /** * Get the responseId property: The ID of the response. - * + * * @return the responseId value. */ @Generated @@ -86,7 +86,7 @@ public String getResponseId() { /** * Get the itemId property: The ID of the item. - * + * * @return the itemId value. */ @Generated @@ -96,7 +96,7 @@ public String getItemId() { /** * Get the outputIndex property: The index of the output item in the response. - * + * * @return the outputIndex value. */ @Generated @@ -106,7 +106,7 @@ public int getOutputIndex() { /** * Get the sequenceNumber property: The sequence number of the web search call. - * + * * @return the sequenceNumber value. */ @Generated @@ -132,7 +132,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ServerEventResponseWebSearchCallCompleted from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ServerEventResponseWebSearchCallCompleted if the JsonReader was pointing to an instance of * it, or null if it was pointing to JSON null. @@ -151,7 +151,6 @@ public static ServerEventResponseWebSearchCallCompleted fromJson(JsonReader json while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("event_id".equals(fieldName)) { eventId = reader.getString(); } else if ("response_id".equals(fieldName)) { @@ -172,7 +171,6 @@ public static ServerEventResponseWebSearchCallCompleted fromJson(JsonReader json = new ServerEventResponseWebSearchCallCompleted(responseId, itemId, outputIndex, sequenceNumber); deserializedServerEventResponseWebSearchCallCompleted.setEventId(eventId); deserializedServerEventResponseWebSearchCallCompleted.type = type; - return deserializedServerEventResponseWebSearchCallCompleted; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallInProgress.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallInProgress.java index 5069b084785a..703352f7057c 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallInProgress.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallInProgress.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -16,6 +15,7 @@ */ @Immutable public final class ServerEventResponseWebSearchCallInProgress extends SessionUpdate { + /* * The type of event. */ @@ -48,7 +48,7 @@ public final class ServerEventResponseWebSearchCallInProgress extends SessionUpd /** * Creates an instance of ServerEventResponseWebSearchCallInProgress class. - * + * * @param responseId the responseId value to set. * @param itemId the itemId value to set. * @param outputIndex the outputIndex value to set. @@ -65,7 +65,7 @@ private ServerEventResponseWebSearchCallInProgress(String responseId, String ite /** * Get the type property: The type of event. - * + * * @return the type value. */ @Generated @@ -76,7 +76,7 @@ public ServerEventType getType() { /** * Get the responseId property: The ID of the response. - * + * * @return the responseId value. */ @Generated @@ -86,7 +86,7 @@ public String getResponseId() { /** * Get the itemId property: The ID of the item. - * + * * @return the itemId value. */ @Generated @@ -96,7 +96,7 @@ public String getItemId() { /** * Get the outputIndex property: The index of the output item in the response. - * + * * @return the outputIndex value. */ @Generated @@ -106,7 +106,7 @@ public int getOutputIndex() { /** * Get the sequenceNumber property: The sequence number of the web search call. - * + * * @return the sequenceNumber value. */ @Generated @@ -132,7 +132,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ServerEventResponseWebSearchCallInProgress from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ServerEventResponseWebSearchCallInProgress if the JsonReader was pointing to an instance * of it, or null if it was pointing to JSON null. @@ -151,7 +151,6 @@ public static ServerEventResponseWebSearchCallInProgress fromJson(JsonReader jso while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("event_id".equals(fieldName)) { eventId = reader.getString(); } else if ("response_id".equals(fieldName)) { @@ -172,7 +171,6 @@ public static ServerEventResponseWebSearchCallInProgress fromJson(JsonReader jso = new ServerEventResponseWebSearchCallInProgress(responseId, itemId, outputIndex, sequenceNumber); deserializedServerEventResponseWebSearchCallInProgress.setEventId(eventId); deserializedServerEventResponseWebSearchCallInProgress.type = type; - return deserializedServerEventResponseWebSearchCallInProgress; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallSearching.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallSearching.java index 2fc86b20e452..00e5ff81a63a 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallSearching.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseWebSearchCallSearching.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -16,6 +15,7 @@ */ @Immutable public final class ServerEventResponseWebSearchCallSearching extends SessionUpdate { + /* * The type of event. */ @@ -48,7 +48,7 @@ public final class ServerEventResponseWebSearchCallSearching extends SessionUpda /** * Creates an instance of ServerEventResponseWebSearchCallSearching class. - * + * * @param responseId the responseId value to set. * @param itemId the itemId value to set. * @param outputIndex the outputIndex value to set. @@ -65,7 +65,7 @@ private ServerEventResponseWebSearchCallSearching(String responseId, String item /** * Get the type property: The type of event. - * + * * @return the type value. */ @Generated @@ -76,7 +76,7 @@ public ServerEventType getType() { /** * Get the responseId property: The ID of the response. - * + * * @return the responseId value. */ @Generated @@ -86,7 +86,7 @@ public String getResponseId() { /** * Get the itemId property: The ID of the item. - * + * * @return the itemId value. */ @Generated @@ -96,7 +96,7 @@ public String getItemId() { /** * Get the outputIndex property: The index of the output item in the response. - * + * * @return the outputIndex value. */ @Generated @@ -106,7 +106,7 @@ public int getOutputIndex() { /** * Get the sequenceNumber property: The sequence number of the web search call. - * + * * @return the sequenceNumber value. */ @Generated @@ -132,7 +132,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ServerEventResponseWebSearchCallSearching from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ServerEventResponseWebSearchCallSearching if the JsonReader was pointing to an instance of * it, or null if it was pointing to JSON null. @@ -151,7 +151,6 @@ public static ServerEventResponseWebSearchCallSearching fromJson(JsonReader json while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("event_id".equals(fieldName)) { eventId = reader.getString(); } else if ("response_id".equals(fieldName)) { @@ -172,7 +171,6 @@ public static ServerEventResponseWebSearchCallSearching fromJson(JsonReader json = new ServerEventResponseWebSearchCallSearching(responseId, itemId, outputIndex, sequenceNumber); deserializedServerEventResponseWebSearchCallSearching.setEventId(eventId); deserializedServerEventResponseWebSearchCallSearching.type = type; - return deserializedServerEventResponseWebSearchCallSearching; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToIdle.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToIdle.java index 9f969a140bef..d6dd3be767ac 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToIdle.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToIdle.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -16,6 +15,7 @@ */ @Immutable public final class ServerEventSessionAvatarSwitchToIdle extends SessionUpdate { + /* * The type of event. */ @@ -37,7 +37,7 @@ private ServerEventSessionAvatarSwitchToIdle() { /** * Get the type property: The type of event. - * + * * @return the type value. */ @Generated @@ -48,7 +48,7 @@ public ServerEventType getType() { /** * Get the turnId property: The ID of the turn associated with the avatar state change. - * + * * @return the turnId value. */ @Generated @@ -71,7 +71,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ServerEventSessionAvatarSwitchToIdle from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ServerEventSessionAvatarSwitchToIdle if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. @@ -85,7 +85,6 @@ public static ServerEventSessionAvatarSwitchToIdle fromJson(JsonReader jsonReade while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("event_id".equals(fieldName)) { deserializedServerEventSessionAvatarSwitchToIdle.setEventId(reader.getString()); } else if ("type".equals(fieldName)) { @@ -97,7 +96,6 @@ public static ServerEventSessionAvatarSwitchToIdle fromJson(JsonReader jsonReade reader.skipChildren(); } } - return deserializedServerEventSessionAvatarSwitchToIdle; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToSpeaking.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToSpeaking.java index e70563f1325f..8819f0b56748 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToSpeaking.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventSessionAvatarSwitchToSpeaking.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -16,6 +15,7 @@ */ @Immutable public final class ServerEventSessionAvatarSwitchToSpeaking extends SessionUpdate { + /* * The type of event. */ @@ -37,7 +37,7 @@ private ServerEventSessionAvatarSwitchToSpeaking() { /** * Get the type property: The type of event. - * + * * @return the type value. */ @Generated @@ -48,7 +48,7 @@ public ServerEventType getType() { /** * Get the turnId property: The ID of the turn associated with the avatar state change. - * + * * @return the turnId value. */ @Generated @@ -71,7 +71,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ServerEventSessionAvatarSwitchToSpeaking from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ServerEventSessionAvatarSwitchToSpeaking if the JsonReader was pointing to an instance of * it, or null if it was pointing to JSON null. @@ -85,7 +85,6 @@ public static ServerEventSessionAvatarSwitchToSpeaking fromJson(JsonReader jsonR while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("event_id".equals(fieldName)) { deserializedServerEventSessionAvatarSwitchToSpeaking.setEventId(reader.getString()); } else if ("type".equals(fieldName)) { @@ -97,7 +96,6 @@ public static ServerEventSessionAvatarSwitchToSpeaking fromJson(JsonReader jsonR reader.skipChildren(); } } - return deserializedServerEventSessionAvatarSwitchToSpeaking; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionIncludeOption.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionIncludeOption.java index 7736685a50b6..4f1c96cada77 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionIncludeOption.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionIncludeOption.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -12,6 +11,7 @@ * Options for what additional data to include in session responses. */ public final class SessionIncludeOption extends ExpandableStringEnum { + /** * Include log probabilities for input audio transcription. */ @@ -34,7 +34,7 @@ public final class SessionIncludeOption extends ExpandableStringEnum { + /* * Offset from the start of the audio in milliseconds. */ @@ -56,7 +56,7 @@ public final class TranscriptionPhrase implements JsonSerializable getWords() { /** * Get the locale property: The locale of the transcription (e.g., 'en-US'). - * + * * @return the locale value. */ @Generated @@ -120,7 +120,7 @@ public String getLocale() { /** * Get the confidence property: The confidence score of the transcription. - * + * * @return the confidence value. */ @Generated @@ -146,7 +146,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TranscriptionPhrase from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TranscriptionPhrase if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -165,7 +165,6 @@ public static TranscriptionPhrase fromJson(JsonReader jsonReader) throws IOExcep while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("offset_milliseconds".equals(fieldName)) { offsetMilliseconds = reader.getInt(); } else if ("duration_milliseconds".equals(fieldName)) { @@ -187,7 +186,6 @@ public static TranscriptionPhrase fromJson(JsonReader jsonReader) throws IOExcep deserializedTranscriptionPhrase.words = words; deserializedTranscriptionPhrase.locale = locale; deserializedTranscriptionPhrase.confidence = confidence; - return deserializedTranscriptionPhrase; }); } diff --git a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/TranscriptionWord.java b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/TranscriptionWord.java index c53c0f0bf17e..8c89bf7e2fc8 100644 --- a/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/TranscriptionWord.java +++ b/sdk/voicelive/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/TranscriptionWord.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.voicelive.models; import com.azure.core.annotation.Generated; @@ -17,6 +16,7 @@ */ @Immutable public final class TranscriptionWord implements JsonSerializable { + /* * The transcribed word text. */ @@ -37,7 +37,7 @@ public final class TranscriptionWord implements JsonSerializable