Files
stack/apps/api/src/speech/speech.constants.ts
Jason Woltje c40373fa3b
All checks were successful
ci/woodpecker/push/api Pipeline was successful
feat(#389): create SpeechModule with provider abstraction layer
Add SpeechModule with provider interfaces and service skeleton for
multi-tier TTS fallback (premium -> default -> fallback) and STT
transcription support. Includes 27 unit tests covering provider
selection, fallback logic, and availability checks.

- ISTTProvider interface with transcribe/isHealthy methods
- ITTSProvider interface with synthesize/listVoices/isHealthy methods
- Shared types: SpeechTier, TranscriptionResult, SynthesisResult, etc.
- SpeechService with graceful TTS fallback chain
- NestJS injection tokens (STT_PROVIDER, TTS_PROVIDERS)
- SpeechModule registered in AppModule
- ConfigModule integration via speechConfig registerAs factory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:09:45 -06:00

20 lines
459 B
TypeScript

/**
* Speech Module Constants
*
* NestJS injection tokens for speech providers.
*
* Issue #389
*/
/**
* Injection token for the STT (speech-to-text) provider.
* Providers implementing ISTTProvider register under this token.
*/
export const STT_PROVIDER = Symbol("STT_PROVIDER");
/**
* Injection token for TTS (text-to-speech) providers map.
* Registered as Map<SpeechTier, ITTSProvider>.
*/
export const TTS_PROVIDERS = Symbol("TTS_PROVIDERS");