feat(#389): create SpeechModule with provider abstraction layer
All checks were successful
ci/woodpecker/push/api Pipeline was successful
All checks were successful
ci/woodpecker/push/api Pipeline was successful
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>
This commit is contained in:
19
apps/api/src/speech/speech.constants.ts
Normal file
19
apps/api/src/speech/speech.constants.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* 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");
|
||||
Reference in New Issue
Block a user