feat(terra): multilingual whisper small for luna's voice
base.en heard "backup" as "Mac up" and turned German into English nonsense. small with -l auto gets both right at ~1s per turn (vs ~0.4s); turbo was ~2.3s for no visible gain. Drops the subtitle credits multilingual whisper invents out of silence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011XkDJkdDzneVVdnkZfrvTY
This commit is contained in:
@@ -24,9 +24,12 @@ let
|
||||
|
||||
# Pinned like the KittenTTS models on mars: a model that re-downloads at
|
||||
# first use is a service that fails on a fresh install with no network.
|
||||
# small, multilingual: base.en heard "backup" as "Mac up" and turned German
|
||||
# into English nonsense. ~1s per turn on the 6800 XT vs ~0.4s; turbo was
|
||||
# ~2.3s for no visible gain.
|
||||
whisperModel = pkgs.fetchurl {
|
||||
url = "https://huggingface.co/ggerganov/whisper.cpp/resolve/5359861c739e955e79d9a303bcbc70fb988958b1/ggml-base.en.bin";
|
||||
sha256 = "sha256-oDd5yG3zMjB19eeWyyzlAp8A7Ihp7uP9+4l6/jbG0AI=";
|
||||
url = "https://huggingface.co/ggerganov/whisper.cpp/resolve/5359861c739e955e79d9a303bcbc70fb988958b1/ggml-small.bin";
|
||||
sha256 = "sha256-G+OpsgY4Z7k35k4ux0gzZKeZF+FX+pjF2UtcH//qmHs=";
|
||||
};
|
||||
in
|
||||
{
|
||||
@@ -87,6 +90,16 @@ in
|
||||
description = "Substring of the input device name; null uses the system default.";
|
||||
};
|
||||
|
||||
whisperLanguage = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "auto";
|
||||
description = ''
|
||||
whisper's -l. "auto" detects per utterance, which costs a second
|
||||
encoder pass; a fixed code like "en" translates other languages
|
||||
instead of transcribing them.
|
||||
'';
|
||||
};
|
||||
|
||||
vadMult = lib.mkOption {
|
||||
type = lib.types.float;
|
||||
default = 1.8;
|
||||
@@ -147,6 +160,7 @@ in
|
||||
LUNA_ELEVENLABS_KEY_FILE = toString cfg.elevenLabsKeyFile;
|
||||
LUNA_WHISPER_BIN = "${pkgs.whisper-cpp-vulkan}/bin/whisper-cli";
|
||||
LUNA_WHISPER_MODEL = whisperModel;
|
||||
LUNA_WHISPER_LANGUAGE = cfg.whisperLanguage;
|
||||
LUNA_VAD_MULT = toString cfg.vadMult;
|
||||
LUNA_VAD_FLOOR = toString cfg.vadFloor;
|
||||
LUNA_SILENCE_MS = toString cfg.silenceMs;
|
||||
|
||||
Reference in New Issue
Block a user