← BACK TO HOME
CASE STUDYSOURCE ONLY

Tejas

AIROLE — SOLE BUILDER

A real-time voice agent that lives in the Team TEJAS Discord. Talk to it in a voice channel, interrupt it whenever you like, and it answers out loud in casual Hinglish, remembers people across sessions, and can act: post messages, send DMs, draw diagrams, or search the web.

NODE.JSDEEPGRAM FLUXGROQTOOL CALLING
Source not public — walkthrough on request
Discord · Team TEJAS · Lounge — mockup
Tejas — live preview

PROOF

MEASURED, SOURCED
0.35–1.1 s
END OF SPEECH TO FIRST REPLY AUDIO
docs/STATE.md — harness run with live Deepgram, Groq and GPU TTS, 20 Oct 2026
150–450 ms
LLM FIRST TOKEN
docs/STATE.md — Groq, same harness run
~1.2 s
BARGE-IN TO PLAYBACK CUT
docs/STATE.md — same harness run
OPEN REPOSITORY EVIDENCE (1)
4
TOOLS THE AGENT CAN CALL
agent/tools.js — send_message, send_dm, send_mermaid, web_search

THE PROBLEM

WHAT NEEDED SOLVING

A voice bot that waits for silence, transcribes, asks a model, renders the whole reply and only then speaks feels like a walkie-talkie, not a conversation. The first version did exactly that: a 900 ms silence gate, Whisper run twice per clip, a fresh model process per reply and network TTS for the full answer. The goal was replies that feel human: a fast first word, the ability to be interrupted, and only answering when addressed in a room with several people talking.

THE APPROACH

HOW IT WAS BUILT

The rewrite is a streaming cascade. Each speaker gets their own Deepgram Flux stream, which reports a semantic end of turn plus an earlier eager estimate. On the eager signal the agent starts a Groq reply as a draft, and releases it only if the transcript is unchanged at the real end of turn. Replies are cut into sentences and spoken as they arrive, through Groq Orpheus or a warm local GPU voice. Tools run only after a turn is committed, never from a speculative draft, and a per-person memory store carries notes and recaps across sessions.

FIELD NOTES

PROBLEMS HIT — AND RESOLVED
  1. 01

    LATENCY LIVES IN TURN DETECTION

    Timing the harness showed turn detection, not the model, was the largest share of the wait. Speculative drafts on Flux's eager end-of-turn overlap model time with the user finishing their sentence; Groq's first token lands in 150–450 ms and TTS's first chunk in 55–200 ms.

  2. 02

    A DRAFT MUST NEVER ACT

    Speculative drafts are thrown away whenever the user keeps talking, so a tool call from a draft could post a message nobody asked for. Tools execute only once the reply is committed, then one follow-up model call speaks the outcome. Tests cover that a draft never executes a tool.

  3. 03

    FREE-TIER RATE LIMITS IN A LIVE CALL

    A three-person call hit Groq's per-model token limit and replies went silent. A shared key pool now cools down a (key, model) pair for its retry-after, retries on the next key, overflows to larger then smaller models only when all keys are limited, and never retries once tokens have streamed.

  4. 04

    HINGLISH THAT SOUNDS RIGHT

    Read-back tests showed the Hindi TTS misreads romanized Hindi and all-caps acronyms. The prompt now asks for Hindi words in Devanagari, and a normalizer spells acronyms letter by letter before speech; the same lines then read back correctly.

CAPABILITIES

WHAT IT ACTUALLY DOES
  • Barge-in: playback ducks while someone speaks and stops on stop words or three real words
  • Multi-person addressing with a wake word and a 20-second follow-up window
  • OpenAI-style tools: send_message, send_dm, send_mermaid and web_search, gated to the owner
  • Long-term memory per person plus guild recaps, compacted to a summary after 40 history entries
  • Groq Orpheus voice with automatic fallback to a local GPU voice on any failure
  • Optional full-duplex speech-to-speech mode on a local NVIDIA PersonaPlex server