Skip to content

feat: Nova Sonic WebSocket POC#38

Open
Alx-binbash wants to merge 5 commits intomasterfrom
feat/nova-sonic-ws-poc
Open

feat: Nova Sonic WebSocket POC#38
Alx-binbash wants to merge 5 commits intomasterfrom
feat/nova-sonic-ws-poc

Conversation

@Alx-binbash
Copy link
Copy Markdown
Contributor

Summary

  • Adds nova-sonic-ws-poc/: minimal bidirectional voice agent using Amazon Nova Sonic v1 via pure WebSocket (no LiveKit/WebRTC)
  • Server: AgentCore Runtime + Strands BidiAgent with custom WebSocket I/O bridge (agent.py, 288 lines)
  • Client: vanilla JS frontend with AudioWorklet capture (48→16kHz), 24kHz playback, real-time transcription, push-to-talk & continuous modes (web/index.html)
  • Includes CLAUDE.md and README with architecture docs

Test plan

  • uv sync installs dependencies without errors
  • AWS_PROFILE=<profile> uv run python agent.py starts server on :8080
  • /ping returns healthy
  • Open http://localhost:8080 in Chrome, connect, and verify bidirectional audio streaming
  • Verify push-to-talk and continuous mode both work
  • Verify transcripts appear in real time
  • Verify session timeout at 8 minutes with reconnect option

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.
@Alx-binbash Alx-binbash requested a review from chelorope March 19, 2026 15:53
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant