From 1c09556c6117df6464f84289834ef338b8ca156e Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Fri, 29 Sep 2023 18:30:53 +0100 Subject: [PATCH] adds missing karaoke mode `k v` patch bump --- pyproject.toml | 2 +- src/nvda_voicemeeter/window.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a2abb33..572f57f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nvda_voicemeeter" -version = "0.5.3" +version = "0.5.4" description = "A Voicemeeter app compatible with NVDA" authors = [ { name = "onyx-and-iris", email = "code@onyxandiris.online" }, diff --git a/src/nvda_voicemeeter/window.py b/src/nvda_voicemeeter/window.py index 6f32206..9ccf2d4 100644 --- a/src/nvda_voicemeeter/window.py +++ b/src/nvda_voicemeeter/window.py @@ -668,14 +668,14 @@ class NVDAVMWindow(psg.Window): actual = "k" else: actual = "mc" - phonetic = {"k": "karaoke"} if actual == "k": + opts = ["off", "k m", "k 1", "k 2", "k v"] next_val = self.vm.strip[int(index)].k + 1 - if next_val == 4: + if next_val == len(opts): next_val = 0 setattr(self.vm.strip[int(index)], actual, next_val) self.cache["strip"][f"STRIP {index}||{param}"] = next_val - self.nvda.speak(["off", "k m", "k 1", "k 2"][next_val]) + self.nvda.speak(opts[next_val]) else: val = not self.cache["strip"][f"STRIP {index}||{param}"] setattr(self.vm.strip[int(index)], actual, val)