whisper-key-local 0.5.0__py3-none-any.whl → 0.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- whisper_key/assets/version.txt +1 -1
- whisper_key/clipboard_manager.py +10 -6
- whisper_key/config.defaults.yaml +10 -2
- whisper_key/config_manager.py +18 -12
- whisper_key/main.py +2 -1
- whisper_key/system_tray.py +2 -0
- whisper_key/utils.py +6 -1
- {whisper_key_local-0.5.0.dist-info → whisper_key_local-0.5.1.dist-info}/METADATA +1 -1
- {whisper_key_local-0.5.0.dist-info → whisper_key_local-0.5.1.dist-info}/RECORD +12 -12
- {whisper_key_local-0.5.0.dist-info → whisper_key_local-0.5.1.dist-info}/WHEEL +0 -0
- {whisper_key_local-0.5.0.dist-info → whisper_key_local-0.5.1.dist-info}/entry_points.txt +0 -0
- {whisper_key_local-0.5.0.dist-info → whisper_key_local-0.5.1.dist-info}/top_level.txt +0 -0
whisper_key/assets/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.5.
|
|
1
|
+
0.5.1
|
whisper_key/clipboard_manager.py
CHANGED
|
@@ -6,14 +6,18 @@ import pyperclip
|
|
|
6
6
|
import win32gui
|
|
7
7
|
import pyautogui
|
|
8
8
|
|
|
9
|
+
from .utils import parse_hotkey
|
|
10
|
+
|
|
9
11
|
pyautogui.FAILSAFE = True # Enable "move mouse to corner to abort automation"
|
|
10
12
|
|
|
11
|
-
class ClipboardManager:
|
|
12
|
-
def __init__(self, key_simulation_delay, auto_paste, preserve_clipboard):
|
|
13
|
+
class ClipboardManager:
|
|
14
|
+
def __init__(self, key_simulation_delay, auto_paste, preserve_clipboard, paste_hotkey):
|
|
13
15
|
self.logger = logging.getLogger(__name__)
|
|
14
16
|
self.key_simulation_delay = key_simulation_delay
|
|
15
17
|
self.auto_paste = auto_paste
|
|
16
18
|
self.preserve_clipboard = preserve_clipboard
|
|
19
|
+
self.paste_hotkey = paste_hotkey
|
|
20
|
+
self.paste_keys = parse_hotkey(paste_hotkey)
|
|
17
21
|
self._configure_pyautogui_timing()
|
|
18
22
|
self._test_clipboard_access()
|
|
19
23
|
self._print_status()
|
|
@@ -31,11 +35,11 @@ class ClipboardManager:
|
|
|
31
35
|
raise
|
|
32
36
|
|
|
33
37
|
def _print_status(self):
|
|
38
|
+
hotkey_display = self.paste_hotkey.upper()
|
|
34
39
|
if self.auto_paste:
|
|
35
|
-
|
|
36
|
-
print(f" ✓ Auto-paste is ENABLED using {method_name}")
|
|
40
|
+
print(f" ✓ Auto-paste is ENABLED using key simulation ({hotkey_display})")
|
|
37
41
|
else:
|
|
38
|
-
print(" ✗ Auto-paste is DISABLED - paste manually with
|
|
42
|
+
print(f" ✗ Auto-paste is DISABLED - paste manually with {hotkey_display}")
|
|
39
43
|
|
|
40
44
|
def copy_text(self, text: str) -> bool:
|
|
41
45
|
if not text:
|
|
@@ -106,7 +110,7 @@ class ClipboardManager:
|
|
|
106
110
|
if not self.copy_text(text):
|
|
107
111
|
return False
|
|
108
112
|
|
|
109
|
-
pyautogui.hotkey(
|
|
113
|
+
pyautogui.hotkey(*self.paste_keys)
|
|
110
114
|
|
|
111
115
|
print(f" ✓ Auto-pasted via key simulation")
|
|
112
116
|
|
whisper_key/config.defaults.yaml
CHANGED
|
@@ -171,12 +171,20 @@ clipboard: # Clipboard Behavior
|
|
|
171
171
|
# true = paste immediately to active window
|
|
172
172
|
# false = only copy to clipboard (paste manually with Ctrl+V)
|
|
173
173
|
auto_paste: true
|
|
174
|
-
|
|
174
|
+
|
|
175
|
+
# Key combination to simulate paste
|
|
176
|
+
# Format: modifier+key (use lowercase)
|
|
177
|
+
# Examples:
|
|
178
|
+
# - "ctrl+v" (standard paste)
|
|
179
|
+
# - "ctrl+shift+v" (plain text paste in some apps)
|
|
180
|
+
# - "shift+insert" (terminal paste)
|
|
181
|
+
paste_hotkey: ctrl+v
|
|
182
|
+
|
|
175
183
|
# Preserve existing clipboard content when pasting
|
|
176
184
|
# true = save current clipboard, paste transcription, then restore original clipboard
|
|
177
185
|
# false = replace clipboard with transcription (default behavior)
|
|
178
186
|
preserve_clipboard: true
|
|
179
|
-
|
|
187
|
+
|
|
180
188
|
# Delay for key simulation operations (seconds)
|
|
181
189
|
# Small delay ensures operations complete reliably
|
|
182
190
|
key_simulation_delay: 0.05
|
whisper_key/config_manager.py
CHANGED
|
@@ -226,20 +226,25 @@ class ConfigManager:
|
|
|
226
226
|
yaml.dump(config_data, temp_output)
|
|
227
227
|
lines = temp_output.getvalue().split('\n')
|
|
228
228
|
|
|
229
|
-
|
|
230
|
-
for line in lines:
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
filtered_lines.append(line)
|
|
229
|
+
content_start = 0
|
|
230
|
+
for i, line in enumerate(lines):
|
|
231
|
+
stripped = line.strip()
|
|
232
|
+
if stripped and not stripped.startswith('#'):
|
|
233
|
+
content_start = i
|
|
234
|
+
break
|
|
236
235
|
|
|
237
|
-
|
|
238
|
-
header.append("# WHISPER KEY - PERSONAL CONFIGURATION")
|
|
239
|
-
header.append("# =============================================================================")
|
|
240
|
-
header.append("")
|
|
236
|
+
content_lines = lines[content_start:]
|
|
241
237
|
|
|
242
|
-
|
|
238
|
+
header = [
|
|
239
|
+
"# =============================================================================",
|
|
240
|
+
"# WHISPER KEY - PERSONAL CONFIGURATION",
|
|
241
|
+
"# =============================================================================",
|
|
242
|
+
"# Edit this file to customize your settings",
|
|
243
|
+
"# Save and restart Whisper Key for changes to take effect",
|
|
244
|
+
""
|
|
245
|
+
]
|
|
246
|
+
|
|
247
|
+
return '\n'.join(header + content_lines)
|
|
243
248
|
|
|
244
249
|
def save_config_to_user_settings_file(self):
|
|
245
250
|
try:
|
|
@@ -356,6 +361,7 @@ class ConfigValidator:
|
|
|
356
361
|
self._validate_boolean('clipboard.auto_paste')
|
|
357
362
|
self._validate_boolean('clipboard.preserve_clipboard')
|
|
358
363
|
self._validate_numeric_range('clipboard.key_simulation_delay', min_val=0, description='key simulation delay')
|
|
364
|
+
self._validate_hotkey_string('clipboard.paste_hotkey')
|
|
359
365
|
|
|
360
366
|
self._validate_boolean('hotkey.stop_with_modifier_enabled')
|
|
361
367
|
self._validate_boolean('hotkey.auto_enter_enabled')
|
whisper_key/main.py
CHANGED
|
@@ -98,7 +98,8 @@ def setup_clipboard_manager(clipboard_config):
|
|
|
98
98
|
return ClipboardManager(
|
|
99
99
|
key_simulation_delay=clipboard_config['key_simulation_delay'],
|
|
100
100
|
auto_paste=clipboard_config['auto_paste'],
|
|
101
|
-
preserve_clipboard=clipboard_config['preserve_clipboard']
|
|
101
|
+
preserve_clipboard=clipboard_config['preserve_clipboard'],
|
|
102
|
+
paste_hotkey=clipboard_config['paste_hotkey']
|
|
102
103
|
)
|
|
103
104
|
|
|
104
105
|
def setup_audio_feedback(audio_feedback_config):
|
whisper_key/system_tray.py
CHANGED
|
@@ -233,6 +233,7 @@ class SystemTray:
|
|
|
233
233
|
|
|
234
234
|
def _view_log_file(self, icon=None, item=None):
|
|
235
235
|
try:
|
|
236
|
+
print("⚙️ Opening log file...")
|
|
236
237
|
log_path = self.config_manager.get_log_file_path()
|
|
237
238
|
os.startfile(log_path)
|
|
238
239
|
except Exception as e:
|
|
@@ -240,6 +241,7 @@ class SystemTray:
|
|
|
240
241
|
|
|
241
242
|
def _open_config_file(self, icon=None, item=None):
|
|
242
243
|
try:
|
|
244
|
+
print("⚙️ Opening settings...")
|
|
243
245
|
config_path = self.config_manager.user_settings_path
|
|
244
246
|
os.startfile(config_path)
|
|
245
247
|
except Exception as e:
|
whisper_key/utils.py
CHANGED
|
@@ -20,9 +20,14 @@ class OptionalComponent:
|
|
|
20
20
|
def beautify_hotkey(hotkey_string: str) -> str:
|
|
21
21
|
if not hotkey_string:
|
|
22
22
|
return ""
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
return hotkey_string.replace('+', '+').upper()
|
|
25
25
|
|
|
26
|
+
def parse_hotkey(hotkey_string: str) -> list:
|
|
27
|
+
if not hotkey_string:
|
|
28
|
+
return []
|
|
29
|
+
return hotkey_string.lower().split('+')
|
|
30
|
+
|
|
26
31
|
def is_installed_package():
|
|
27
32
|
# Check if running from an installed package
|
|
28
33
|
return 'site-packages' in __file__
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
whisper_key/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
whisper_key/audio_feedback.py,sha256=5vBtX3K_x9HJiYmgw48n-FNIeLAYlPulsnC0HTQNk58,2219
|
|
3
3
|
whisper_key/audio_recorder.py,sha256=FJWnDOvdMlg0atH7379JcufYN-b200iXK1beje6Pt-M,11257
|
|
4
|
-
whisper_key/clipboard_manager.py,sha256=
|
|
5
|
-
whisper_key/config.defaults.yaml,sha256=
|
|
6
|
-
whisper_key/config_manager.py,sha256=
|
|
4
|
+
whisper_key/clipboard_manager.py,sha256=BOxh7ZiJ8bZAwpmlxX0yTC_YYPsmCOdPV_hpcs9P_50,5626
|
|
5
|
+
whisper_key/config.defaults.yaml,sha256=DDSywYBpIHVE6KpviB_B-Vcfqj6b0-Y5evcjUJH8_rM,7914
|
|
6
|
+
whisper_key/config_manager.py,sha256=OebWO-gl7bTxOPZ2ibZsAcPoZLEN-XR1CeeVR6RRJVk,18396
|
|
7
7
|
whisper_key/console_manager.py,sha256=h-y8yU2xJ0anY4KavgeSAL-DWxGFoLxWtSeEvHfN0WY,2006
|
|
8
8
|
whisper_key/hotkey_listener.py,sha256=M3jBGMNjZEr5rV8uzOmJ7YgdKNnjtRJDiRjFuwNJ37Q,7987
|
|
9
9
|
whisper_key/instance_manager.py,sha256=LNMlwODf2hfw0dx6K2ADtSfuu8cYltdct_CBBreuWt8,1020
|
|
10
|
-
whisper_key/main.py,sha256=
|
|
10
|
+
whisper_key/main.py,sha256=PRoQFYKeE3UHm1SP0N97pe6f6kw6AcXM17SlvNVFkDk,8832
|
|
11
11
|
whisper_key/model_registry.py,sha256=G8BC2jZpTD7cOEeWcfCPPNtu7MsGfyEukuIpfHe_3bk,2718
|
|
12
12
|
whisper_key/state_manager.py,sha256=U2kfEMK52qSJ7q-ZdDOxBCWUHe_NFLBMEtPhJJsCx60,19368
|
|
13
|
-
whisper_key/system_tray.py,sha256=
|
|
14
|
-
whisper_key/utils.py,sha256=
|
|
13
|
+
whisper_key/system_tray.py,sha256=KMXa24hQW7ovnphiU9OPAo5VIiz1KE3BoMvV0D2E48c,13237
|
|
14
|
+
whisper_key/utils.py,sha256=xUs1DineJbdl70O4aW8i4tTQfurWHmbHjH8WYSPFgmI,2385
|
|
15
15
|
whisper_key/voice_activity_detection.py,sha256=Q6wzuUrMQfwk5atOYcbhuug50EXQmSQeo3UT4gVEKs8,9588
|
|
16
16
|
whisper_key/whisper_engine.py,sha256=Qop6fAtUHKeU346jtdBQoUnNpwoeaiDZn3BQJnUGTc0,7126
|
|
17
17
|
whisper_key/assets/portaudio.dll,sha256=7HKPuVjxqajT424rbSKs0RnGGk9rQ92MJiaH7taboHg,951689
|
|
18
18
|
whisper_key/assets/tray_idle.png,sha256=wl2XGtloFMOrTuYtFa74RaeePWy6H0KRiUe7a_uiCKM,1579
|
|
19
19
|
whisper_key/assets/tray_processing.png,sha256=TS_247NBdkt3P5jZv2J1md3YbdQcQrz4LLAsyFLvk1k,174
|
|
20
20
|
whisper_key/assets/tray_recording.png,sha256=JJX9-CiKHeImDb6w3vSRicU6uoRt1H2rNIVeo6dPgcA,1174
|
|
21
|
-
whisper_key/assets/version.txt,sha256=
|
|
21
|
+
whisper_key/assets/version.txt,sha256=jzR6dTEkRUvsIdgn9MBhKkIGmoYjaaprAVbpJfXsk1w,5
|
|
22
22
|
whisper_key/assets/sounds/record_cancel.wav,sha256=KyjCjKdd1FkAUXCxHkg9Gqo3EuOdeyUvT9n1CKG54Zg,18206
|
|
23
23
|
whisper_key/assets/sounds/record_start.wav,sha256=E704RZ433LwgdPyDN6G9csfk0V0NefBSbYZqRKwGnq4,96846
|
|
24
24
|
whisper_key/assets/sounds/record_stop.wav,sha256=E704RZ433LwgdPyDN6G9csfk0V0NefBSbYZqRKwGnq4,96846
|
|
25
|
-
whisper_key_local-0.5.
|
|
26
|
-
whisper_key_local-0.5.
|
|
27
|
-
whisper_key_local-0.5.
|
|
28
|
-
whisper_key_local-0.5.
|
|
29
|
-
whisper_key_local-0.5.
|
|
25
|
+
whisper_key_local-0.5.1.dist-info/METADATA,sha256=1TJA7VihkjMAZTcUGilIfLVOMU4R-8-FUzgSFkyXrmk,4284
|
|
26
|
+
whisper_key_local-0.5.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
27
|
+
whisper_key_local-0.5.1.dist-info/entry_points.txt,sha256=70ibxew9nZShJozx4Jcbuwd4Fcrr0Ji_BD7gk6azl4E,54
|
|
28
|
+
whisper_key_local-0.5.1.dist-info/top_level.txt,sha256=gtXj51Nif3n1odPP3OvpiljIojWTpRBLCNlhzKWisxQ,12
|
|
29
|
+
whisper_key_local-0.5.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|