This commit is contained in:
암냥 2026-08-17 10:41:51 +09:00
commit d825c4a1f8
No known key found for this signature in database

View file

@ -41,13 +41,23 @@ let
# Kdenlive's speech-to-text scripts are launched through # Kdenlive's speech-to-text scripts are launched through
# /usr/bin/env python3. Keep this environment private to Kdenlive so the # /usr/bin/env python3. Keep this environment private to Kdenlive so the
# other Python environments installed on the system remain independent. # other Python environments installed on the system remain independent.
cudaPackages = pkgs.cudaPackages_13_0;
cudaBindings = pythonPackages.cuda-bindings.override { inherit cudaPackages; };
torchCuda = pythonPackages.torch-bin.override {
inherit cudaPackages;
cuda-bindings = cudaBindings;
};
whisperCuda = pythonPackages.openai-whisper.override {
torch = torchCuda;
triton = pythonPackages.triton-bin;
};
kdenlivePython = pkgs.python3.withPackages ( kdenlivePython = pkgs.python3.withPackages (
pythonPackages: with pythonPackages; [ pythonPackages: with pythonPackages; [
pip pip
numba numba
openai-whisper whisperCuda
srt srt
torch torchCuda
vosk vosk
] ]
); );
@ -76,5 +86,9 @@ in
--file "$HOME/.config/kdenliverc" \ --file "$HOME/.config/kdenliverc" \
--group speech \ --group speech \
--key speech_system_python_path ${kdenlivePython}/bin/python3 --key speech_system_python_path ${kdenlivePython}/bin/python3
run ${pkgs.kdePackages.kconfig}/bin/kwriteconfig6 \
--file "$HOME/.config/kdenliverc" \
--group speech \
--key whisperDevice cuda
''; '';
} }