LLM Skills
~/catalog/audio & voice//SKILL
Audio & voiceGitHub source

Azure for Voicelive Java

/SKILL

SDK Azure AI VoiceLive for Java. Real-time, two-way voice conversations with AI assistants via WebSocket.

sickn33sickn33
45.0k
May 22, 2026
MIT License
// skill content

--- name: azure-ai-voicelive-java description: Azure AI VoiceLive SDK for Java. Real-time, bidirectional voice conversations with AI assistants using WebSocket. risk: unknown source: community date_added: '2026-02-27' --- # Azure AI VoiceLive SDK for Java Real-time, bidirectional voice conversations with AI assistants using WebSocket technology. ## Installation ``xml <dependency> <groupId>com.azure</groupId> <artifactId>azure-ai-voicelive</artifactId> <version>1.0.0-beta.2</version> </dependency> ` ## Environment Variables `bash AZURE_VOICELIVE_ENDPOINT=https://<resource>.openai.azure.com/ AZURE_VOICELIVE_API_KEY=<your-api-key> ` ## Authentication ### API Key `java import com.azure.ai.voicelive.VoiceLiveAsyncClient; import com.azure.ai.voicelive.VoiceLiveClientBuilder; import com.azure.core.credential.AzureKeyCredential; VoiceLiveAsyncClient client = new VoiceLiveClientBuilder() .endpoint(System.getenv("AZURE_VOICELIVE_ENDPOINT")) .credential(new AzureKeyCredential(System.getenv("AZURE_VOICELIVE_API_KEY"))) .buildAsyncClient(); ` ### DefaultAzureCredential (Recommended) `java import com.azure.identity.DefaultAzureCredentialBuilder; VoiceLiveAsyncClient client = new VoiceLiveClientBuilder() .endpoint(System.getenv("AZURE_VOICELIVE_ENDPOINT")) .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); ` ## Key Concepts | Concept | Description | |---------|-------------| | VoiceLiveAsyncClient | Main entry point for voice sessions | | VoiceLiveSessionAsyncClient | Active WebSocket connection for streaming | | VoiceLiveSessionOptions | Configuration for session behavior | ### Audio Requirements - **Sample Rate**: 24kHz (24000 Hz) - **Bit Depth**: 16-bit PCM - **Channels**: Mono (1 channel) - **Format**: Signed PCM, little-endian ## Core Workflow ### 1. Start Session `java import reactor.core.publisher.Mono; client.startSession("gpt-4o-realtime-preview") .flatMap(session -> { System.out.println("Session started"); // Subscribe to events session.receiveEvents() .subscribe( event -> System.out.println("Event: " + event.getType()), error -> System.err.println("Error: " + error.getMessage()) ); return Mono.just(session); }) .block(); ` ### 2. Configure Session Options `java import com.azure.ai.voicelive.models.*; import java.util.Arrays; ServerVadTurnDetection turnDetection = new ServerVadTurnDetection() .setThreshold(0.5) // Sensitivity (0.0-1.0) .setPrefixPaddingMs(300) // Audio before speech .setSilenceDurationMs(500) // Silence to end turn .setInterruptResponse(true) // Allow interruptions .setAutoTruncate(true) .setCreateResponse(true); AudioInputTranscriptionOptions transcription = new AudioInputTranscriptionOptions( AudioInputTranscriptionOptionsModel.WHISPER_1); VoiceLiveSessionOptions options = new VoiceLiveSessionOptions() .setInstructions("You are a helpful AI voice assistant.") .setVoice(BinaryData.fromObject(new OpenAIVoice(OpenAIVoiceName.ALLOY))) .setModalities(Arrays.asList(InteractionModality.TEXT, InteractionModality.AUDIO)) .setInputAudioFormat(InputAudioFormat.PCM16) .setOutputAudioFormat(OutputAudioFormat.PCM16) .setInputAudioSamplingRate(24000) .setInputAudioNoiseReduction(new AudioNoiseReduction(AudioNoiseReductionType.NEAR_FIELD)) .setInputAudioEchoCancellation(new AudioEchoCancellation()) .setInputAudioTranscription(transcription) .setTurnDetection(turnDetection); // Send configuration ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(options); session.sendEvent(updateEvent).subscribe(); ` ### 3. Send Audio Input `java byte[] audioData = readAudioChunk(); // Your PCM16 audio data session.sendInputAudio(BinaryData.fromBytes(audioData)).subscribe(); ` ### 4. Handle Events ``java session. receiveEvents().subscribe(event -> { ServerEventType eventType = event. getType(); if (ServerEventType. SESSION_CREATED.equals(eventType)) {

// original public source
sickn33/antigravity-awesome-skills
/skills/azure-ai-voicelive-java/SKILL.md
License: MIT License
Independent project, not affiliated with Anthropic. This skill remains the property of its original author.
// install this skill
Paste this command in your terminal at the root of your project:
mkdir -p .claude/commands && curl -o ".claude/commands/SKILL.md" "https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/azure-ai-voicelive-java/SKILL.md"
Then in Claude Code, type /SKILL to activate it.
open_in_newOpen original source
// save
Save available after sign in.
loginSign in to save
// information
Creatorsickn33
Stars 45.0k
LicenseMIT License
UpdatedMay 22, 2026
Format.md
AccessFree
// similar

Skills Audio & voice

View allarrow_forward