Skip to content
6 changes: 3 additions & 3 deletions rust-executor/src/ai_service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use log::error;

pub type Result<T> = std::result::Result<T, AnyError>;

static WHISPER_MODEL: WhisperSource = WhisperSource::Small;
static WHISPER_MODEL: WhisperSource = WhisperSource::QuantizedLargeV3Turbo;
static TRANSCRIPTION_TIMEOUT_SECS: u64 = 30; // 30 seconds (was 2 minutes)
static TRANSCRIPTION_CHECK_INTERVAL_SECS: u64 = 5; // 5 seconds (was 10)

Expand Down Expand Up @@ -1105,8 +1105,8 @@ impl AIService {
}
}

// Default to tiny if nothing found
Ok(WhisperSource::Tiny)
// Default to the configured WHISPER_MODEL constant when no model is persisted in the DB.
Ok(WHISPER_MODEL)
}

pub async fn open_transcription_stream(
Expand Down
60 changes: 46 additions & 14 deletions ui/src/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { open } from "@tauri-apps/plugin-shell";
import "../index.css";
import Logo from "./Logo";

const WHISPER_TURBO_URL =
"https://huggingface.co/Demonthos/candle-quantized-whisper-large-v3-turbo";
const WHISPER_TURBO_LABEL = "Whisper large v3 turbo quantized (454MB)";

const Login = () => {
const {
state: { loading, hasLoginError },
Expand Down Expand Up @@ -165,12 +169,11 @@ const Login = () => {
}

async function saveModels() {
let whisperModel = "whisper_small";
let whisperModel = "whisper_large_v3_turbo_quantized";
// add llm model
if (aiMode !== "None") {
const llm = { modelType: "LLM" } as ModelInput;
if (aiMode === "Local") {
whisperModel = "whisper_distil_large_v3";
llm.name = "Qwen2.5.1-Coder-7B-Instruct";
llm.local = { fileName: "Qwen2.5.1-Coder-7B-Instruct" };
} else {
Expand All @@ -192,12 +195,14 @@ const Login = () => {
local: { fileName: "bert" },
modelType: "EMBEDDING",
});
// add medium whisper model
client!.ai.addModel({
name: "Whisper",
local: { fileName: whisperModel },
modelType: "TRANSCRIPTION",
});
// add main whisper model (quantized large v3 turbo)
client!.ai
.addModel({
name: "Whisper",
local: { fileName: whisperModel },
modelType: "TRANSCRIPTION",
})
.then((modelId) => client!.ai.setDefaultModel("TRANSCRIPTION", modelId));

client!.ai.addModel({
name: "Whisper tiny quantized",
Expand Down Expand Up @@ -640,15 +645,24 @@ const Login = () => {
</a>
</p>
and
<p>
<a
onClick={() =>
open(WHISPER_TURBO_URL)
}
style={{ cursor: "pointer" }}
>{WHISPER_TURBO_LABEL}</a>
</p>
and
<p>
<a
onClick={() =>
open(
"https://huggingface.co/openai/whisper-large-v3-turbo"
"https://huggingface.co/lmz/candle-whisper"
)
}
style={{ cursor: "pointer" }}
>Whisper distill large v3 (1.42GB)</a>
>Whisper tiny quantized (42MB)</a>
</p>
and
<p>
Expand Down Expand Up @@ -814,15 +828,24 @@ const Login = () => {

<j-text>
This will still download
<p>
<a
onClick={() =>
open(WHISPER_TURBO_URL)
}
style={{ cursor: "pointer" }}
>{WHISPER_TURBO_LABEL}</a>
</p>
and
<p>
<a
onClick={() =>
open(
"https://huggingface.co/openai/whisper-small"
"https://huggingface.co/lmz/candle-whisper"
)
}
style={{ cursor: "pointer" }}
>Whisper small (244MB)</a>
>Whisper tiny quantized (42MB)</a>
</p>
and
<p>
Expand Down Expand Up @@ -856,15 +879,24 @@ const Login = () => {

<j-text>
This will still download
<p>
<a
onClick={() =>
open(WHISPER_TURBO_URL)
}
style={{ cursor: "pointer" }}
>{WHISPER_TURBO_LABEL}</a>
</p>
and
<p>
<a
onClick={() =>
open(
"https://huggingface.co/openai/whisper-small"
"https://huggingface.co/lmz/candle-whisper"
)
}
style={{ cursor: "pointer" }}
>Whisper small (244MB)</a>
>Whisper tiny quantized (42MB)</a>
</p>
and
<p>
Expand Down