STT
Overview
Speech-to-text transcription through the environment’s STT provider, with usage tracking.
Supported providers include OpenAI, Deepgram, AssemblyAI, Google, Azure, and Athena (OpenAI-compatible Live API via tunnel or custom baseUrl ending in /v1).
API
{pe} = /projects/{projectId}/environments/{environmentId}.
| Method | Path | Notes |
|---|---|---|
| GET | /stt/health | Health |
| POST | /stt{pe}/transcribe | RequireAuthorization — multipart file, returns JSON |
| POST | /stt{pe}/transcribe/stream | RequireAuthorization — multipart file, SSE transcript deltas |
| GET | /stt{pe}/usage | RequireAuthorization |
Streaming events
POST /transcribe/stream returns text/event-stream:
data: {"type":"transcript.text.delta","delta":"…","text":"…"}
data: {"type":"transcript.text.done","text":"…"}
data: [DONE]
Athena uses native upstream SSE (stream=true). Other providers run a batch transcription and emit a synthetic delta + done.
Clients
| Package | Runtime |
|---|---|
@vijihub/stt | server |
VijiHub.STT | .NET |
import { createSttClient } from '@vijihub/stt'
const stt = createSttClient({
baseUrl: 'http://localhost:5600',
projectId: '...',
environmentId: '...',
getAccessToken: () => auth.ensureAccessToken(),
})
Implementation
- Enable STT and configure the provider (and optional tunnel URL).
- For Athena, set
baseUrltohttps://{slug}.tunnel.vijihub.com/v1(API key optional). - POST audio to
/transcribeor/transcribe/streamfrom a trusted client with Bearer auth. - Track consumption via
/usage.
Constraints
- Requires authorization — keep calls on server/BFF.
- Audio size/format limits depend on the configured provider (Athena prefers WAV).
- Provider credentials stay in environment settings.