feat(#392): create /api/speech/transcribe REST endpoint
All checks were successful
ci/woodpecker/push/api Pipeline was successful

Add SpeechController with POST /api/speech/transcribe for audio
transcription and GET /api/speech/health for provider status.
Uses AudioValidationPipe for file upload validation and returns
results in standard { data: T } envelope.

Includes 10 unit tests covering transcribe with options, error
propagation, and all health status combinations.

Fixes #392

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 02:47:52 -06:00
parent 6c465566f6
commit 527262af38
3 changed files with 632 additions and 0 deletions

View File

@@ -31,12 +31,14 @@ import {
type SpeechConfig,
} from "./speech.config";
import { SpeechService } from "./speech.service";
import { SpeechController } from "./speech.controller";
import { STT_PROVIDER, TTS_PROVIDERS } from "./speech.constants";
import { SpeachesSttProvider } from "./providers/speaches-stt.provider";
import { createTTSProviders } from "./providers/tts-provider.factory";
@Module({
imports: [ConfigModule.forFeature(speechConfig)],
controllers: [SpeechController],
providers: [
SpeechService,
// STT provider: conditionally register SpeachesSttProvider when STT is enabled