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,
|
Language: c.Transcription.Language,
|
||||||
Model: c.Transcription.Model,
|
Model: c.Transcription.Model,
|
||||||
Keywords: c.Keywords,
|
Keywords: c.Keywords,
|
||||||
|
Threads: c.Transcription.Threads,
|
||||||
}
|
}
|
||||||
|
|
||||||
config.APIKey = c.resolveAPIKeyForProvider(c.Transcription.Provider)
|
config.APIKey = c.resolveAPIKeyForProvider(c.Transcription.Provider)
|
||||||
|
|||||||
@@ -66,9 +66,10 @@ keywords = []
|
|||||||
# ─────────────────────────────────────────────────────────────────────────────
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
[transcription]
|
[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.)
|
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"
|
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)
|
# LLM Post-Processing (Recommended)
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ type TranscriptionConfig struct {
|
|||||||
APIKey string `toml:"api_key"`
|
APIKey string `toml:"api_key"`
|
||||||
Language string `toml:"language"`
|
Language string `toml:"language"`
|
||||||
Model string `toml:"model"`
|
Model string `toml:"model"`
|
||||||
|
Threads int `toml:"threads"` // CPU threads for local transcription (0 = auto: NumCPU-1)
|
||||||
}
|
}
|
||||||
|
|
||||||
type InjectionConfig struct {
|
type InjectionConfig struct {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ type Config struct {
|
|||||||
Language string
|
Language string
|
||||||
Model string
|
Model string
|
||||||
Keywords []string
|
Keywords []string
|
||||||
|
Threads int // CPU threads for local transcription (0 = auto)
|
||||||
}
|
}
|
||||||
|
|
||||||
// mapConfigProviderToRegistryName maps config provider names to provider registry names
|
// 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
|
- Full 57 language list from OpenAI Whisper
|
||||||
- All tests passing, typecheck passes
|
- All tests passing, typecheck passes
|
||||||
|
|
||||||
### Task 8: Migrate OpenAI provider to new Model structure
|
### Task 16: Update config.ToTranscriberConfig to work with new architecture
|
||||||
- Added gpt-4o-transcribe and gpt-4o-mini-transcribe transcription models
|
- Added `Threads int` field to `TranscriptionConfig` in types.go (for local transcription CPU threads)
|
||||||
- Removed gpt-4-turbo and gpt-3.5-turbo LLM models (not in PRD)
|
- Added `Threads int` field to `transcriber.Config` struct
|
||||||
- OpenAI now has 5 models: 3 transcription (whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe) + 2 LLM (gpt-4o-mini, gpt-4o)
|
- Updated `ToTranscriberConfig()` to pass Threads from config
|
||||||
- All models have AdapterType='openai', Endpoint with BaseURL='https://api.openai.com'
|
- Updated config template in save.go with `threads = 0` and comment explaining auto-detection (NumCPU-1)
|
||||||
- All models use language.AllLanguageCodes() for SupportedLanguages (57 languages)
|
- Added whisper-cpp to provider list in config template
|
||||||
- Updated provider_test.go to expect 3 transcription and 2 LLM models
|
- Config package doesn't import provider - factory handles model lookup
|
||||||
- All tests passing, typecheck passes
|
- All tests passing, typecheck passes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Task 3: Create Model type with full metadata
|
### Task 3: Create Model type with full metadata
|
||||||
- Created `internal/provider/model.go`
|
- Created `internal/provider/model.go`
|
||||||
- ModelType enum: Transcription, LLM
|
- ModelType enum: Transcription, LLM
|
||||||
|
|||||||
+1
-1
@@ -392,7 +392,7 @@
|
|||||||
"Config doesn't import provider package (factory does)",
|
"Config doesn't import provider package (factory does)",
|
||||||
"Typecheck passes"
|
"Typecheck passes"
|
||||||
],
|
],
|
||||||
"passes": false
|
"passes": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Write tests for transcriber factory",
|
"title": "Write tests for transcriber factory",
|
||||||
|
|||||||
Reference in New Issue
Block a user