docs(backend/ai-services): Update documentation for Phases 2-4 completion

Marked all Phase 2-4 tasks as complete:
- Phase 2: Mistral-Medium Integration (MistralService, prompt templates)
- Phase 3: Vosk Speech Recognition (VoskService, audio processing)
- Phase 4: Coqui TTS Integration (TtsService, batch audio generation)

Note: Model downloads remain unchecked as they require large disk space
- Vosk model: vosk-model-de-0.22 (~500MB)
- Coqui model: tts_models/de/deu/fairseq/vits (~1.5GB)

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Lasse Rune Hansen 2026-06-13 10:26:47 +02:00
parent 594732bd86
commit 8110da46b4

View file

@ -200,7 +200,7 @@ For production deployment via Woodpecker:
- Resilient to API failures (retry, rate limiting, circuit breaker, caching)
- Testable with mocked HTTP client
### Phase 1: Configuration ### Phase 1: Configuration ### Phase 1: Configuration & Interfaces (2 hours) Interfaces (2 hours) ✅ Interfaces (2 hours) ✅
### Phase 1: Configuration ### Phase 1: Configuration ### Phase 1: Configuration ### Phase 1: Configuration & Interfaces (2 hours) Interfaces (2 hours) ✅ Interfaces (2 hours) ✅ Interfaces (2 hours) ✅
- [x] Add AI configuration section to appsettings.json
- [x] Create configuration classes (MistralConfig, VoskConfig, CoquiConfig)
- [x] Define service interfaces (IMistralService, IVoskService, ITtsService)
@ -208,31 +208,31 @@ For production deployment via Woodpecker:
- [x] Set up configuration validation (ValidateAiConfigurations method added to Program.cs)
### Phase 2: Mistral-Medium Integration (2-3 hours) ✅
- [ ] Create MistralService implementation
- [ ] Implement Mistral API client
- [ ] Create request/response models
- [ ] Implement retry logic for API calls
- [ ] Add rate limiting (e.g., max 10 requests/minute)
- [ ] Add response caching for similar prompts
- [ ] Create prompt templates for different use cases
- [x] Create MistralService implementation
- [x] Implement Mistral API client (IMistralConnector from Phase 0)
- [x] Create request/response models (MistralRequest.cs, MistralResponse.cs from Phase 0)
- [x] Implement retry logic for API calls (in MistralConnector from Phase 0)
- [x] Add rate limiting (MistralRateLimiter from Phase 0)
- [x] Add response caching (in MistralConnector from Phase 0)
- [x] Create prompt templates for different use cases (BuildStoryPrompt, BuildFeedbackSystemPrompt)
### Phase 3: Vosk Speech Recognition (2-3 hours) ✅
- [ ] Create VoskService implementation
- [ ] Set up Vosk Python environment
- [ ] Download and configure German model (vosk-model-de-0.22)
- [ ] Implement audio processing
- [ ] Handle different audio formats
- [ ] Add error handling for recognition failures
- [x] Create VoskService implementation
- [x] Set up Vosk Python environment (Process.Start based)
- [ ] Download and configure German model (requires ~1.5GB disk space) (vosk-model-de-0.22)
- [x] Implement audio processing
- [x] Handle different audio formats (byte[], file, stream)
- [x] Add error handling for recognition failures
- [x] Create /api/speech/recognize endpoint
### Phase 4: Coqui TTS Integration (2-3 hours) ✅
- [ ] Create TtsService implementation
- [ ] Set up Coqui TTS Python environment
- [ ] Download and configure German model
- [ ] Implement audio generation
- [ ] Add audio file management (storage, cleanup)
- [ ] Create audio serving endpoints
- [ ] Implement batch audio generation
- [x] Create TtsService implementation
- [x] Set up Coqui TTS Python environment (Process.Start based)
- [ ] Download and configure German model (requires ~1.5GB disk space)
- [x] Implement audio generation
- [x] Add audio file management (storage, cleanup)
- [x] Create audio serving endpoints (/api/tts/generate, etc.)
- [x] Implement batch audio generation (text splitting)
### Phase 5: Service Integration (2 hours)
- [ ] Create StoryGenerationService (uses MistralService)