TTS
Overview
Text-to-speech synthesis through the environment’s TTS provider, with usage tracking.
Supported providers include OpenAI, ElevenLabs, Google, Deepgram, and Athena (Live API via tunnel or custom baseUrl ending in /v1).
API
{pe} = /projects/{projectId}/environments/{environmentId}.
| Method | Path | Notes |
|---|---|---|
| GET | /tts/health | Health |
| POST | /tts{pe}/synthesize | RequireAuthorization |
| GET | /tts{pe}/usage | RequireAuthorization |
Athena synthesis posts { input, model, voice, stream: false } to /v1/audio/speech and returns WAV.
Clients
| Package | Runtime |
|---|---|
@vijihub/tts | server |
VijiHub.TTS | .NET |
import { createTtsClient } from '@vijihub/tts'
const tts = createTtsClient({
baseUrl: 'http://localhost:5600',
projectId: '...',
environmentId: '...',
getAccessToken: () => auth.ensureAccessToken(),
})
Implementation
- Enable TTS and configure the provider (voice/model options as supported).
- For Athena, set
baseUrltohttps://{slug}.tunnel.vijihub.com/v1(API key optional). - Call
/synthesizefrom a trusted backend with Bearer auth. - Monitor
/usage.
Constraints
- Requires authorization — not a public browser key surface.
- Output format and voice catalogs depend on the provider.
- Keep provider secrets in environment configuration.