whisper-key-local 0.5.1__py3-none-any.whl → 0.5.3__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/audio_recorder.py +2 -9
- whisper_key/hotkey_listener.py +4 -1
- {whisper_key_local-0.5.1.dist-info → whisper_key_local-0.5.3.dist-info}/METADATA +2 -2
- {whisper_key_local-0.5.1.dist-info → whisper_key_local-0.5.3.dist-info}/RECORD +8 -8
- {whisper_key_local-0.5.1.dist-info → whisper_key_local-0.5.3.dist-info}/WHEEL +0 -0
- {whisper_key_local-0.5.1.dist-info → whisper_key_local-0.5.3.dist-info}/entry_points.txt +0 -0
- {whisper_key_local-0.5.1.dist-info → whisper_key_local-0.5.3.dist-info}/top_level.txt +0 -0
whisper_key/assets/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.5.
|
|
1
|
+
0.5.3
|
whisper_key/audio_recorder.py
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import threading
|
|
3
3
|
import time
|
|
4
|
-
from math import gcd
|
|
5
4
|
from typing import Optional, Callable
|
|
6
5
|
|
|
7
6
|
import numpy as np
|
|
8
7
|
import sounddevice as sd
|
|
9
|
-
|
|
8
|
+
import soxr
|
|
10
9
|
|
|
11
10
|
from .voice_activity_detection import VadEvent, VAD_CHUNK_SIZE
|
|
12
11
|
|
|
@@ -99,13 +98,7 @@ class AudioRecorder:
|
|
|
99
98
|
def _resample_audio(self, audio: np.ndarray, orig_rate: int, target_rate: int) -> np.ndarray:
|
|
100
99
|
if orig_rate == target_rate or len(audio) == 0:
|
|
101
100
|
return audio
|
|
102
|
-
|
|
103
|
-
g = gcd(orig_rate, target_rate)
|
|
104
|
-
up = target_rate // g
|
|
105
|
-
down = orig_rate // g
|
|
106
|
-
|
|
107
|
-
resampled = resample_poly(audio.flatten(), up, down)
|
|
108
|
-
return resampled.astype(np.float32)
|
|
101
|
+
return soxr.resample(audio.flatten(), orig_rate, target_rate).astype(np.float32)
|
|
109
102
|
|
|
110
103
|
def _handle_vad_event(self, event: VadEvent):
|
|
111
104
|
self.on_vad_event(event)
|
whisper_key/hotkey_listener.py
CHANGED
|
@@ -129,7 +129,10 @@ class HotkeyListener:
|
|
|
129
129
|
self.modifier_key_released = True
|
|
130
130
|
|
|
131
131
|
def _extract_first_modifier(self, hotkey_str: str) -> str:
|
|
132
|
-
|
|
132
|
+
parts = hotkey_str.lower().split('+')
|
|
133
|
+
if len(parts) > 1:
|
|
134
|
+
return parts[0].strip()
|
|
135
|
+
return None
|
|
133
136
|
|
|
134
137
|
def start_listening(self):
|
|
135
138
|
if self.is_listening:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: whisper-key-local
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.3
|
|
4
4
|
Summary: Local faster-whisper speech-to-text app with global hotkeys for Windows
|
|
5
5
|
Author-email: Pin Wang <pinwang@gmail.com>
|
|
6
6
|
Requires-Python: >=3.11
|
|
@@ -8,7 +8,7 @@ Description-Content-Type: text/markdown
|
|
|
8
8
|
Requires-Dist: faster-whisper>=1.2.1
|
|
9
9
|
Requires-Dist: ctranslate2>=4.6.3
|
|
10
10
|
Requires-Dist: numpy>=1.24.0
|
|
11
|
-
Requires-Dist:
|
|
11
|
+
Requires-Dist: soxr>=0.3.0
|
|
12
12
|
Requires-Dist: sounddevice>=0.4.6
|
|
13
13
|
Requires-Dist: global-hotkeys>=0.1.7; platform_system == "Windows"
|
|
14
14
|
Requires-Dist: pyperclip>=1.8.2
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
whisper_key/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
whisper_key/audio_feedback.py,sha256=5vBtX3K_x9HJiYmgw48n-FNIeLAYlPulsnC0HTQNk58,2219
|
|
3
|
-
whisper_key/audio_recorder.py,sha256=
|
|
3
|
+
whisper_key/audio_recorder.py,sha256=_5yfSx47ZtV9EFUEzHmXkz4zQt6LzH9kgjb8SmH8SFU,11091
|
|
4
4
|
whisper_key/clipboard_manager.py,sha256=BOxh7ZiJ8bZAwpmlxX0yTC_YYPsmCOdPV_hpcs9P_50,5626
|
|
5
5
|
whisper_key/config.defaults.yaml,sha256=DDSywYBpIHVE6KpviB_B-Vcfqj6b0-Y5evcjUJH8_rM,7914
|
|
6
6
|
whisper_key/config_manager.py,sha256=OebWO-gl7bTxOPZ2ibZsAcPoZLEN-XR1CeeVR6RRJVk,18396
|
|
7
7
|
whisper_key/console_manager.py,sha256=h-y8yU2xJ0anY4KavgeSAL-DWxGFoLxWtSeEvHfN0WY,2006
|
|
8
|
-
whisper_key/hotkey_listener.py,sha256
|
|
8
|
+
whisper_key/hotkey_listener.py,sha256=-ny8rvdWysc_DZP-HQivEUlMBl6QMD7P0VvmdjFFL-Y,8060
|
|
9
9
|
whisper_key/instance_manager.py,sha256=LNMlwODf2hfw0dx6K2ADtSfuu8cYltdct_CBBreuWt8,1020
|
|
10
10
|
whisper_key/main.py,sha256=PRoQFYKeE3UHm1SP0N97pe6f6kw6AcXM17SlvNVFkDk,8832
|
|
11
11
|
whisper_key/model_registry.py,sha256=G8BC2jZpTD7cOEeWcfCPPNtu7MsGfyEukuIpfHe_3bk,2718
|
|
@@ -18,12 +18,12 @@ whisper_key/assets/portaudio.dll,sha256=7HKPuVjxqajT424rbSKs0RnGGk9rQ92MJiaH7tab
|
|
|
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=cTFryKz31mySrI5dsV42bOM-DdcEiqrC-Karpi2dCiA,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.3.dist-info/METADATA,sha256=2O1Pt-4yo91Ao3TPIAhS6kCfuD4BDdEAJ2FSr5E1ya8,4282
|
|
26
|
+
whisper_key_local-0.5.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
27
|
+
whisper_key_local-0.5.3.dist-info/entry_points.txt,sha256=70ibxew9nZShJozx4Jcbuwd4Fcrr0Ji_BD7gk6azl4E,54
|
|
28
|
+
whisper_key_local-0.5.3.dist-info/top_level.txt,sha256=gtXj51Nif3n1odPP3OvpiljIojWTpRBLCNlhzKWisxQ,12
|
|
29
|
+
whisper_key_local-0.5.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|