add Threads field to transcriber config for local providers
This commit is contained in:
@@ -26,6 +26,7 @@ func (c *Config) ToTranscriberConfig() transcriber.Config {
|
||||
Language: c.Transcription.Language,
|
||||
Model: c.Transcription.Model,
|
||||
Keywords: c.Keywords,
|
||||
Threads: c.Transcription.Threads,
|
||||
}
|
||||
|
||||
config.APIKey = c.resolveAPIKeyForProvider(c.Transcription.Provider)
|
||||
|
||||
@@ -66,9 +66,10 @@ keywords = []
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
[transcription]
|
||||
provider = "openai" # "openai", "groq-transcription", "groq-translation", "mistral-transcription", "elevenlabs"
|
||||
provider = "openai" # "openai", "groq-transcription", "groq-translation", "mistral-transcription", "elevenlabs", "whisper-cpp"
|
||||
language = "" # Language code (empty = auto-detect, "en", "it", "es", "fr", etc.)
|
||||
model = "whisper-1" # Model: OpenAI="whisper-1", Groq="whisper-large-v3", Mistral="voxtral-mini-latest", ElevenLabs="scribe_v1"
|
||||
threads = 0 # CPU threads for local transcription (0 = auto: uses NumCPU-1)
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# LLM Post-Processing (Recommended)
|
||||
|
||||
@@ -60,6 +60,7 @@ type TranscriptionConfig struct {
|
||||
APIKey string `toml:"api_key"`
|
||||
Language string `toml:"language"`
|
||||
Model string `toml:"model"`
|
||||
Threads int `toml:"threads"` // CPU threads for local transcription (0 = auto: NumCPU-1)
|
||||
}
|
||||
|
||||
type InjectionConfig struct {
|
||||
|
||||
@@ -28,6 +28,7 @@ type Config struct {
|
||||
Language string
|
||||
Model string
|
||||
Keywords []string
|
||||
Threads int // CPU threads for local transcription (0 = auto)
|
||||
}
|
||||
|
||||
// mapConfigProviderToRegistryName maps config provider names to provider registry names
|
||||
|
||||
+8
-7
@@ -10,16 +10,17 @@ Started: Sun Feb 1 12:22:47 AM CET 2026
|
||||
- Full 57 language list from OpenAI Whisper
|
||||
- All tests passing, typecheck passes
|
||||
|
||||
### Task 8: Migrate OpenAI provider to new Model structure
|
||||
- Added gpt-4o-transcribe and gpt-4o-mini-transcribe transcription models
|
||||
- Removed gpt-4-turbo and gpt-3.5-turbo LLM models (not in PRD)
|
||||
- OpenAI now has 5 models: 3 transcription (whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe) + 2 LLM (gpt-4o-mini, gpt-4o)
|
||||
- All models have AdapterType='openai', Endpoint with BaseURL='https://api.openai.com'
|
||||
- All models use language.AllLanguageCodes() for SupportedLanguages (57 languages)
|
||||
- Updated provider_test.go to expect 3 transcription and 2 LLM models
|
||||
### Task 16: Update config.ToTranscriberConfig to work with new architecture
|
||||
- Added `Threads int` field to `TranscriptionConfig` in types.go (for local transcription CPU threads)
|
||||
- Added `Threads int` field to `transcriber.Config` struct
|
||||
- Updated `ToTranscriberConfig()` to pass Threads from config
|
||||
- Updated config template in save.go with `threads = 0` and comment explaining auto-detection (NumCPU-1)
|
||||
- Added whisper-cpp to provider list in config template
|
||||
- Config package doesn't import provider - factory handles model lookup
|
||||
- All tests passing, typecheck passes
|
||||
|
||||
|
||||
|
||||
### Task 3: Create Model type with full metadata
|
||||
- Created `internal/provider/model.go`
|
||||
- ModelType enum: Transcription, LLM
|
||||
|
||||
+1
-1
@@ -392,7 +392,7 @@
|
||||
"Config doesn't import provider package (factory does)",
|
||||
"Typecheck passes"
|
||||
],
|
||||
"passes": false
|
||||
"passes": true
|
||||
},
|
||||
{
|
||||
"title": "Write tests for transcriber factory",
|
||||
|
||||
Reference in New Issue
Block a user