Open
Conversation
Minimal POC using Amazon Nova Sonic v1 via pure WebSocket (no LiveKit/WebRTC). Stack: AgentCore Runtime + Strands BidiAgent + vanilla JS frontend with AudioWorklet-based capture/playback and real-time transcription.
- Update model ID from amazon.nova-sonic-v1:0 to amazon.nova-2-sonic-v1:0 - Extract all configurable parameters to constants at top of agent.py (voice, model, sample rates, system prompt, endpointing sensitivity) - Add turn detection support (Nova 2 Sonic feature) - Fix frontend error display: preserve error status on WebSocket close instead of overwriting with "Disconnected" - Update naming from "Nova Sonic" to "Nova 2 Sonic" across all files - Update README with configurable constants table and new regions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nova-sonic-ws-poc/: minimal bidirectional voice agent using Amazon Nova Sonic v1 via pure WebSocket (no LiveKit/WebRTC)BidiAgentwith custom WebSocket I/O bridge (agent.py, 288 lines)web/index.html)Test plan
uv syncinstalls dependencies without errorsAWS_PROFILE=<profile> uv run python agent.pystarts server on:8080/pingreturns healthyhttp://localhost:8080in Chrome, connect, and verify bidirectional audio streaming