python-voiceio 1.18.7__tar.gz → 1.18.8__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 (248) hide show
  1. {python_voiceio-1.18.7/python_voiceio.egg-info → python_voiceio-1.18.8}/PKG-INFO +1 -1
  2. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/pyproject.toml +1 -1
  3. {python_voiceio-1.18.7 → python_voiceio-1.18.8/python_voiceio.egg-info}/PKG-INFO +1 -1
  4. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/python_voiceio.egg-info/SOURCES.txt +1 -0
  5. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_learn_pipeline.py +58 -0
  6. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_learn_summary.py +100 -5
  7. python_voiceio-1.18.8/voiceio/__init__.py +1 -0
  8. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/cli/learn.py +12 -1
  9. python_voiceio-1.18.8/voiceio/learn/lastrun.py +86 -0
  10. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/learn/summary.py +23 -10
  11. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/service.py +50 -16
  12. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/telemetry.py +5 -4
  13. python_voiceio-1.18.7/voiceio/__init__.py +0 -1
  14. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/LICENSE +0 -0
  15. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/README.md +0 -0
  16. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/python_voiceio.egg-info/dependency_links.txt +0 -0
  17. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/python_voiceio.egg-info/entry_points.txt +0 -0
  18. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/python_voiceio.egg-info/requires.txt +0 -0
  19. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/python_voiceio.egg-info/top_level.txt +0 -0
  20. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/setup.cfg +0 -0
  21. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_announce.py +0 -0
  22. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_app_wiring.py +0 -0
  23. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_audio_quality.py +0 -0
  24. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_audio_source.py +0 -0
  25. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_backend_probes.py +0 -0
  26. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_cancel.py +0 -0
  27. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_cli.py +0 -0
  28. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_clipboard_read.py +0 -0
  29. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_clipboard_typer.py +0 -0
  30. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_commands.py +0 -0
  31. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_concurrency_lockdown.py +0 -0
  32. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_config.py +0 -0
  33. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_context_terms.py +0 -0
  34. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_corrections.py +0 -0
  35. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_cuda_setup_hint.py +0 -0
  36. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_dead_mic.py +0 -0
  37. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_decoders.py +0 -0
  38. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_engine.py +0 -0
  39. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_errorlog.py +0 -0
  40. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_evdev_uaccess.py +0 -0
  41. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_evdev_x11_optional.py +0 -0
  42. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_fallback.py +0 -0
  43. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_fcitx_bridge.py +0 -0
  44. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_feedback_stream.py +0 -0
  45. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_focus.py +0 -0
  46. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_gpu_fallback.py +0 -0
  47. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_health.py +0 -0
  48. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_hints.py +0 -0
  49. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_history.py +0 -0
  50. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_hotkey_modes.py +0 -0
  51. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_ibus_engine_limits.py +0 -0
  52. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_ibus_engine_listener.py +0 -0
  53. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_ibus_pending.py +0 -0
  54. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_ibus_pids.py +0 -0
  55. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_ibus_ping.py +0 -0
  56. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_ibus_session.py +0 -0
  57. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_ibus_textlimit.py +0 -0
  58. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_ibus_typer.py +0 -0
  59. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_idle_audio.py +0 -0
  60. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_install_env.py +0 -0
  61. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_learn_clean.py +0 -0
  62. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_learn_import.py +0 -0
  63. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_learn_language.py +0 -0
  64. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_learn_metrics.py +0 -0
  65. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_learn_quiet.py +0 -0
  66. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_learn_resume.py +0 -0
  67. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_learn_review.py +0 -0
  68. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_learn_targets.py +0 -0
  69. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_llm.py +0 -0
  70. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_llm_api.py +0 -0
  71. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_mic_gain.py +0 -0
  72. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_modifier_guard.py +0 -0
  73. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_numbers.py +0 -0
  74. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_paste_last.py +0 -0
  75. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_pipeline.py +0 -0
  76. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_platform.py +0 -0
  77. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_postcorrect.py +0 -0
  78. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_postprocess.py +0 -0
  79. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_prebuffer.py +0 -0
  80. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_presence.py +0 -0
  81. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_prompt.py +0 -0
  82. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_quiet_audio.py +0 -0
  83. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_recorder_integration.py +0 -0
  84. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_replies.py +0 -0
  85. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_report.py +0 -0
  86. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_retention.py +0 -0
  87. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_robustness.py +0 -0
  88. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_security_hardening.py +0 -0
  89. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_server.py +0 -0
  90. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_service.py +0 -0
  91. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_setup.py +0 -0
  92. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_sherpa.py +0 -0
  93. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_spool.py +0 -0
  94. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_streaming.py +0 -0
  95. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_suggest.py +0 -0
  96. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_telemetry.py +0 -0
  97. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_tokens.py +0 -0
  98. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_transcriber.py +0 -0
  99. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_tray.py +0 -0
  100. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_tts.py +0 -0
  101. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_typer_manager.py +0 -0
  102. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_vad.py +0 -0
  103. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_vocabulary.py +0 -0
  104. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_wordfreq.py +0 -0
  105. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/tests/test_worker_decode.py +0 -0
  106. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/__main__.py +0 -0
  107. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/announce.py +0 -0
  108. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/app.py +0 -0
  109. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/audio_source.py +0 -0
  110. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/backends.py +0 -0
  111. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/cli/__init__.py +0 -0
  112. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/cli/configcmd.py +0 -0
  113. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/cli/corrections.py +0 -0
  114. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/cli/doctor.py +0 -0
  115. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/cli/history.py +0 -0
  116. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/cli/models.py +0 -0
  117. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/cli/replies.py +0 -0
  118. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/cli/servicecmd.py +0 -0
  119. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/cli/uninstall.py +0 -0
  120. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/cli/vocab.py +0 -0
  121. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/clipboard_read.py +0 -0
  122. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/commands.py +0 -0
  123. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/config.py +0 -0
  124. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/consent.py +0 -0
  125. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/context_terms.py +0 -0
  126. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/__init__.py +0 -0
  127. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/bias.py +0 -0
  128. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/decoders/__init__.py +0 -0
  129. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/decoders/base.py +0 -0
  130. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/decoders/catalog.py +0 -0
  131. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/decoders/faster_whisper/__init__.py +0 -0
  132. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/decoders/faster_whisper/worker.py +0 -0
  133. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/decoders/fetch.py +0 -0
  134. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/decoders/lanes.py +0 -0
  135. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/decoders/sherpa.py +0 -0
  136. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/decoders/whispercpp.py +0 -0
  137. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/engine.py +0 -0
  138. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/core/pipeline.py +0 -0
  139. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/corrections.py +0 -0
  140. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/data/60-voiceio-uaccess.rules +0 -0
  141. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/data/__init__.py +0 -0
  142. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/demo.py +0 -0
  143. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/display.py +0 -0
  144. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/errorlog.py +0 -0
  145. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/feedback.py +0 -0
  146. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/focus.py +0 -0
  147. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/health.py +0 -0
  148. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/hints.py +0 -0
  149. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/history.py +0 -0
  150. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/hotkeys/__init__.py +0 -0
  151. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/hotkeys/base.py +0 -0
  152. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/hotkeys/chain.py +0 -0
  153. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/hotkeys/evdev.py +0 -0
  154. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/hotkeys/pynput_backend.py +0 -0
  155. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/hotkeys/socket_backend.py +0 -0
  156. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/ibus/__init__.py +0 -0
  157. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/ibus/engine.py +0 -0
  158. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/ibus/install.py +0 -0
  159. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/ibus/pending.py +0 -0
  160. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/ibus/session.py +0 -0
  161. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/ibus/textlimit.py +0 -0
  162. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/idle_audio.py +0 -0
  163. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/install_env.py +0 -0
  164. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/learn/__init__.py +0 -0
  165. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/learn/augment.py +0 -0
  166. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/learn/clean.py +0 -0
  167. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/learn/evaluate.py +0 -0
  168. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/learn/importer.py +0 -0
  169. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/learn/metrics.py +0 -0
  170. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/learn/quiet.py +0 -0
  171. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/learn/review.py +0 -0
  172. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/learn/store.py +0 -0
  173. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/learn/teacher.py +0 -0
  174. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/learn/train.py +0 -0
  175. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/llm.py +0 -0
  176. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/llm_api.py +0 -0
  177. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/mic_gain.py +0 -0
  178. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/models/__init__.py +0 -0
  179. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/models/silero_vad.onnx +0 -0
  180. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/numbers.py +0 -0
  181. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/pidlock.py +0 -0
  182. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/platform.py +0 -0
  183. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/postcorrect.py +0 -0
  184. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/postprocess.py +0 -0
  185. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/power.py +0 -0
  186. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/presence.py +0 -0
  187. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/privacy.py +0 -0
  188. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/prompt.py +0 -0
  189. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/quiet_audio.py +0 -0
  190. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/recorder.py +0 -0
  191. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/replies.py +0 -0
  192. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/report.py +0 -0
  193. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/retention.py +0 -0
  194. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/server/__init__.py +0 -0
  195. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/server/__main__.py +0 -0
  196. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/server/app.py +0 -0
  197. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/server/config.py +0 -0
  198. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/server/runtime.py +0 -0
  199. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/setup/__init__.py +0 -0
  200. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/setup/configfile.py +0 -0
  201. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/setup/extras.py +0 -0
  202. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/setup/hotkey.py +0 -0
  203. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/setup/noninteractive.py +0 -0
  204. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/setup/speech.py +0 -0
  205. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/setup/steps.py +0 -0
  206. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/setup/system.py +0 -0
  207. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/setup/ui.py +0 -0
  208. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/sounds/__init__.py +0 -0
  209. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/sounds/alert.wav +0 -0
  210. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/sounds/commit.wav +0 -0
  211. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/sounds/start.wav +0 -0
  212. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/sounds/stop.wav +0 -0
  213. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/spool.py +0 -0
  214. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/streaming.py +0 -0
  215. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/suggest.py +0 -0
  216. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tokens.py +0 -0
  217. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tray/__init__.py +0 -0
  218. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tray/_icons.py +0 -0
  219. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tray/_indicator.py +0 -0
  220. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tray/_pystray.py +0 -0
  221. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tts/__init__.py +0 -0
  222. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tts/base.py +0 -0
  223. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tts/chain.py +0 -0
  224. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tts/edge_engine.py +0 -0
  225. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tts/espeak.py +0 -0
  226. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tts/piper_engine.py +0 -0
  227. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tts/player.py +0 -0
  228. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/tts/supertonic_engine.py +0 -0
  229. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/__init__.py +0 -0
  230. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/base.py +0 -0
  231. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/chain.py +0 -0
  232. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/clipboard.py +0 -0
  233. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/collecting.py +0 -0
  234. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/fcitx_bridge.py +0 -0
  235. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/ibus.py +0 -0
  236. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/manager.py +0 -0
  237. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/modifier_guard.py +0 -0
  238. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/paste.py +0 -0
  239. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/pynput_type.py +0 -0
  240. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/wtype.py +0 -0
  241. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/xdotool.py +0 -0
  242. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/typers/ydotool.py +0 -0
  243. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/ui.py +0 -0
  244. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/vad.py +0 -0
  245. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/vocab_stats.py +0 -0
  246. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/vocabulary.py +0 -0
  247. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/watchdog.py +0 -0
  248. {python_voiceio-1.18.7 → python_voiceio-1.18.8}/voiceio/wordfreq.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-voiceio
3
- Version: 1.18.7
3
+ Version: 1.18.8
4
4
  Summary: Voice dictation for Linux. Speak → text, locally, instantly.
5
5
  Author: Hugo Montenegro
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-voiceio"
7
- version = "1.18.7"
7
+ version = "1.18.8"
8
8
  description = "Voice dictation for Linux. Speak → text, locally, instantly."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-voiceio
3
- Version: 1.18.7
3
+ Version: 1.18.8
4
4
  Summary: Voice dictation for Linux. Speak → text, locally, instantly.
5
5
  Author: Hugo Montenegro
6
6
  License-Expression: MIT
@@ -188,6 +188,7 @@ voiceio/learn/augment.py
188
188
  voiceio/learn/clean.py
189
189
  voiceio/learn/evaluate.py
190
190
  voiceio/learn/importer.py
191
+ voiceio/learn/lastrun.py
191
192
  voiceio/learn/metrics.py
192
193
  voiceio/learn/quiet.py
193
194
  voiceio/learn/review.py
@@ -511,3 +511,61 @@ def test_schedule_on_states_the_configured_threshold(monkeypatch, capsys):
511
511
  monkeypatch.setattr(service, "learn_schedule_summary", lambda: "daily at 03:30")
512
512
  cli.cmd_schedule(argparse.Namespace(state="on", at=None, every=None, auto_promote=False))
513
513
  assert "retrains once 20+ clips are new" in capsys.readouterr().out
514
+
515
+
516
+ def test_maintain_records_the_run(monkeypatch):
517
+ """`learn report` reads what the last run did from its own record."""
518
+ import argparse
519
+
520
+ from voiceio.cli import learn as cli
521
+ from voiceio.learn import lastrun
522
+
523
+ def label(a):
524
+ _clip("new.wav", 3, "x")
525
+ store.add_label("new.wav", [Segment(0, 3, "a new one")], "teacher:fake")
526
+ monkeypatch.setenv("INVOCATION_ID", "abc")
527
+ monkeypatch.setattr(cli, "cmd_label", label)
528
+ monkeypatch.setattr(cli, "_announce_learning", lambda min_new: None)
529
+ monkeypatch.setattr(train, "missing_train_deps", lambda: ["torch"])
530
+ cli.cmd_maintain(argparse.Namespace(min_new=5, base="small", epochs=1))
531
+ rec = lastrun.read()
532
+ assert rec["outcome"] == "labelled" and rec["labelled"] == 1 and rec["scheduled"] is True
533
+ assert rec["ended"] >= rec["started"]
534
+
535
+ monkeypatch.setattr(cli, "cmd_label", lambda a: None)
536
+ cli.cmd_maintain(argparse.Namespace(min_new=5, base="small", epochs=1))
537
+ assert lastrun.read()["outcome"] == "skipped"
538
+
539
+ def boom(a):
540
+ raise RuntimeError("teacher crashed")
541
+ monkeypatch.setattr(cli, "cmd_label", boom)
542
+ with pytest.raises(RuntimeError):
543
+ cli.cmd_maintain(argparse.Namespace(min_new=5, base="small", epochs=1))
544
+ assert lastrun.read()["outcome"] == "failed"
545
+
546
+ with pytest.raises(SystemExit): # a bad setting fails the run too
547
+ cli.cmd_maintain(argparse.Namespace(min_new=0, base="small", epochs=1))
548
+ assert lastrun.read()["outcome"] == "failed"
549
+
550
+
551
+ def test_maintain_records_a_retrain(monkeypatch):
552
+ import argparse
553
+
554
+ from voiceio.cli import learn as cli
555
+ from voiceio.learn import lastrun
556
+ _maintain_calls(monkeypatch)
557
+ cli.cmd_maintain(argparse.Namespace(min_new=1, base="small", epochs=1))
558
+ assert lastrun.read()["outcome"] == "retrained"
559
+
560
+
561
+ def test_when_idle_worker_leaves_the_record_to_its_parent(monkeypatch):
562
+ import argparse
563
+
564
+ from voiceio.cli import learn as cli
565
+ from voiceio.learn import lastrun, quiet
566
+ monkeypatch.setenv(quiet.WORKER_ENV, "1")
567
+ monkeypatch.setattr(cli, "cmd_label", lambda a: None)
568
+ monkeypatch.setattr(cli, "_announce_learning", lambda min_new: None)
569
+ monkeypatch.setattr(train, "missing_train_deps", lambda: ["torch"])
570
+ cli.cmd_maintain(argparse.Namespace(min_new=5, base="small", epochs=1, when_idle=True))
571
+ assert lastrun.read() is None
@@ -157,17 +157,112 @@ def test_cli_prints_json_and_text(seeded, capsys, monkeypatch):
157
157
  assert "decoder errors" in text and "zorblax" not in text
158
158
 
159
159
 
160
- def test_learn_last_run_parses_systemctl(monkeypatch):
160
+ def _systemctl(trigger: str, result: str = "success", *, unix_flag: bool = True):
161
+ """A fake `systemctl show`: LastTriggerUSec prints `trigger`; without
162
+ `unix_flag` the --timestamp=unix flag is refused (systemd < 250)."""
161
163
  import subprocess
164
+ calls = []
162
165
 
163
166
  def fake(argv, **kw):
167
+ calls.append(argv)
168
+ if "--timestamp=unix" in argv and not unix_flag:
169
+ return subprocess.CompletedProcess(argv, 1, stdout="",
170
+ stderr="Unknown timestamp format: unix")
164
171
  prop = argv[argv.index("-p") + 1]
165
- out = {"LastTriggerUSec": "@1763260212\n", "Result": "success\n"}[prop]
166
- return subprocess.CompletedProcess(argv, 0, stdout=out)
172
+ out = {"LastTriggerUSec": trigger, "Result": result}[prop]
173
+ return subprocess.CompletedProcess(argv, 0, stdout=out + "\n")
174
+ return fake, calls
175
+
167
176
 
177
+ def test_learn_last_run_parses_systemctl(monkeypatch):
178
+ fake, _ = _systemctl("@1763260212")
168
179
  monkeypatch.setattr(service.subprocess, "run", fake)
169
180
  assert service.learn_last_run() == (1763260212.0, "success")
170
181
 
171
- monkeypatch.setattr(service.subprocess, "run",
172
- lambda argv, **kw: subprocess.CompletedProcess(argv, 0, stdout="n/a\n"))
182
+
183
+ def test_learn_last_run_reads_the_local_time_form(monkeypatch):
184
+ """systemd < 259 ignores --timestamp=unix for LastTriggerUSec and prints
185
+ the local-time form: the report said "never fired" for a timer that ran."""
186
+ when = NOW - 4 * DAY
187
+ shown = dt.datetime.fromtimestamp(when).strftime("%a %Y-%m-%d %H:%M:%S WET")
188
+ fake, _ = _systemctl(shown)
189
+ monkeypatch.setattr(service.subprocess, "run", fake)
190
+ assert service.learn_last_run() == (when, "success")
191
+
192
+ utc = dt.datetime.fromtimestamp(when, dt.timezone.utc).strftime("%a %Y-%m-%d %H:%M:%S UTC")
193
+ fake, _ = _systemctl(utc)
194
+ monkeypatch.setattr(service.subprocess, "run", fake)
195
+ assert service.learn_last_run() == (when, "success")
196
+
197
+
198
+ def test_learn_last_run_without_the_unix_flag(monkeypatch):
199
+ """systemd < 250 refuses --timestamp=unix: ask again without it."""
200
+ when = NOW - 4 * DAY
201
+ shown = dt.datetime.fromtimestamp(when).strftime("%a %Y-%m-%d %H:%M:%S CET")
202
+ fake, calls = _systemctl(shown, unix_flag=False)
203
+ monkeypatch.setattr(service.subprocess, "run", fake)
204
+ assert service.learn_last_run() == (when, "success")
205
+ assert not any("--timestamp=unix" in argv for argv in calls[1:])
206
+
207
+
208
+ @pytest.mark.parametrize("trigger", ["n/a", "", "@0", "0"])
209
+ def test_never_fired_has_no_result(monkeypatch, trigger):
210
+ """A unit that never ran still says Result=success: that is not a result."""
211
+ fake, _ = _systemctl(trigger)
212
+ monkeypatch.setattr(service.subprocess, "run", fake)
173
213
  assert service.learn_last_run() == (None, "")
214
+
215
+
216
+ def _learning_report(monkeypatch, last_run, tmp_path) -> dict:
217
+ monkeypatch.setattr(service, "has_systemd", lambda: True)
218
+ monkeypatch.setattr(service, "learn_timer_enabled", lambda: True)
219
+ monkeypatch.setattr(service, "learning_now", lambda: False)
220
+ monkeypatch.setattr(service, "learn_last_run", last_run)
221
+ return summary.build(NOW, config.Config(), log_paths=[tmp_path / "missing.log"])
222
+
223
+
224
+ def test_report_never_ran_has_a_null_result(monkeypatch, tmp_path):
225
+ out = _learning_report(monkeypatch, lambda: (None, ""), tmp_path)
226
+ assert out["learn_scheduled"] is True and out["learn_ran_7d"] is False
227
+ assert out["learn_last_run"] is None and out["learn_last_result"] is None
228
+ assert out["unavailable"]["learn_last_result"]
229
+ assert "never fired" in out["unavailable"]["learn_last_run"]
230
+
231
+
232
+ def test_report_ran_four_days_ago(monkeypatch, tmp_path):
233
+ when = NOW - 4 * DAY
234
+ out = _learning_report(monkeypatch, lambda: (when, "success"), tmp_path)
235
+ assert out["learn_ran_7d"] is True
236
+ assert out["learn_last_run"] == dt.date.fromtimestamp(when).isoformat()
237
+ assert out["learn_last_result"] == "success"
238
+ assert "learn_last_run" not in out["unavailable"]
239
+
240
+
241
+ def test_report_prefers_the_runs_own_record(monkeypatch, tmp_path):
242
+ from voiceio.learn import lastrun
243
+ when = NOW - 4 * DAY
244
+ lastrun.path().parent.mkdir(parents=True, exist_ok=True)
245
+ lastrun.path().write_text(json.dumps({"started": when, "ended": when + 5224,
246
+ "outcome": "labelled", "labelled": 724,
247
+ "scheduled": True}))
248
+ out = _learning_report(monkeypatch, lambda: pytest.fail("systemd not asked"), tmp_path)
249
+ assert out["learn_ran_7d"] is True
250
+ assert out["learn_last_run"] == dt.date.fromtimestamp(when).isoformat()
251
+ assert out["learn_last_result"] == "labelled"
252
+
253
+ # Killed before it could record an outcome (and not running now).
254
+ lastrun.path().write_text(json.dumps({"started": NOW - 9 * DAY, "ended": None,
255
+ "outcome": "running", "scheduled": True}))
256
+ out = _learning_report(monkeypatch, lambda: pytest.fail("systemd not asked"), tmp_path)
257
+ assert out["learn_ran_7d"] is False and out["learn_last_result"] == "unfinished"
258
+
259
+
260
+ def test_report_record_without_systemd(monkeypatch, tmp_path):
261
+ from voiceio.learn import lastrun
262
+ lastrun.path().parent.mkdir(parents=True, exist_ok=True)
263
+ lastrun.path().write_text(json.dumps({"started": NOW - DAY, "ended": NOW - DAY + 60,
264
+ "outcome": "skipped", "labelled": 0}))
265
+ monkeypatch.setattr(service, "has_systemd", lambda: False)
266
+ out = summary.build(NOW, config.Config(), log_paths=[tmp_path / "missing.log"])
267
+ assert out["learn_scheduled"] is None and out["unavailable"]["learn_scheduled"]
268
+ assert out["learn_ran_7d"] is True and out["learn_last_result"] == "skipped"
@@ -0,0 +1 @@
1
+ __version__ = "1.18.8"
@@ -543,9 +543,18 @@ def cmd_maintain(args: argparse.Namespace) -> None:
543
543
  that is stopped the moment you're back and started again (it resumes)
544
544
  once you're away (voiceio.learn.quiet)."""
545
545
  _yield_cpu()
546
+ from voiceio.learn import lastrun, quiet
547
+ if os.environ.get(quiet.WORKER_ENV) == "1": # a --when-idle worker: the parent records
548
+ _maintain(args, _maintain_settings(args))
549
+ return
550
+ with lastrun.recording(): # what `learn report` says about the last run
551
+ _maintain_recorded(args)
552
+
553
+
554
+ def _maintain_recorded(args: argparse.Namespace) -> None:
546
555
  from voiceio.learn import quiet
547
556
  learn_cfg = _maintain_settings(args)
548
- if getattr(args, "when_idle", False) and os.environ.get(quiet.WORKER_ENV) != "1":
557
+ if getattr(args, "when_idle", False):
549
558
  from voiceio.config import private_dir
550
559
  private_dir(store.learn_dir())
551
560
  code = quiet.run_while_away(
@@ -594,6 +603,8 @@ def _maintain(args: argparse.Namespace, learn_cfg) -> None:
594
603
  current = evaluate.latest(_cfg().model.name, ds.name, beam=beam) or _scores(_run_eval(None, ds))
595
604
  run = _finished_run(ds, learn_cfg.base) or _train(ds, base=learn_cfg.base,
596
605
  epochs=learn_cfg.epochs)
606
+ from voiceio.learn import lastrun
607
+ lastrun.mark_retrained()
597
608
  model = str(run / "ct2")
598
609
  candidate = evaluate.latest(model, ds.name, beam=beam) or _scores(_run_eval(model, ds))
599
610
  with quiet.hold(): # from here on: seconds of work that must not be torn
@@ -0,0 +1,86 @@
1
+ """The last `voiceio learn maintain` run: when it started and ended, and what
2
+ it did. `learn report` reads it before asking systemd, which can't say
3
+ whether a run happened at all (a unit that never ran has Result=success) and
4
+ whose timestamp output differs between versions.
5
+
6
+ Counts and times only, like the report it feeds.
7
+ """
8
+ from __future__ import annotations
9
+
10
+ import contextlib
11
+ import json
12
+ import os
13
+ import time
14
+ from collections.abc import Iterator
15
+ from pathlib import Path
16
+
17
+ from voiceio import config
18
+
19
+ # outcome: running (or killed before it could say), retrained, labelled
20
+ # (labels only), skipped (nothing new, or nobody was away), failed, stopped.
21
+ OUTCOMES = ("running", "retrained", "labelled", "skipped", "failed", "stopped")
22
+
23
+
24
+ def path() -> Path:
25
+ return config.LOG_DIR / "learn-last-run.json"
26
+
27
+
28
+ def read() -> dict | None:
29
+ """The record, or None when there is none (or it is unreadable)."""
30
+ try:
31
+ rec = json.loads(path().read_text())
32
+ except (OSError, ValueError):
33
+ return None
34
+ if not (isinstance(rec, dict) and isinstance(rec.get("started"), (int, float))
35
+ and rec.get("outcome") in OUTCOMES):
36
+ return None
37
+ return rec
38
+
39
+
40
+ def _write(rec: dict) -> None:
41
+ try:
42
+ config.secure_write(path(), json.dumps(rec) + "\n")
43
+ except OSError: # a record is never worth failing the run over
44
+ pass
45
+
46
+
47
+ def _label_count() -> int:
48
+ from voiceio.learn import store
49
+ try:
50
+ return len(store.load_labels())
51
+ except OSError:
52
+ return 0
53
+
54
+
55
+ def mark_retrained() -> None:
56
+ """Called by the run (or its --when-idle worker) once it trained a model."""
57
+ rec = read()
58
+ if rec is not None:
59
+ _write({**rec, "retrained": True})
60
+
61
+
62
+ @contextlib.contextmanager
63
+ def recording() -> Iterator[None]:
64
+ """Record the run inside this block. Clips labelled are counted from the
65
+ label store, so a worker stopped and resumed still counts all of them."""
66
+ before = _label_count()
67
+ _write({"started": time.time(), "ended": None, "outcome": "running",
68
+ "scheduled": bool(os.environ.get("INVOCATION_ID"))})
69
+ outcome: str | None = "failed"
70
+ try:
71
+ yield
72
+ outcome = None
73
+ except SystemExit as e:
74
+ outcome = "failed" if e.code else None
75
+ raise
76
+ except KeyboardInterrupt:
77
+ outcome = "stopped"
78
+ raise
79
+ finally:
80
+ rec = read() or {"started": time.time(), "scheduled": False}
81
+ labelled = max(0, _label_count() - before)
82
+ if outcome is None:
83
+ outcome = ("retrained" if rec.get("retrained")
84
+ else "labelled" if labelled else "skipped")
85
+ rec.pop("retrained", None)
86
+ _write({**rec, "ended": time.time(), "outcome": outcome, "labelled": labelled})
@@ -135,22 +135,35 @@ def _log_counts(now: dt.datetime, out: dict, unavailable: dict,
135
135
 
136
136
  def _learning(cutoff: float, out: dict, unavailable: dict) -> None:
137
137
  from voiceio import service
138
- from voiceio.learn import store
138
+ from voiceio.learn import lastrun, store
139
139
  labels = store.load_labels()
140
140
  out["clips_labelled_7d"] = sum(1 for lab in labels.values() if lab.ts >= cutoff)
141
141
  out["learn_scheduled"] = out["learn_ran_7d"] = out["learn_last_run"] = None
142
142
  out["learn_last_result"] = None
143
- if not service.has_systemd():
144
- for key in ("learn_scheduled", "learn_ran_7d", "learn_last_run", "learn_last_result"):
145
- unavailable[key] = "no systemd"
143
+ systemd = service.has_systemd()
144
+ if systemd:
145
+ out["learn_scheduled"] = service.learn_timer_enabled()
146
+ else:
147
+ unavailable["learn_scheduled"] = "no systemd"
148
+ # The run's own record first: systemd can't tell a unit that never ran
149
+ # (Result=success) from one that did, and its timestamps vary by version.
150
+ rec = lastrun.read()
151
+ if rec is not None:
152
+ when, result = float(rec["started"]), rec["outcome"]
153
+ if result == "running" and not (systemd and service.learning_now()):
154
+ result = "unfinished" # killed before it could record an outcome
155
+ elif systemd:
156
+ when, result = service.learn_last_run()
157
+ else:
158
+ for key in ("learn_ran_7d", "learn_last_run", "learn_last_result"):
159
+ unavailable[key] = "no systemd and no recorded learning run"
146
160
  return
147
- out["learn_scheduled"] = service.learn_timer_enabled()
148
- when, result = service.learn_last_run()
149
161
  out["learn_ran_7d"] = when is not None and when >= cutoff
150
- if when is not None:
151
- out["learn_last_run"] = dt.date.fromtimestamp(when).isoformat()
152
- else:
153
- unavailable["learn_last_run"] = "the learning timer has never fired"
162
+ if when is None:
163
+ unavailable["learn_last_run"] = unavailable["learn_last_result"] = \
164
+ "no recorded learning run (the learning timer has never fired)"
165
+ return
166
+ out["learn_last_run"] = dt.date.fromtimestamp(when).isoformat()
154
167
  if result:
155
168
  out["learn_last_result"] = result
156
169
  else:
@@ -7,6 +7,7 @@ from __future__ import annotations
7
7
 
8
8
  import logging
9
9
  import os
10
+ import re
10
11
  import shutil
11
12
  import subprocess
12
13
  import sys
@@ -101,7 +102,6 @@ LEARN_EVERY = {"day": "*-*-*", "week": "Sun *-*-*"}
101
102
 
102
103
  def learn_calendar(at: str, every: str) -> str:
103
104
  """systemd OnCalendar for `[learn] at` / `every`; ValueError when invalid."""
104
- import re
105
105
  if every not in LEARN_EVERY:
106
106
  raise ValueError(f"every must be one of {', '.join(LEARN_EVERY)}, not {every!r}")
107
107
  m = re.fullmatch(r"([01]?\d|2[0-3]):([0-5]\d)", at.strip())
@@ -221,23 +221,57 @@ def stop_learning() -> bool:
221
221
  return _systemctl("stop", LEARN_SERVICE_NAME)
222
222
 
223
223
 
224
+ def _show(unit: str, prop: str, *flags: str) -> str | None:
225
+ """`systemctl --user show` of one property; None when systemctl failed."""
226
+ try:
227
+ proc = subprocess.run(
228
+ ["systemctl", "--user", "show", *flags, "-p", prop, "--value", unit],
229
+ capture_output=True, text=True, timeout=SYSTEMCTL_TIMEOUT)
230
+ except (FileNotFoundError, subprocess.TimeoutExpired):
231
+ return None
232
+ return proc.stdout.strip() if proc.returncode == 0 else None
233
+
234
+
235
+ _SHOWN_TIME = re.compile(r"(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d)(?:\s+(\S+))?")
236
+
237
+
238
+ def parse_shown_time(text: str) -> float | None:
239
+ """A timestamp as `systemctl show` prints it, as a Unix time: "@1763260212"
240
+ (--timestamp=unix), or "Sun 2026-11-15 03:41:30 WET" (the default, which
241
+ is local time unless it says UTC). None for "", "n/a" or anything else."""
242
+ text = text.strip()
243
+ if text.startswith("@"):
244
+ try:
245
+ return float(text[1:]) or None
246
+ except ValueError:
247
+ return None
248
+ m = _SHOWN_TIME.search(text)
249
+ if not m:
250
+ return None
251
+ import datetime as dt
252
+ when = dt.datetime.strptime(m[1], "%Y-%m-%d %H:%M:%S")
253
+ if m[2] in ("UTC", "GMT"):
254
+ when = when.replace(tzinfo=dt.timezone.utc)
255
+ return when.timestamp()
256
+
257
+
224
258
  def learn_last_run() -> tuple[float | None, str]:
225
259
  """(when the learning timer last fired, as a Unix time, or None; the
226
- learning service's last result, e.g. "success", or "")."""
227
- def show(unit: str, prop: str) -> str:
228
- try:
229
- return subprocess.run(
230
- ["systemctl", "--user", "show", "--timestamp=unix", "-p", prop, "--value", unit],
231
- capture_output=True, text=True, timeout=SYSTEMCTL_TIMEOUT).stdout.strip()
232
- except (FileNotFoundError, subprocess.TimeoutExpired):
233
- return ""
234
- stamp = show(LEARN_TIMER_NAME, "LastTriggerUSec")
235
- try:
236
- when = float(stamp[1:]) if stamp.startswith("@") else None
237
- except ValueError:
238
- when = None
239
- result = show(LEARN_SERVICE_NAME, "Result")
240
- return when or None, result if result.replace("-", "").isalpha() else ""
260
+ learning service's last result, e.g. "success", or "" — always "" when
261
+ the timer never fired: a unit that never ran reports Result=success).
262
+
263
+ systemd before 259 ignores --timestamp=unix for LastTriggerUSec (it only
264
+ applied it to *Timestamp properties) and prints the local-time form;
265
+ before 250 it rejects the flag outright. Both forms are parsed, and the
266
+ flag is dropped when systemctl refuses it."""
267
+ stamp = _show(LEARN_TIMER_NAME, "LastTriggerUSec", "--timestamp=unix")
268
+ if not stamp:
269
+ stamp = _show(LEARN_TIMER_NAME, "LastTriggerUSec") or ""
270
+ when = parse_shown_time(stamp)
271
+ if when is None:
272
+ return None, ""
273
+ result = _show(LEARN_SERVICE_NAME, "Result") or ""
274
+ return when, result if result.replace("-", "").isalpha() else ""
241
275
 
242
276
 
243
277
  def learn_schedule_summary() -> str:
@@ -1,4 +1,5 @@
1
- """The opt-in weekly install ping: one anonymous count to voiceio.dev.
1
+ """The opt-in weekly install ping: one anonymous count to voiceio.dev's own
2
+ server, ping.voiceio.dev (workers/ping).
2
3
 
3
4
  Off unless `[telemetry] ping = true`. Asked once, in an interactive
4
5
  `voiceio setup` or `voiceio doctor`. When on, the daemon POSTs at most once
@@ -19,10 +20,10 @@ from voiceio import config
19
20
 
20
21
  log = logging.getLogger(__name__)
21
22
 
22
- # Flip to True once workers/ping is deployed and GET https://voiceio.dev/ping/stats
23
- # answers. While False nothing is asked, nothing is sent, and doctor shows no line.
23
+ # Flip to True once workers/ping is deployed on its Custom Domain ping.voiceio.dev
24
+ # and GET https://ping.voiceio.dev/ping/stats answers. While False nothing is asked, nothing is sent, and doctor shows no line.
24
25
  ENDPOINT_LIVE = False
25
- PING_URL = "https://voiceio.dev/ping"
26
+ PING_URL = "https://ping.voiceio.dev/ping"
26
27
  INTERVAL_SECS = 7 * 86400
27
28
  CHECK_EVERY_SECS = 86400
28
29
  # After daemon start: out of the way of the model load and the first dictation.
@@ -1 +0,0 @@
1
- __version__ = "1.18.7"
File without changes