whisper-key-local 0.5.2__tar.gz → 0.5.3__tar.gz

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.
Files changed (35) hide show
  1. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/PKG-INFO +2 -2
  2. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/pyproject.toml +2 -2
  3. whisper_key_local-0.5.3/src/whisper_key/assets/version.txt +1 -0
  4. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/audio_recorder.py +2 -9
  5. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key_local.egg-info/PKG-INFO +2 -2
  6. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key_local.egg-info/requires.txt +1 -1
  7. whisper_key_local-0.5.2/src/whisper_key/assets/version.txt +0 -1
  8. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/README.md +0 -0
  9. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/setup.cfg +0 -0
  10. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/__init__.py +0 -0
  11. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/assets/portaudio.dll +0 -0
  12. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/assets/sounds/record_cancel.wav +0 -0
  13. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/assets/sounds/record_start.wav +0 -0
  14. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/assets/sounds/record_stop.wav +0 -0
  15. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/assets/tray_idle.png +0 -0
  16. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/assets/tray_processing.png +0 -0
  17. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/assets/tray_recording.png +0 -0
  18. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/audio_feedback.py +0 -0
  19. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/clipboard_manager.py +0 -0
  20. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/config.defaults.yaml +0 -0
  21. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/config_manager.py +0 -0
  22. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/console_manager.py +0 -0
  23. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/hotkey_listener.py +0 -0
  24. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/instance_manager.py +0 -0
  25. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/main.py +0 -0
  26. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/model_registry.py +0 -0
  27. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/state_manager.py +0 -0
  28. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/system_tray.py +0 -0
  29. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/utils.py +0 -0
  30. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/voice_activity_detection.py +0 -0
  31. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key/whisper_engine.py +0 -0
  32. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key_local.egg-info/SOURCES.txt +0 -0
  33. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key_local.egg-info/dependency_links.txt +0 -0
  34. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key_local.egg-info/entry_points.txt +0 -0
  35. {whisper_key_local-0.5.2 → whisper_key_local-0.5.3}/src/whisper_key_local.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: whisper-key-local
3
- Version: 0.5.2
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: scipy>=1.11.0
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "whisper-key-local"
7
- version = "0.5.2"
7
+ version = "0.5.3"
8
8
  description = "Local faster-whisper speech-to-text app with global hotkeys for Windows"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -15,7 +15,7 @@ dependencies = [
15
15
  "faster-whisper>=1.2.1",
16
16
  "ctranslate2>=4.6.3",
17
17
  "numpy>=1.24.0",
18
- "scipy>=1.11.0",
18
+ "soxr>=0.3.0",
19
19
  "sounddevice>=0.4.6",
20
20
  "global-hotkeys>=0.1.7; platform_system=='Windows'",
21
21
  "pyperclip>=1.8.2",
@@ -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
- from scipy.signal import resample_poly
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: whisper-key-local
3
- Version: 0.5.2
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: scipy>=1.11.0
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,7 +1,7 @@
1
1
  faster-whisper>=1.2.1
2
2
  ctranslate2>=4.6.3
3
3
  numpy>=1.24.0
4
- scipy>=1.11.0
4
+ soxr>=0.3.0
5
5
  sounddevice>=0.4.6
6
6
  pyperclip>=1.8.2
7
7
  ruamel.yaml>=0.18.14