Replace AssemblyAI STT with Inworld STT API#55
Merged
Conversation
- Create InworldSTTNode using Inworld's REST API (POST /stt/v1/transcribe) with energy-based VAD for end-of-turn detection - Remove assembly-ai-stt-ws-node.ts and its WebSocket-based streaming logic - Update ConversationGraphWrapper to hold inworldSTTNode reference - Update ConversationGraphConfig to accept inworldApiKey (was assemblyAIApiKey) - Replace ASSEMBLY_AI_API_KEY env var with INWORLD_API_KEY in graph-service, .env.example, and render.yaml (single key for all Inworld services) - Replace AssemblyAI turn-detection presets in server config with equivalent Inworld STT VAD presets (silenceThresholdMs / minSpeechMs / energyThreshold) - Rename ASSEMBLY_AI_EAGERNESS env var to INWORLD_STT_EAGERNESS - Update comments in connection-manager, transcript-extractor-node, server, and audio-processor.js to reflect the new STT provider https://claude.ai/code/session_01EDqcCeQHNj2f2TVeFb5Dxh
|
|
- Fix prettier line-length formatting for Buffer.from() call in inworld-stt-node.ts - Remove unused samplesPerMs variable in inworld-stt-node.ts - Fix prettier line-length formatting for description string in server.ts https://claude.ai/code/session_01EDqcCeQHNj2f2TVeFb5Dxh
There was a problem hiding this comment.
Pull request overview
This PR migrates the backend speech-to-text pipeline from AssemblyAI’s streaming WebSocket node to a new Inworld STT REST-based node with energy-based VAD, and removes AssemblyAI-specific configuration/env keys accordingly.
Changes:
- Removed AssemblyAI env/config usage and updated logs/comments to reference Inworld STT.
- Added
InworldSTTNode(REST transcription + energy-based VAD) and rewired the conversation graph to use it. - Updated server config to provide VAD “eagerness” presets for the new STT approach.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| render.yaml | Removes ASSEMBLY_AI_API_KEY from Render env vars. |
| frontend/public/audio-processor.js | Updates comments to reflect Inworld STT + energy-based VAD chunking rationale. |
| backend/src/services/graph-service.ts | Switches graph init env validation from AssemblyAI key to INWORLD_API_KEY. |
| backend/src/server.ts | Updates documentation/log strings to reflect Inworld STT usage. |
| backend/src/helpers/connection-manager.ts | Updates STT naming + changes session teardown behavior for STT cleanup. |
| backend/src/graphs/nodes/transcript-extractor-node.ts | Updates node documentation to reference Inworld STT output. |
| backend/src/graphs/nodes/inworld-stt-node.ts | New node implementing energy-based VAD + REST transcription. |
| backend/src/graphs/nodes/assembly-ai-stt-ws-node.ts | Removes the AssemblyAI WebSocket STT node implementation. |
| backend/src/graphs/conversation-graph.ts | Replaces AssemblyAI STT node with InworldSTTNode and updates graph wiring/config. |
| backend/src/config/server.ts | Replaces AssemblyAI turn-detection presets with Inworld STT VAD presets and env var. |
| backend/.env.example | Removes ASSEMBLY_AI_API_KEY from the example env file. |
Files not reviewed (1)
- backend/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cherylafichter
pushed a commit
that referenced
this pull request
Mar 12, 2026
- Add 30s timeout protection to callInworldSTT to prevent network stalls - Fix session lifecycle: remove shared STT node destruction from ConnectionManager.destroy() since the node is shared across sessions https://claude.ai/code/session_01TJxsn7u4AVgj7UHWPffSha
- Add AbortController with 15s timeout to callInworldSTT fetch to prevent indefinite stalls on network/endpoint hangs - Remove inworldSTTNode.destroy() from ConnectionManager.destroy(): the graph wrapper is a singleton shared across sessions, so tearing down the STT node during per-session cleanup would disrupt other active sessions https://claude.ai/code/session_01EDqcCeQHNj2f2TVeFb5Dxh
…method - Add src/__tests__/graphs/inworld-stt-node.test.ts with 16 tests covering: constructor validation, text-input bypass, VAD end-of-turn detection, onSpeechDetected callback, STT API error handling, 15s AbortController timeout, pendingTranscript stitching, session validation, metadata fields, and iteration tracking - Remove never-called private sendPartialTranscript method (fixes TS6133) - All 57 backend tests pass; tsc --noEmit clean https://claude.ai/code/session_01EDqcCeQHNj2f2TVeFb5Dxh
- Add backend/.prettierignore to exclude dist/ and node_modules/ - Replace all no-explicit-any in inworld-stt-node.test.ts with proper types - Fix (message.data as any) in websocket-handler.ts with typed DataWithMessages Made-with: Cursor
Gugic
approved these changes
Mar 16, 2026
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.
https://claude.ai/code/session_01EDqcCeQHNj2f2TVeFb5Dxh