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:
2026-09-02 12:41:43 +03:00
parent 310ef8d7cf
commit 6e307bd8d0
7 changed files with 98 additions and 11 deletions
+5 -1
View File
@@ -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."""