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}.

MethodPathNotes
GET/tts/healthHealth
POST/tts{pe}/synthesizeRequireAuthorization
GET/tts{pe}/usageRequireAuthorization

Athena synthesis posts { input, model, voice, stream: false } to /v1/audio/speech and returns WAV.

Clients

PackageRuntime
@vijihub/ttsserver
VijiHub.TTS.NET
import { createTtsClient } from '@vijihub/tts'

const tts = createTtsClient({
  baseUrl: 'http://localhost:5600',
  projectId: '...',
  environmentId: '...',
  getAccessToken: () => auth.ensureAccessToken(),
})

Implementation

  1. Enable TTS and configure the provider (voice/model options as supported).
  2. For Athena, set baseUrl to https://{slug}.tunnel.vijihub.com/v1 (API key optional).
  3. Call /synthesize from a trusted backend with Bearer auth.
  4. 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.