feat: add local push-to-talk dictation
This commit is contained in:
@@ -35,6 +35,12 @@ function M.setup(ctx)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function setup_audio_media_bindings()
|
local function setup_audio_media_bindings()
|
||||||
|
bind("F5", exec("voxtype record start"), desc("Start hold-to-talk dictation"))
|
||||||
|
bind("F5", exec("voxtype record stop"), desc("Stop and transcribe hold-to-talk dictation", { release = true }))
|
||||||
|
bind(hyper .. " + B", exec("voxtype record start"), desc("Start hold-to-talk dictation"))
|
||||||
|
bind(hyper .. " + B", exec("voxtype record stop"), desc("Stop and transcribe hold-to-talk dictation", { release = true }))
|
||||||
|
bind(hyper .. " + Escape", exec("voxtype record cancel"), desc("Cancel voice dictation"))
|
||||||
|
|
||||||
bind(main_mod .. " + I", exec("set_volume --unmute --change-volume +5"), desc("Raise volume", { repeating = true }))
|
bind(main_mod .. " + I", exec("set_volume --unmute --change-volume +5"), desc("Raise volume", { repeating = true }))
|
||||||
bind(main_mod .. " + K", exec("set_volume --unmute --change-volume -5"), desc("Lower volume", { repeating = true }))
|
bind(main_mod .. " + K", exec("set_volume --unmute --change-volume -5"), desc("Lower volume", { repeating = true }))
|
||||||
bind(main_mod .. " + U", exec("set_volume --toggle-mute"), desc("Toggle mute"))
|
bind(main_mod .. " + U", exec("set_volume --toggle-mute"), desc("Toggle mute"))
|
||||||
|
|||||||
55
nixos/flake.lock
generated
55
nixos/flake.lock
generated
@@ -580,6 +580,24 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_6": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_7"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"git-blame-rank": {
|
"git-blame-rank": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"fenix": "fenix",
|
"fenix": "fenix",
|
||||||
@@ -2088,6 +2106,7 @@
|
|||||||
"rlru": "rlru",
|
"rlru": "rlru",
|
||||||
"systems": "systems_6",
|
"systems": "systems_6",
|
||||||
"t3code-nix": "t3code-nix",
|
"t3code-nix": "t3code-nix",
|
||||||
|
"voxtype": "voxtype",
|
||||||
"vscode-server": "vscode-server",
|
"vscode-server": "vscode-server",
|
||||||
"xmonad": "xmonad_2",
|
"xmonad": "xmonad_2",
|
||||||
"xmonad-contrib": "xmonad-contrib_2",
|
"xmonad-contrib": "xmonad-contrib_2",
|
||||||
@@ -2255,6 +2274,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_7": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"t3code-nix": {
|
"t3code-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -2315,6 +2349,27 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"voxtype": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_6",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1783956569,
|
||||||
|
"narHash": "sha256-36bYa6+d+SjLXTDeUOoCiuTlAL9mgp9h5WK4WMCEuZQ=",
|
||||||
|
"owner": "peteonrails",
|
||||||
|
"repo": "voxtype",
|
||||||
|
"rev": "86666ab9ee681eb3d1e80ef1826affd8e11107e5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "peteonrails",
|
||||||
|
"repo": "voxtype",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"vscode-server": {
|
"vscode-server": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
|
|||||||
@@ -101,6 +101,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
voxtype = {
|
||||||
|
url = "github:peteonrails/voxtype";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
kanshi-sni = {
|
kanshi-sni = {
|
||||||
url = "github:taffybar/kanshi-sni";
|
url = "github:taffybar/kanshi-sni";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
|||||||
@@ -166,6 +166,7 @@
|
|||||||
then "1"
|
then "1"
|
||||||
else "0";
|
else "0";
|
||||||
hyprlandCursorSizeString = toString config.myModules.hyprland.cursorSize;
|
hyprlandCursorSizeString = toString config.myModules.hyprland.cursorSize;
|
||||||
|
voxtypePackage = inputs.voxtype.packages.${system}.vulkan;
|
||||||
enableHyprglass = false;
|
enableHyprglass = false;
|
||||||
hyprglass = pkgs.callPackage ./packages/hyprglass {
|
hyprglass = pkgs.callPackage ./packages/hyprglass {
|
||||||
src = inputs.hyprglass;
|
src = inputs.hyprglass;
|
||||||
@@ -432,6 +433,47 @@
|
|||||||
HYPRCURSOR_SIZE = hyprlandCursorSizeString;
|
HYPRCURSOR_SIZE = hyprlandCursorSizeString;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home-manager.users.imalison = lib.mkIf config.myModules.voxtype.enable {
|
||||||
|
imports = [inputs.voxtype.homeManagerModules.default];
|
||||||
|
|
||||||
|
home.packages = [inputs.voxtype.packages.${system}.osd-gtk4];
|
||||||
|
|
||||||
|
programs.voxtype = {
|
||||||
|
enable = true;
|
||||||
|
package = voxtypePackage;
|
||||||
|
engine = "whisper";
|
||||||
|
model.name = "large-v3-turbo";
|
||||||
|
service.enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
hotkey.enabled = false;
|
||||||
|
|
||||||
|
audio = {
|
||||||
|
device = "default";
|
||||||
|
max_duration_secs = 120;
|
||||||
|
};
|
||||||
|
|
||||||
|
whisper = {
|
||||||
|
language = "en";
|
||||||
|
translate = false;
|
||||||
|
on_demand_loading = false;
|
||||||
|
initial_prompt = "Ivan Malison, Railbird, NixOS, Hyprland, Taffybar, Emacs, Codex.";
|
||||||
|
};
|
||||||
|
|
||||||
|
output = {
|
||||||
|
mode = "type";
|
||||||
|
fallback_to_clipboard = true;
|
||||||
|
pre_type_delay_ms = 100;
|
||||||
|
notification = {
|
||||||
|
on_recording_start = true;
|
||||||
|
on_recording_stop = true;
|
||||||
|
on_transcription = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
inputs.hyprscratch.homeModules.default
|
inputs.hyprscratch.homeModules.default
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
myModules.gitea-runner.enable = false;
|
myModules.gitea-runner.enable = false;
|
||||||
myModules.postgres.enable = true;
|
myModules.postgres.enable = true;
|
||||||
myModules.tts.enable = true;
|
myModules.tts.enable = true;
|
||||||
|
myModules.voxtype.enable = true;
|
||||||
myModules.cua = {
|
myModules.cua = {
|
||||||
enable = true;
|
enable = true;
|
||||||
android = {
|
android = {
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ in {
|
|||||||
type = lib.types.ints.positive;
|
type = lib.types.ints.positive;
|
||||||
description = "Cursor size exported to Hyprland and cursor-aware toolkits.";
|
description = "Cursor size exported to Hyprland and cursor-aware toolkits.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
myModules.voxtype.enable = lib.mkEnableOption "local push-to-talk voice dictation";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|||||||
Reference in New Issue
Block a user