[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FCZ592S923A9GC9FQRM0YF":3,"skill-same:01M6FCZ592S923A9GC9FQRM0YF":49},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":22,"linkOnly":23,"markdownContent":24,"markdownBody":24,"frontMatter":25,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M6FCZ592S923A9GC9FQRM0YF","azure-ai-voicelive-java",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fmicrosoft\u002Fskills\u002Fazure-ai-voicelive-java\u002FSKILL.md",[],[18,19,20,21],"azure ai","azure","azure ai voicelive java","java","2026-11-10 10:12:30",false,"# Azure AI VoiceLive SDK for Java\n\nReal-time, bidirectional voice conversations with AI assistants using WebSocket technology.\n\n## Installation\n\n```xml\n\u003Cdependency>\n    \u003CgroupId>com.azure\u003C\u002FgroupId>\n    \u003CartifactId>azure-ai-voicelive\u003C\u002FartifactId>\n    \u003Cversion>1.0.0-beta.2\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\n\n## Environment Variables\n\n```bash\nAZURE_VOICELIVE_ENDPOINT=https:\u002F\u002F\u003Cresource>.openai.azure.com\u002F\nAZURE_VOICELIVE_API_KEY=\u003Cyour-api-key>\n```\n\n## Authentication\n\n### API Key\n\n```java\nimport com.azure.ai.voicelive.VoiceLiveAsyncClient;\nimport com.azure.ai.voicelive.VoiceLiveClientBuilder;\nimport com.azure.core.credential.AzureKeyCredential;\n\nVoiceLiveAsyncClient client = new VoiceLiveClientBuilder()\n    .endpoint(System.getenv(\"AZURE_VOICELIVE_ENDPOINT\"))\n    .credential(new AzureKeyCredential(System.getenv(\"AZURE_VOICELIVE_API_KEY\")))\n    .buildAsyncClient();\n```\n\n### DefaultAzureCredential (Recommended)\n\n```java\nimport com.azure.identity.DefaultAzureCredentialBuilder;\n\nVoiceLiveAsyncClient client = new VoiceLiveClientBuilder()\n    .endpoint(System.getenv(\"AZURE_VOICELIVE_ENDPOINT\"))\n    .credential(new DefaultAzureCredentialBuilder().build())\n    .buildAsyncClient();\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| `VoiceLiveAsyncClient` | Main entry point for voice sessions |\n| `VoiceLiveSessionAsyncClient` | Active WebSocket connection for streaming |\n| `VoiceLiveSessionOptions` | Configuration for session behavior |\n\n### Audio Requirements\n\n- **Sample Rate**: 24kHz (24000 Hz)\n- **Bit Depth**: 16-bit PCM\n- **Channels**: Mono (1 channel)\n- **Format**: Signed PCM, little-endian\n\n## Core Workflow\n\n### 1. Start Session\n\n```java\nimport reactor.core.publisher.Mono;\n\nclient.startSession(\"gpt-4o-realtime-preview\")\n    .flatMap(session -> {\n        System.out.println(\"Session started\");\n        \n        \u002F\u002F Subscribe to events\n        session.receiveEvents()\n            .subscribe(\n                event -> System.out.println(\"Event: \" + event.getType()),\n                error -> System.err.println(\"Error: \" + error.getMessage())\n            );\n        \n        return Mono.just(session);\n    })\n    .block();\n```\n\n### 2. Configure Session Options\n\n```java\nimport com.azure.ai.voicelive.models.*;\nimport java.util.Arrays;\n\nServerVadTurnDetection turnDetection = new ServerVadTurnDetection()\n    .setThreshold(0.5)                    \u002F\u002F Sensitivity (0.0-1.0)\n    .setPrefixPaddingMs(300)              \u002F\u002F Audio before speech\n    .setSilenceDurationMs(500)            \u002F\u002F Silence to end turn\n    .setInterruptResponse(true)           \u002F\u002F Allow interruptions\n    .setAutoTruncate(true)\n    .setCreateResponse(true);\n\nAudioInputTranscriptionOptions transcription = new AudioInputTranscriptionOptions(\n    AudioInputTranscriptionOptionsModel.WHISPER_1);\n\nVoiceLiveSessionOptions options = new VoiceLiveSessionOptions()\n    .setInstructions(\"You are a helpful AI voice assistant.\")\n    .setVoice(BinaryData.fromObject(new OpenAIVoice(OpenAIVoiceName.ALLOY)))\n    .setModalities(Arrays.asList(InteractionModality.TEXT, InteractionModality.AUDIO))\n    .setInputAudioFormat(InputAudioFormat.PCM16)\n    .setOutputAudioFormat(OutputAudioFormat.PCM16)\n    .setInputAudioSamplingRate(24000)\n    .setInputAudioNoiseReduction(new AudioNoiseReduction(AudioNoiseReductionType.NEAR_FIELD))\n    .setInputAudioEchoCancellation(new AudioEchoCancellation())\n    .setInputAudioTranscription(transcription)\n    .setTurnDetection(turnDetection);\n\n\u002F\u002F Send configuration\nClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(options);\nsession.sendEvent(updateEvent).subscribe();\n```\n\n### 3. Send Audio Input\n\n```java\nbyte[] audioData = readAudioChunk(); \u002F\u002F Your PCM16 audio data\nsession.sendInputAudio(BinaryData.fromBytes(audioData)).subscribe();\n```\n\n### 4. Handle Events\n\n```java\nsession.receiveEvents().subscribe(event -> {\n    ServerEventType eventType = event.getType();\n    \n    if (ServerEventType.SESSION_CREATED.equals(eventType)) {\n        System.out.println(\"Session created\");\n    } else if (ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STARTED.equals(eventType)) {\n        System.out.println(\"User started speaking\");\n    } else if (ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STOPPED.equals(eventType)) {\n        System.out.println(\"User stopped speaking\");\n    } else if (ServerEventType.RESPONSE_AUDIO_DELTA.equals(eventType)) {\n        if (event instanceof SessionUpdateResponseAudioDelta) {\n            SessionUpdateResponseAudioDelta audioEvent = (SessionUpdateResponseAudioDelta) event;\n            playAudioChunk(audioEvent.getDelta());\n        }\n    } else if (ServerEventType.RESPONSE_DONE.equals(eventType)) {\n        System.out.println(\"Response complete\");\n    } else if (ServerEventType.ERROR.equals(eventType)) {\n        if (event instanceof SessionUpdateError) {\n            SessionUpdateError errorEvent = (SessionUpdateError) event;\n            System.err.println(\"Error: \" + errorEvent.getError().getMessage());\n        }\n    }\n});\n```\n\n## Voice Configuration\n\n### OpenAI Voices\n\n```java\n\u002F\u002F Available: ALLOY, ASH, BALLAD, CORAL, ECHO, SAGE, SHIMMER, VERSE\nVoiceLiveSessionOptions options = new VoiceLiveSessionOptions()\n    .setVoice(BinaryData.fromObject(new OpenAIVoice(OpenAIVoiceName.ALLOY)));\n```\n\n### Azure Voices\n\n```java\n\u002F\u002F Azure Standard Voice\noptions.setVoice(BinaryData.fromObject(new AzureStandardVoice(\"en-US-JennyNeural\")));\n\n\u002F\u002F Azure Custom Voice\noptions.setVoice(BinaryData.fromObject(new AzureCustomVoice(\"myVoice\", \"endpointId\")));\n\n\u002F\u002F Azure Personal Voice\noptions.setVoice(BinaryData.fromObject(\n    new AzurePersonalVoice(\"speakerProfileId\", PersonalVoiceModels.PHOENIX_LATEST_NEURAL)));\n```\n\n## Function Calling\n\n```java\nVoiceLiveFunctionDefinition weatherFunction = new VoiceLiveFunctionDefinition(\"get_weather\")\n    .setDescription(\"Get current weather for a location\")\n    .setParameters(BinaryData.fromObject(parametersSchema));\n\nVoiceLiveSessionOptions options = new VoiceLiveSessionOptions()\n    .setTools(Arrays.asList(weatherFunction))\n    .setInstructions(\"You have access to weather information.\");\n```\n\n## Best Practices\n\n1. **Use async client** — VoiceLive requires reactive patterns\n2. **Configure turn detection** for natural conversation flow\n3. **Enable noise reduction** for better speech recognition\n4. **Handle interruptions** gracefully with `setInterruptResponse(true)`\n5. **Use Whisper transcription** for input audio transcription\n6. **Close sessions** properly when conversation ends\n\n## Error Handling\n\n```java\nsession.receiveEvents()\n    .doOnError(error -> System.err.println(\"Connection error: \" + error.getMessage()))\n    .onErrorResume(error -> {\n        \u002F\u002F Attempt reconnection or cleanup\n        return Flux.empty();\n    })\n    .subscribe();\n```\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| GitHub Source | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-java\u002Ftree\u002Fmain\u002Fsdk\u002Fai\u002Fazure-ai-voicelive |\n| Samples | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-java\u002Ftree\u002Fmain\u002Fsdk\u002Fai\u002Fazure-ai-voicelive\u002Fsrc\u002Fsamples |\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fmicrosoft\u002Fskills\u002Fazure-ai-voicelive-java",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill azure-ai-voicelive-java",{"tool":41,"command":42},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill azure-ai-voicelive-java",{"tool":44,"command":45},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill azure-ai-voicelive-java","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fmicrosoft\u002Fskills\u002Fazure-ai-voicelive-java\u002FSKILL.md",true,[],[50,59,68,77,83,89],{"skillNo":51,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":22},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[56,57,58],"model","model hierarchy","model hierarchy skill",{"skillNo":60,"name":61,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":22},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[65,66,67],"MCP","zoom","zoom mcp",{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":22},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[74,75,76,66],"sdk","zoom apps sdk","apps",{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":22},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[79],{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":22},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[85],{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":22},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[91]]