python-voiceio 1.18.2__py3-none-any.whl → 1.18.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-voiceio
3
- Version: 1.18.2
3
+ Version: 1.18.3
4
4
  Summary: Voice dictation for Linux. Speak → text, locally, instantly.
5
5
  Author: Hugo Montenegro
6
6
  License-Expression: MIT
@@ -1,5 +1,5 @@
1
- python_voiceio-1.18.2.dist-info/licenses/LICENSE,sha256=Gz61o8jFTAvZUZyB3nWDB3DQQVuipjfPkVu9W8hBHM0,1072
2
- voiceio/__init__.py,sha256=UGngD1th5e8ZpEKcPUfYxQaD9diK7IjChNXBj0_xMOE,23
1
+ python_voiceio-1.18.3.dist-info/licenses/LICENSE,sha256=Gz61o8jFTAvZUZyB3nWDB3DQQVuipjfPkVu9W8hBHM0,1072
2
+ voiceio/__init__.py,sha256=iEKbRDpgkg-TiqlO5JNnwzvOkd-wBXmA8zTN5eliBK4,23
3
3
  voiceio/__main__.py,sha256=xT5QCGGreYMisHO7Lh_Y-xAQ2TOzG2D7npKknGNcWSY,53
4
4
  voiceio/announce.py,sha256=oqNJn1c4j5bTQ00-LXNWZ3_hIC9L9Lb3rkp0-LwkCfY,3798
5
5
  voiceio/app.py,sha256=tStX_aQyMhFK3NUFWvwowx0jW4a7szX6zkOoP7-lu60,49485
@@ -16,7 +16,7 @@ voiceio/display.py,sha256=ZGBNRjuvg3chkJjduyPJs4s5ZY5vqC_mcaov94PIPzo,5313
16
16
  voiceio/errorlog.py,sha256=e5UKVp4p-UBg0tTpcBREY5KoHMFZFJ9oNK3vOh8H6jw,7044
17
17
  voiceio/feedback.py,sha256=69Vepy2Z0gsDdpLzdLJbgrEHzSJm2luQ7yT4_nAnZCQ,9321
18
18
  voiceio/focus.py,sha256=PGj839UUZE7ZPwaiLDTAX3S8d_QjwaT4y6ugXyylL9M,4304
19
- voiceio/health.py,sha256=rgFlhTvLe-pneJB2mkQrz8vhvpauBkiA64dkms_etrc,28351
19
+ voiceio/health.py,sha256=_DrTi0O6murt05mNQQbd0UGU3GC85J67pcXNarJGeTk,29190
20
20
  voiceio/hints.py,sha256=wQPVie-zX-SFfz3C0YxL40_51SCkF1Xt8F1vwI_5yoY,1440
21
21
  voiceio/history.py,sha256=WNjfjakY8qwgRm3W6WBDlpS9CSgS8ecZ9RGGBZsW80w,5898
22
22
  voiceio/idle_audio.py,sha256=0GEbm0g-a2uVxIMWEKpaYus06mnrc8qvWr09a85FWS0,7225
@@ -35,7 +35,7 @@ voiceio/privacy.py,sha256=FqnA9jx9RCqWW-i6Dh7JcT7vzz97kbUGyQEvsHLvpqc,573
35
35
  voiceio/prompt.py,sha256=9iza8KoQxvO_U9NPMJ8Ep7j-zkIs9nW8N5sacCRpsEk,2904
36
36
  voiceio/quiet_audio.py,sha256=AapeuhrJwR20fsl-Ksgv4qpptrcQezk6A2_i4Kr18Ks,11451
37
37
  voiceio/recorder.py,sha256=3J42IETpTY68FHcFs4FetjxXgl7jdPbAMte5hcTxfrU,18763
38
- voiceio/report.py,sha256=DKuNhCAw5rZxnGy5WXIeJBEg83dRXvMGvkY2kQn1Suc,13255
38
+ voiceio/report.py,sha256=BhzXr_LHxOqdUQL8DpgZBpNFlB0NIQgc_6fl9NStwc8,13342
39
39
  voiceio/retention.py,sha256=C_oAx7X8tIUDTFjIF6GWT_qFawiZ2HKTyfPz3hbiIRY,5994
40
40
  voiceio/service.py,sha256=0kUAJmpXifNzGeCy4ob2meVREdjnoI_En2qwJIxPBXI,19521
41
41
  voiceio/spool.py,sha256=k0rdBhDsocIoMa9xpo0GVFSyJ1CUCSSTtws8Sfw_ViA,4369
@@ -143,8 +143,8 @@ voiceio/typers/pynput_type.py,sha256=f3w131YWJfNGd4IAcWtuKd2Gcwu3467QwGW3OBUEXNI
143
143
  voiceio/typers/wtype.py,sha256=11vOAKHjMat-fITd4sUoUWwgniyVp65EbH3i4mL6Vhg,1762
144
144
  voiceio/typers/xdotool.py,sha256=OuT_zW_z07jSAqu9Cmn_gL1mJfQsiX62ecqFRvpAarQ,1332
145
145
  voiceio/typers/ydotool.py,sha256=lSeYZPnkeKbwDg152t6b76eOmGx5PY0NOxCPd7ORf78,6168
146
- python_voiceio-1.18.2.dist-info/METADATA,sha256=EBgD_Q76o4QDldowdzznV632B4rZDbuaamWwd22gVcY,9629
147
- python_voiceio-1.18.2.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
148
- python_voiceio-1.18.2.dist-info/entry_points.txt,sha256=iDIDmhvQ3xeN_CWsFne1t9STZ08I25I_wp0xmde_vMs,94
149
- python_voiceio-1.18.2.dist-info/top_level.txt,sha256=piwtn309lD6uexQyXdZ-efAVBJF9y6Wfr48Z-8zkNhg,8
150
- python_voiceio-1.18.2.dist-info/RECORD,,
146
+ python_voiceio-1.18.3.dist-info/METADATA,sha256=NhRxHc0YFNgDhAKyDmixUJvsph0C7g2rRWOeQsuqXEQ,9629
147
+ python_voiceio-1.18.3.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
148
+ python_voiceio-1.18.3.dist-info/entry_points.txt,sha256=iDIDmhvQ3xeN_CWsFne1t9STZ08I25I_wp0xmde_vMs,94
149
+ python_voiceio-1.18.3.dist-info/top_level.txt,sha256=piwtn309lD6uexQyXdZ-efAVBJF9y6Wfr48Z-8zkNhg,8
150
+ python_voiceio-1.18.3.dist-info/RECORD,,
voiceio/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.18.2"
1
+ __version__ = "1.18.3"
voiceio/health.py CHANGED
@@ -51,6 +51,8 @@ class HealthReport:
51
51
  tray_fix_hint: str = ""
52
52
  features: FeatureGroups = field(default_factory=FeatureGroups)
53
53
  warnings: list[str] = field(default_factory=list)
54
+ # Where Whisper decodes: "cuda", or "cpu (why)". "" for other backends.
55
+ whisper_device: str = ""
54
56
 
55
57
  @property
56
58
  def all_ok(self) -> bool:
@@ -123,7 +125,8 @@ def check_health(p: plat.Platform | None = None) -> HealthReport:
123
125
  "Grant it in System Settings → Privacy & Security → Accessibility."
124
126
  )
125
127
 
126
- if gpu := _gpu_libs_warning():
128
+ report.whisper_device, gpu = _whisper_gpu()
129
+ if gpu:
127
130
  report.warnings.append(gpu)
128
131
  if kde := _kde_input_method_warning(report.platform):
129
132
  report.warnings.append(kde)
@@ -174,22 +177,33 @@ def _gpu_libs_warning() -> str:
174
177
  """Why Whisper can't use the GPU it sees, when that's a missing CUDA
175
178
  library (a torch for another CUDA major, pulled in by the train extra,
176
179
  is the usual way). The daemon then decodes on CPU instead."""
180
+ return _whisper_gpu()[1]
181
+
182
+
183
+ def _whisper_gpu() -> tuple[str, str]:
184
+ """(device Whisper decodes on, warning). The device is "cuda" or
185
+ "cpu (why)", and "" for a non-Whisper model; a CPU fallback with a
186
+ warning points at it rather than repeating it."""
177
187
  try:
178
188
  from voiceio.config import load
179
189
  cfg = load().model
180
190
  from voiceio.core.decoders.catalog import is_whisper
181
- if cfg.device not in ("auto", "cuda") or not is_whisper(cfg.name):
182
- return ""
191
+ if not is_whisper(cfg.name):
192
+ return "", ""
193
+ if cfg.device not in ("auto", "cuda"):
194
+ return f"cpu (model.device = {cfg.device})", ""
183
195
  except Exception: # noqa: BLE001
184
- return ""
196
+ return "", ""
185
197
  missing = plat.missing_cuda_libs()
186
198
  if missing is None:
187
- return plat.cuda_device_problem()
199
+ problem = plat.cuda_device_problem()
200
+ return ("cpu (see warnings)" if problem else "cpu (no CUDA device)"), problem
188
201
  if not missing:
189
- return ""
190
- return (f"A GPU is present but {', '.join(missing)} can't be loaded, so Whisper "
191
- f"decodes on CPU. {plat.cuda_libs_hint(missing)}. Or set "
192
- "model.device = \"cpu\" in config.toml to stay on CPU.")
202
+ return "cuda", ""
203
+ return "cpu (see warnings)", (
204
+ f"A GPU is present but {', '.join(missing)} can't be loaded, so Whisper "
205
+ f"decodes on CPU. {plat.cuda_libs_hint(missing)}. Or set "
206
+ "model.device = \"cpu\" in config.toml to stay on CPU.")
193
207
 
194
208
 
195
209
  def _check_features() -> FeatureGroups:
@@ -524,6 +538,10 @@ def format_report(report: HealthReport) -> str:
524
538
  lines[-1] += f" {DIM}{report.tray_reason}{RESET}"
525
539
  if report.tray_fix_hint:
526
540
  lines.append(f" {DIM}→ {report.tray_fix_hint}{RESET}")
541
+ if report.whisper_device:
542
+ fallback = "warnings" in report.whisper_device # a GPU it can't use
543
+ lines.append(_check_line("Whisper decodes on", not fallback,
544
+ report.whisper_device, warn=fallback))
527
545
 
528
546
  # IBus pipeline
529
547
  if report.ibus_checks is not None:
voiceio/report.py CHANGED
@@ -193,6 +193,8 @@ def build_report(
193
193
  if health.ibus_checks is not None and not health.ibus_checks.voiceio_running else ""),
194
194
  f"model: {_model_label(cfg.model.name)}",
195
195
  ]
196
+ if health.whisper_device:
197
+ lines.append(f"device: {health.whisper_device}")
196
198
  if unavailable:
197
199
  lines.append("fallbacks unavailable: " + ", ".join(unavailable))
198
200
  lines.append("failed: " + "; ".join(failed) if failed else "failed: none")