Clarify offline STT model requirement

This commit is contained in:
Stu Leak 2026-01-11 07:14:49 -05:00
parent 77853ca4f2
commit 04dd9ca809

View File

@ -188,7 +188,15 @@ func buildSubtitlesView(state *appState) fyne.CanvasObject {
backendLabel := widget.NewLabel("") backendLabel := widget.NewLabel("")
modelLabel := widget.NewLabel("") modelLabel := widget.NewLabel("")
offlineHint := widget.NewLabel("Offline STT uses bundled ggml-small.bin (vendor/whisper).")
offlineHint.Wrapping = fyne.TextWrapWord
refreshWhisperUI := func() { refreshWhisperUI := func() {
missingModel := strings.TrimSpace(state.subtitleModelPath) == ""
if missingModel {
offlineHint.SetText("Offline STT uses bundled ggml-small.bin (vendor/whisper).")
} else {
offlineHint.SetText("Offline STT uses the selected ggml model.")
}
if strings.TrimSpace(state.subtitleBackendPath) != "" { if strings.TrimSpace(state.subtitleBackendPath) != "" {
backendLabel.SetText(fmt.Sprintf("Whisper backend: %s", state.subtitleBackendPath)) backendLabel.SetText(fmt.Sprintf("Whisper backend: %s", state.subtitleBackendPath))
backendEntry.Hide() backendEntry.Hide()
@ -519,6 +527,7 @@ func buildSubtitlesView(state *appState) fyne.CanvasObject {
applyOffsetBtn, applyOffsetBtn,
widget.NewSeparator(), widget.NewSeparator(),
widget.NewLabelWithStyle("Offline Speech-to-Text (whisper.cpp)", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}), widget.NewLabelWithStyle("Offline Speech-to-Text (whisper.cpp)", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}),
offlineHint,
backendLabel, backendLabel,
backendEntry, backendEntry,
modelLabel, modelLabel,
@ -683,7 +692,7 @@ func (s *appState) generateSubtitlesFromSpeech() {
} }
modelPath := strings.TrimSpace(s.subtitleModelPath) modelPath := strings.TrimSpace(s.subtitleModelPath)
if modelPath == "" { if modelPath == "" {
s.setSubtitleStatus("Set a whisper model path.") s.setSubtitleStatus("Whisper model missing. Install ggml-small.bin (vendor/whisper) or set a model path.")
return return
} }
backendPath := strings.TrimSpace(s.subtitleBackendPath) backendPath := strings.TrimSpace(s.subtitleBackendPath)