Skip to content

feat(plugins): add Gnani STT#1585

Open
rosetta-livekit-bot[bot] wants to merge 1 commit into
mainfrom
hollow-glues-orgy
Open

feat(plugins): add Gnani STT#1585
rosetta-livekit-bot[bot] wants to merge 1 commit into
mainfrom
hollow-glues-orgy

Conversation

@rosetta-livekit-bot
Copy link
Copy Markdown
Contributor

@rosetta-livekit-bot rosetta-livekit-bot Bot commented May 22, 2026

We have integrated Gnani's Speech-to-Text with LiveKit Agents. The service provides low-latency, high-accuracy transcription for Indian languages and accents, supporting English (Indian), Hindi, Tamil, Telugu, and more. It offers secure API key–based authentication and real-time transcription optimized for conversational and voice-based applications.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 22, 2026

🦋 Changeset detected

Latest commit: aad44b8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 34 packages
Name Type
@livekit/agents-plugin-gnani Patch
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-assemblyai Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-cerebras Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-fishaudio Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-hume Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-lemonslice Patch
@livekit/agents-plugin-liveavatar Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-minimax Patch
@livekit/agents-plugin-mistral Patch
@livekit/agents-plugin-mistralai Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-perplexity Patch
@livekit/agents-plugin-phonic Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-runway Patch
@livekit/agents-plugin-sarvam Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugin-tavus Patch
@livekit/agents-plugin-trugen Patch
@livekit/agents-plugin-xai Patch
@livekit/agents-plugins-test Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 5 additional findings in Devin Review.

Open in Devin Review

Comment thread plugins/gnani/src/stt.ts
Comment on lines +277 to +283
} catch (error) {
if (error instanceof APIConnectionError || error instanceof APIStatusError) throw error;
if (error instanceof APITimeoutError) throw error;
throw new APIConnectionError({ message: `Gnani STT WebSocket error: ${error}` });
} finally {
this.closed = true;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 WebSocket resource leak when handshake phase fails before send/recv tasks start

When #waitForConnectedMessage fails (e.g. 10-second timeout at line 320-323, JSON parse error at line 357, or a WebSocket error/close event), the error propagates directly to the outer catch at line 277, bypassing the inner finally block (lines 273-276) that contains the only ws.close() call. The WebSocket was successfully opened by #waitForOpen but is never closed.

On each retry by the base class mainTask() (agents/src/stt/stt.ts:284-327), a new WebSocket is created, leaking the previous one. With the default maxRetry: 3, up to 4 open WebSocket connections can be leaked per stream if the server consistently fails the handshake phase.

Suggested change
} catch (error) {
if (error instanceof APIConnectionError || error instanceof APIStatusError) throw error;
if (error instanceof APITimeoutError) throw error;
throw new APIConnectionError({ message: `Gnani STT WebSocket error: ${error}` });
} finally {
this.closed = true;
}
} catch (error) {
ws.close();
if (error instanceof APIConnectionError || error instanceof APIStatusError) throw error;
if (error instanceof APITimeoutError) throw error;
throw new APIConnectionError({ message: `Gnani STT WebSocket error: ${error}` });
} finally {
this.closed = true;
}
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

0 participants