config: add threads auto-detection and whisper-cpp validation

This commit is contained in:
leonardotrapani
2026-02-01 01:16:46 +01:00
parent af0a55dc4b
commit a760198a73
5 changed files with 200 additions and 2 deletions
+9
View File
@@ -225,4 +225,13 @@ Started: Sun Feb 1 12:22:47 AM CET 2026
- Creates `NewWhisperCppAdapter(modelPath, config.Language, config.Threads)`
- Returns error if whisper model ID is unknown
- Added tests for whisper-cpp factory cases: valid config, no API key required, unknown model error
- All tests passing, typecheck passes
### Task 23: Update config for local transcription
- Added `applyThreadsDefault()` to config.Load() - sets Threads to max(1, NumCPU-1) when 0
- Added whisper-cpp case to config validation (no API key required)
- Validates whisper model names: tiny.en, base.en, small.en, medium.en, tiny, base, small, medium, large-v3
- Validates language codes for whisper-cpp same as other providers
- Note: Threads field, ToTranscriberConfig, and template were already done in Task 16
- Added comprehensive tests for whisper-cpp validation and threads auto-detection
- All tests passing, typecheck passes