mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-12 03:16:19 +00:00
Let OpenRouter subtitles use a chosen model instead of whisper-1
A timestamped run on OpenRouter always asked openai/whisper-1 for the segments, whatever model was picked for plain transcription. Not every model there returns segment times, so the one to use is now its own setting, openrouter_subtitle_model, shown in the speech-to-text box only when OpenRouter is the provider. Empty keeps the old whisper-1 fallback. Target carries the choice as subtitle_model and timestamp_model() reads it; the other providers are unchanged.
This commit is contained in:
+5
-1
@@ -397,6 +397,9 @@ DEFAULTS = {
|
||||
"transcribe_model": "gpt-4o-transcribe", # used when provider is openai
|
||||
"groq_transcribe_model": "whisper-large-v3-turbo",
|
||||
"openrouter_transcribe_model": "openai/gpt-4o-transcribe",
|
||||
# What a timestamped run (subtitles) asks OpenRouter for: not every model
|
||||
# there returns segment times. Empty -> openai/whisper-1.
|
||||
"openrouter_subtitle_model": "",
|
||||
"language": "tr",
|
||||
"transcribe_prompt": "",
|
||||
|
||||
@@ -669,8 +672,9 @@ class Config:
|
||||
# to land on rather than reading it from there.
|
||||
name = "openai"
|
||||
who = TRANSCRIBERS[name]
|
||||
subtitle = self["openrouter_subtitle_model"] if name == "openrouter" else ""
|
||||
return api.Target(name, who.service, self.api_key(who.key),
|
||||
self[who.url], self[who.model])
|
||||
self[who.url], self[who.model], subtitle.strip())
|
||||
|
||||
def transcribe_ready(self):
|
||||
"""Whether speech to text could run right now, without opening Settings."""
|
||||
|
||||
Reference in New Issue
Block a user