diff --git a/modules/capabilities/transcription.nix b/modules/capabilities/transcription.nix index 8b26d84..5daf6d6 100644 --- a/modules/capabilities/transcription.nix +++ b/modules/capabilities/transcription.nix @@ -11,7 +11,6 @@ in ... }: let - isOrion = config.facts.machine.name == "orion"; modelName = "large-v3-turbo-q5_0"; modelHash = "sha256-OUIhcJzVrR9AxG5gMcphvOiJMebgiMGIKUxtWlX/p+I="; modelSha256 = builtins.convertHash { @@ -38,8 +37,7 @@ in ${builtins.readFile ./_diarize-transcript.py} ''; }; - whisper = if isOrion then pkgs.whisper-cpp else pkgs.whisper-cpp-vulkan; - acceleration = if isOrion then "CPU" else "Vulkan"; + whisper = pkgs.whisper-cpp; prepareDiarizationModel = pkgs.writeShellApplication { name = "prepare-transcription-diarization-model"; runtimeInputs = with pkgs; [ @@ -104,7 +102,7 @@ in Type = "oneshot"; ExecStart = lib.getExe transcribeRecordings; Environment = [ - "TRANSCRIBE_ENGINE_ACCELERATION=${acceleration}" + "TRANSCRIBE_ENGINE_ACCELERATION=CPU" "TRANSCRIBE_ENGINE_VERSION=${whisper.version}" "TRANSCRIBE_MODEL=${model}" ''"TRANSCRIBE_MODEL_NAME=${modelName} multilingual"'' @@ -116,16 +114,14 @@ in "TRANSCRIBE_SETTLE_SECONDS=300" "TRANSCRIBE_SYNC_ROOT=${home}/sync" ]; - } - // lib.optionalAttrs isOrion { Restart = "on-failure"; RestartSec = 60; }; - Install.WantedBy = lib.optionals isOrion [ "default.target" ]; + Install.WantedBy = [ "default.target" ]; }; - systemd.user.paths.transcribe-recordings = lib.mkIf isOrion { + systemd.user.paths.transcribe-recordings = { Unit.Description = "Watch for synchronized recordings"; Path = { @@ -135,17 +131,6 @@ in Install.WantedBy = [ "paths.target" ]; }; - - systemd.user.timers.transcribe-recordings = lib.mkIf (!isOrion) { - Unit.Description = "Transcribe new recordings every two minutes"; - - Timer = { - OnCalendar = "*:0/2"; - Persistent = true; - }; - - Install.WantedBy = [ "timers.target" ]; - }; }; flake.modules.nixos.transcription = diff --git a/modules/hosts/zenith/default.nix b/modules/hosts/zenith/default.nix index 1866b2e..2eb9ef4 100644 --- a/modules/hosts/zenith/default.nix +++ b/modules/hosts/zenith/default.nix @@ -36,7 +36,6 @@ in imports = [ nixosModules.workstation-base nixosModules.laptop-power - nixosModules.transcription { hardware.enableRedistributableFirmware = true; services.fwupd.enable = true;