diff --git a/src/App.tsx b/src/App.tsx index 5532f0d..21371fc 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -615,6 +615,25 @@ export function App() { const serverSelected = engineChoice === "server" && auth.user !== null && serverStatus?.available === true; + const availableModels = serverSelected + ? MODELS.filter((m) => m.fasterWhisperModel === "large-v3-turbo" || m.fasterWhisperModel === "medium.en") + : MODELS; + + useEffect(() => { + if (serverSelected) { + const allowed = ["onnx-community/whisper-large-v3-turbo", "onnx-community/whisper-medium.en_timestamped"]; + if (!allowed.includes(modelId) && !busy && liveStatus === "idle") { + setModelId("onnx-community/whisper-large-v3-turbo"); + setActiveDevice(null); + setPartialText(""); + setTranscribeProgress(null); + setResult(null); + setLoadStarted(false); + setLoadProgress(initialLoadProgress); + } + } + }, [serverSelected, modelId, busy, liveStatus]); + return (
@@ -633,7 +652,7 @@ export function App() {