python-voiceio 1.18.8__tar.gz → 1.18.9__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.8/python_voiceio.egg-info → python_voiceio-1.18.9}/PKG-INFO +3 -3
  2. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/README.md +1 -1
  3. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/pyproject.toml +2 -2
  4. {python_voiceio-1.18.8 → python_voiceio-1.18.9/python_voiceio.egg-info}/PKG-INFO +3 -3
  5. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/python_voiceio.egg-info/requires.txt +1 -1
  6. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_sherpa.py +92 -1
  7. python_voiceio-1.18.9/voiceio/__init__.py +1 -0
  8. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/cli/models.py +21 -12
  9. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/decoders/__init__.py +1 -2
  10. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/decoders/fetch.py +33 -19
  11. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/decoders/sherpa.py +37 -13
  12. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/health.py +5 -3
  13. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tts/supertonic_engine.py +1 -1
  14. python_voiceio-1.18.8/voiceio/__init__.py +0 -1
  15. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/LICENSE +0 -0
  16. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/python_voiceio.egg-info/SOURCES.txt +0 -0
  17. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/python_voiceio.egg-info/dependency_links.txt +0 -0
  18. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/python_voiceio.egg-info/entry_points.txt +0 -0
  19. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/python_voiceio.egg-info/top_level.txt +0 -0
  20. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/setup.cfg +0 -0
  21. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_announce.py +0 -0
  22. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_app_wiring.py +0 -0
  23. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_audio_quality.py +0 -0
  24. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_audio_source.py +0 -0
  25. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_backend_probes.py +0 -0
  26. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_cancel.py +0 -0
  27. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_cli.py +0 -0
  28. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_clipboard_read.py +0 -0
  29. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_clipboard_typer.py +0 -0
  30. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_commands.py +0 -0
  31. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_concurrency_lockdown.py +0 -0
  32. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_config.py +0 -0
  33. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_context_terms.py +0 -0
  34. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_corrections.py +0 -0
  35. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_cuda_setup_hint.py +0 -0
  36. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_dead_mic.py +0 -0
  37. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_decoders.py +0 -0
  38. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_engine.py +0 -0
  39. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_errorlog.py +0 -0
  40. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_evdev_uaccess.py +0 -0
  41. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_evdev_x11_optional.py +0 -0
  42. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_fallback.py +0 -0
  43. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_fcitx_bridge.py +0 -0
  44. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_feedback_stream.py +0 -0
  45. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_focus.py +0 -0
  46. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_gpu_fallback.py +0 -0
  47. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_health.py +0 -0
  48. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_hints.py +0 -0
  49. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_history.py +0 -0
  50. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_hotkey_modes.py +0 -0
  51. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_ibus_engine_limits.py +0 -0
  52. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_ibus_engine_listener.py +0 -0
  53. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_ibus_pending.py +0 -0
  54. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_ibus_pids.py +0 -0
  55. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_ibus_ping.py +0 -0
  56. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_ibus_session.py +0 -0
  57. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_ibus_textlimit.py +0 -0
  58. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_ibus_typer.py +0 -0
  59. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_idle_audio.py +0 -0
  60. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_install_env.py +0 -0
  61. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_learn_clean.py +0 -0
  62. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_learn_import.py +0 -0
  63. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_learn_language.py +0 -0
  64. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_learn_metrics.py +0 -0
  65. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_learn_pipeline.py +0 -0
  66. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_learn_quiet.py +0 -0
  67. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_learn_resume.py +0 -0
  68. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_learn_review.py +0 -0
  69. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_learn_summary.py +0 -0
  70. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_learn_targets.py +0 -0
  71. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_llm.py +0 -0
  72. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_llm_api.py +0 -0
  73. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_mic_gain.py +0 -0
  74. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_modifier_guard.py +0 -0
  75. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_numbers.py +0 -0
  76. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_paste_last.py +0 -0
  77. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_pipeline.py +0 -0
  78. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_platform.py +0 -0
  79. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_postcorrect.py +0 -0
  80. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_postprocess.py +0 -0
  81. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_prebuffer.py +0 -0
  82. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_presence.py +0 -0
  83. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_prompt.py +0 -0
  84. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_quiet_audio.py +0 -0
  85. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_recorder_integration.py +0 -0
  86. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_replies.py +0 -0
  87. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_report.py +0 -0
  88. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_retention.py +0 -0
  89. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_robustness.py +0 -0
  90. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_security_hardening.py +0 -0
  91. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_server.py +0 -0
  92. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_service.py +0 -0
  93. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_setup.py +0 -0
  94. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_spool.py +0 -0
  95. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_streaming.py +0 -0
  96. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_suggest.py +0 -0
  97. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_telemetry.py +0 -0
  98. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_tokens.py +0 -0
  99. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_transcriber.py +0 -0
  100. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_tray.py +0 -0
  101. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_tts.py +0 -0
  102. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_typer_manager.py +0 -0
  103. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_vad.py +0 -0
  104. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_vocabulary.py +0 -0
  105. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_wordfreq.py +0 -0
  106. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/tests/test_worker_decode.py +0 -0
  107. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/__main__.py +0 -0
  108. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/announce.py +0 -0
  109. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/app.py +0 -0
  110. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/audio_source.py +0 -0
  111. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/backends.py +0 -0
  112. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/cli/__init__.py +0 -0
  113. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/cli/configcmd.py +0 -0
  114. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/cli/corrections.py +0 -0
  115. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/cli/doctor.py +0 -0
  116. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/cli/history.py +0 -0
  117. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/cli/learn.py +0 -0
  118. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/cli/replies.py +0 -0
  119. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/cli/servicecmd.py +0 -0
  120. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/cli/uninstall.py +0 -0
  121. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/cli/vocab.py +0 -0
  122. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/clipboard_read.py +0 -0
  123. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/commands.py +0 -0
  124. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/config.py +0 -0
  125. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/consent.py +0 -0
  126. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/context_terms.py +0 -0
  127. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/__init__.py +0 -0
  128. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/bias.py +0 -0
  129. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/decoders/base.py +0 -0
  130. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/decoders/catalog.py +0 -0
  131. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/decoders/faster_whisper/__init__.py +0 -0
  132. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/decoders/faster_whisper/worker.py +0 -0
  133. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/decoders/lanes.py +0 -0
  134. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/decoders/whispercpp.py +0 -0
  135. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/engine.py +0 -0
  136. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/core/pipeline.py +0 -0
  137. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/corrections.py +0 -0
  138. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/data/60-voiceio-uaccess.rules +0 -0
  139. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/data/__init__.py +0 -0
  140. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/demo.py +0 -0
  141. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/display.py +0 -0
  142. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/errorlog.py +0 -0
  143. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/feedback.py +0 -0
  144. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/focus.py +0 -0
  145. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/hints.py +0 -0
  146. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/history.py +0 -0
  147. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/hotkeys/__init__.py +0 -0
  148. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/hotkeys/base.py +0 -0
  149. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/hotkeys/chain.py +0 -0
  150. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/hotkeys/evdev.py +0 -0
  151. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/hotkeys/pynput_backend.py +0 -0
  152. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/hotkeys/socket_backend.py +0 -0
  153. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/ibus/__init__.py +0 -0
  154. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/ibus/engine.py +0 -0
  155. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/ibus/install.py +0 -0
  156. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/ibus/pending.py +0 -0
  157. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/ibus/session.py +0 -0
  158. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/ibus/textlimit.py +0 -0
  159. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/idle_audio.py +0 -0
  160. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/install_env.py +0 -0
  161. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/__init__.py +0 -0
  162. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/augment.py +0 -0
  163. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/clean.py +0 -0
  164. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/evaluate.py +0 -0
  165. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/importer.py +0 -0
  166. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/lastrun.py +0 -0
  167. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/metrics.py +0 -0
  168. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/quiet.py +0 -0
  169. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/review.py +0 -0
  170. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/store.py +0 -0
  171. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/summary.py +0 -0
  172. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/teacher.py +0 -0
  173. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/learn/train.py +0 -0
  174. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/llm.py +0 -0
  175. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/llm_api.py +0 -0
  176. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/mic_gain.py +0 -0
  177. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/models/__init__.py +0 -0
  178. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/models/silero_vad.onnx +0 -0
  179. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/numbers.py +0 -0
  180. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/pidlock.py +0 -0
  181. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/platform.py +0 -0
  182. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/postcorrect.py +0 -0
  183. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/postprocess.py +0 -0
  184. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/power.py +0 -0
  185. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/presence.py +0 -0
  186. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/privacy.py +0 -0
  187. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/prompt.py +0 -0
  188. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/quiet_audio.py +0 -0
  189. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/recorder.py +0 -0
  190. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/replies.py +0 -0
  191. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/report.py +0 -0
  192. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/retention.py +0 -0
  193. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/server/__init__.py +0 -0
  194. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/server/__main__.py +0 -0
  195. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/server/app.py +0 -0
  196. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/server/config.py +0 -0
  197. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/server/runtime.py +0 -0
  198. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/service.py +0 -0
  199. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/setup/__init__.py +0 -0
  200. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/setup/configfile.py +0 -0
  201. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/setup/extras.py +0 -0
  202. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/setup/hotkey.py +0 -0
  203. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/setup/noninteractive.py +0 -0
  204. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/setup/speech.py +0 -0
  205. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/setup/steps.py +0 -0
  206. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/setup/system.py +0 -0
  207. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/setup/ui.py +0 -0
  208. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/sounds/__init__.py +0 -0
  209. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/sounds/alert.wav +0 -0
  210. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/sounds/commit.wav +0 -0
  211. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/sounds/start.wav +0 -0
  212. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/sounds/stop.wav +0 -0
  213. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/spool.py +0 -0
  214. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/streaming.py +0 -0
  215. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/suggest.py +0 -0
  216. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/telemetry.py +0 -0
  217. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tokens.py +0 -0
  218. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tray/__init__.py +0 -0
  219. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tray/_icons.py +0 -0
  220. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tray/_indicator.py +0 -0
  221. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tray/_pystray.py +0 -0
  222. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tts/__init__.py +0 -0
  223. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tts/base.py +0 -0
  224. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tts/chain.py +0 -0
  225. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tts/edge_engine.py +0 -0
  226. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tts/espeak.py +0 -0
  227. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tts/piper_engine.py +0 -0
  228. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/tts/player.py +0 -0
  229. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/__init__.py +0 -0
  230. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/base.py +0 -0
  231. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/chain.py +0 -0
  232. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/clipboard.py +0 -0
  233. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/collecting.py +0 -0
  234. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/fcitx_bridge.py +0 -0
  235. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/ibus.py +0 -0
  236. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/manager.py +0 -0
  237. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/modifier_guard.py +0 -0
  238. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/paste.py +0 -0
  239. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/pynput_type.py +0 -0
  240. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/wtype.py +0 -0
  241. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/xdotool.py +0 -0
  242. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/typers/ydotool.py +0 -0
  243. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/ui.py +0 -0
  244. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/vad.py +0 -0
  245. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/vocab_stats.py +0 -0
  246. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/vocabulary.py +0 -0
  247. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/watchdog.py +0 -0
  248. {python_voiceio-1.18.8 → python_voiceio-1.18.9}/voiceio/wordfreq.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-voiceio
3
- Version: 1.18.8
3
+ Version: 1.18.9
4
4
  Summary: Voice dictation for Linux. Speak → text, locally, instantly.
5
5
  Author: Hugo Montenegro
6
6
  License-Expression: MIT
@@ -44,7 +44,7 @@ Requires-Dist: torch>=2.2; extra == "train"
44
44
  Requires-Dist: transformers>=4.40; extra == "train"
45
45
  Requires-Dist: peft>=0.10; extra == "train"
46
46
  Provides-Extra: sherpa
47
- Requires-Dist: sherpa-onnx>=1.12; extra == "sherpa"
47
+ Requires-Dist: sherpa-onnx>=2.0.2; extra == "sherpa"
48
48
  Provides-Extra: dev
49
49
  Requires-Dist: pytest>=7.0; extra == "dev"
50
50
  Requires-Dist: pytest-mock; extra == "dev"
@@ -139,7 +139,7 @@ Everything lives in `~/.config/voiceio/config.toml`; [config.example.toml](confi
139
139
 
140
140
  ## Roadmap
141
141
 
142
- - **Parakeet by default for everyone**: it needs our sherpa-onnx fix ([#4084](https://github.com/k2-fsa/sherpa-onnx/pull/4084)) in an upstream release; until then `voiceio models sherpa && voiceio models use parakeet-tdt-0.6b-v2` installs a patched build ([why](CONTRIBUTING.md#model-choice-parakeet-where-it-can-be-biased-whisper-otherwise)).
142
+ - **Parakeet by default for everyone**: our sherpa-onnx fixes ([#4084](https://github.com/k2-fsa/sherpa-onnx/pull/4084), [#4088](https://github.com/k2-fsa/sherpa-onnx/pull/4088)) are released in sherpa-onnx 2.0.2, so `pip install 'python-voiceio[sherpa]'` makes Parakeet the default ([why](CONTRIBUTING.md#model-choice-parakeet-where-it-can-be-biased-whisper-otherwise)).
143
143
  - **GPU on AMD and Intel**: let setup run a Vulkan whisper.cpp server for you.
144
144
  - **Typing without IBus on GNOME and KDE**: a libei backend.
145
145
  - **Distro packages**: AUR (packaged, not yet published) and .rpm.
@@ -86,7 +86,7 @@ Everything lives in `~/.config/voiceio/config.toml`; [config.example.toml](confi
86
86
 
87
87
  ## Roadmap
88
88
 
89
- - **Parakeet by default for everyone**: it needs our sherpa-onnx fix ([#4084](https://github.com/k2-fsa/sherpa-onnx/pull/4084)) in an upstream release; until then `voiceio models sherpa && voiceio models use parakeet-tdt-0.6b-v2` installs a patched build ([why](CONTRIBUTING.md#model-choice-parakeet-where-it-can-be-biased-whisper-otherwise)).
89
+ - **Parakeet by default for everyone**: our sherpa-onnx fixes ([#4084](https://github.com/k2-fsa/sherpa-onnx/pull/4084), [#4088](https://github.com/k2-fsa/sherpa-onnx/pull/4088)) are released in sherpa-onnx 2.0.2, so `pip install 'python-voiceio[sherpa]'` makes Parakeet the default ([why](CONTRIBUTING.md#model-choice-parakeet-where-it-can-be-biased-whisper-otherwise)).
90
90
  - **GPU on AMD and Intel**: let setup run a Vulkan whisper.cpp server for you.
91
91
  - **Typing without IBus on GNOME and KDE**: a libei backend.
92
92
  - **Distro packages**: AUR (packaged, not yet published) and .rpm.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-voiceio"
7
- version = "1.18.8"
7
+ version = "1.18.9"
8
8
  description = "Voice dictation for Linux. Speak → text, locally, instantly."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -54,7 +54,7 @@ tts = ["piper-tts>=1.3.0", "edge-tts>=6.1.0"]
54
54
  # `voiceio learn train`: LoRA fine-tuning (a GPU helps; see voiceio/learn/train.py)
55
55
  train = ["torch>=2.2", "transformers>=4.40", "peft>=0.10"]
56
56
  # Alternative decoder runtime (Parakeet & co.); see CONTRIBUTING.md "Model choice".
57
- sherpa = ["sherpa-onnx>=1.12"]
57
+ sherpa = ["sherpa-onnx>=2.0.2"]
58
58
  dev = ["pytest>=7.0", "pytest-mock", "ruff>=0.15,<0.18"]
59
59
 
60
60
  [project.urls]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-voiceio
3
- Version: 1.18.8
3
+ Version: 1.18.9
4
4
  Summary: Voice dictation for Linux. Speak → text, locally, instantly.
5
5
  Author: Hugo Montenegro
6
6
  License-Expression: MIT
@@ -44,7 +44,7 @@ Requires-Dist: torch>=2.2; extra == "train"
44
44
  Requires-Dist: transformers>=4.40; extra == "train"
45
45
  Requires-Dist: peft>=0.10; extra == "train"
46
46
  Provides-Extra: sherpa
47
- Requires-Dist: sherpa-onnx>=1.12; extra == "sherpa"
47
+ Requires-Dist: sherpa-onnx>=2.0.2; extra == "sherpa"
48
48
  Provides-Extra: dev
49
49
  Requires-Dist: pytest>=7.0; extra == "dev"
50
50
  Requires-Dist: pytest-mock; extra == "dev"
@@ -139,7 +139,7 @@ Everything lives in `~/.config/voiceio/config.toml`; [config.example.toml](confi
139
139
 
140
140
  ## Roadmap
141
141
 
142
- - **Parakeet by default for everyone**: it needs our sherpa-onnx fix ([#4084](https://github.com/k2-fsa/sherpa-onnx/pull/4084)) in an upstream release; until then `voiceio models sherpa && voiceio models use parakeet-tdt-0.6b-v2` installs a patched build ([why](CONTRIBUTING.md#model-choice-parakeet-where-it-can-be-biased-whisper-otherwise)).
142
+ - **Parakeet by default for everyone**: our sherpa-onnx fixes ([#4084](https://github.com/k2-fsa/sherpa-onnx/pull/4084), [#4088](https://github.com/k2-fsa/sherpa-onnx/pull/4088)) are released in sherpa-onnx 2.0.2, so `pip install 'python-voiceio[sherpa]'` makes Parakeet the default ([why](CONTRIBUTING.md#model-choice-parakeet-where-it-can-be-biased-whisper-otherwise)).
143
143
  - **GPU on AMD and Intel**: let setup run a Vulkan whisper.cpp server for you.
144
144
  - **Typing without IBus on GNOME and KDE**: a libei backend.
145
145
  - **Distro packages**: AUR (packaged, not yet published) and .rpm.
@@ -30,7 +30,7 @@ evdev>=1.6.0
30
30
  aiohttp>=3.9
31
31
 
32
32
  [sherpa]
33
- sherpa-onnx>=1.12
33
+ sherpa-onnx>=2.0.2
34
34
 
35
35
  [train]
36
36
  torch>=2.2
@@ -18,7 +18,13 @@ from voiceio.core.decoders import BiasMode, build_decoder, catalog, fetch, sherp
18
18
  from voiceio.core.decoders.base import Bias, DecodeError
19
19
  from voiceio.core.decoders.sherpa import SherpaFeatures, SherpaTransducer, Tokenizer
20
20
 
21
+ # conftest replaces `sherpa.features` in every test; keep the real one.
22
+ REAL_FEATURES = sherpa.features
23
+
24
+ # Upstream sherpa-onnx >= 2.0.2: both fixes, length_reward only per stream.
21
25
  FIXED = SherpaFeatures(installed=True, length_reward=True, pretokenized_hotwords=True)
26
+ # voiceio's old patched build: from_transducer(length_reward=…) as well.
27
+ PATCHED = SherpaFeatures(True, True, True, length_reward_kwarg=True)
22
28
  TOKENS = "\n".join(f"{p} {i}" for i, p in enumerate(
23
29
  ["<unk>", "▁K", "al", "▁Kal", "sh", "hi", "shi", "▁", "K", "a", "l", "s", "h", "i",
24
30
  "▁H", "▁Hy", "per", "p", "e", "r", "y", "H", "▁k", "k", "er"])) + "\n"
@@ -110,7 +116,8 @@ def test_one_recognizer_and_per_stream_pretokenized_proper_nouns(fake, tmp_path)
110
116
  assert dec.name == "sherpa:parakeet-tdt-0.6b-v2"
111
117
  kw = fake.created[0]
112
118
  assert kw["decoding_method"] == "modified_beam_search"
113
- assert (kw["length_reward"], kw["max_active_paths"], kw["hotwords_score"]) == (0.5, 4, 2.0)
119
+ assert (kw["max_active_paths"], kw["hotwords_score"]) == (4, 2.0)
120
+ assert "length_reward" not in kw, "upstream from_transducer has no such kwarg"
114
121
  assert "hotwords_file" not in kw and kw["modeling_unit"] == "bpe"
115
122
  assert (tmp_path / "bpe.vocab").exists()
116
123
 
@@ -125,6 +132,90 @@ def test_one_recognizer_and_per_stream_pretokenized_proper_nouns(fake, tmp_path)
125
132
  assert len(fake.created) == 1, "a new hotword set must never reload the model"
126
133
 
127
134
 
135
+ def test_patched_build_also_gets_length_reward_at_load(fake, monkeypatch, tmp_path):
136
+ monkeypatch.setattr(sherpa, "features", lambda: PATCHED)
137
+ dec = SherpaTransducer(_model_dir(tmp_path))
138
+ assert fake.created[0]["length_reward"] == 0.5
139
+ dec.decode(_audio(1), bias=Bias(hotwords="Kalshi"))
140
+ assert fake.streams[-1]["length_reward"] == "0.5"
141
+ assert fake.streams[-1]["hotwords"] == "▁Kal shi"
142
+
143
+
144
+ def _sherpa_module(version, *, config_attr=False, pretokenized_flag=False):
145
+ """A sherpa_onnx module shaped like a given release (set_option on the
146
+ stream in every one, as 2.0.1 already has it)."""
147
+ class OfflineRecognizerConfig:
148
+ pass
149
+ if config_attr:
150
+ OfflineRecognizerConfig.length_reward = 0.0
151
+
152
+ class OfflineRecognizer:
153
+ @staticmethod
154
+ def from_transducer(encoder, decoder, joiner, tokens, num_threads=1,
155
+ decoding_method="greedy_search", max_active_paths=4):
156
+ raise AssertionError("not called")
157
+
158
+ mod = types.SimpleNamespace(OfflineRecognizer=OfflineRecognizer,
159
+ OfflineRecognizerConfig=OfflineRecognizerConfig,
160
+ OfflineStream=type("OfflineStream", (), {"set_option": None}))
161
+ if version is not None:
162
+ mod.__version__ = version
163
+ if pretokenized_flag:
164
+ mod.HOTWORDS_PRETOKENIZED = True
165
+ return mod
166
+
167
+
168
+ @pytest.mark.parametrize("module, expected", [
169
+ (_sherpa_module("2.0.2"), SherpaFeatures(True, True, True, False)),
170
+ (_sherpa_module("2.0.10"), SherpaFeatures(True, True, True, False)),
171
+ (_sherpa_module("2.1.0.dev20261201+cuda"), SherpaFeatures(True, True, True, False)),
172
+ (_sherpa_module("3.0"), SherpaFeatures(True, True, True, False)),
173
+ (_sherpa_module("2.0.1"), SherpaFeatures(True, False, False, False)),
174
+ (_sherpa_module("1.13.8"), SherpaFeatures(True, False, False, False)),
175
+ (_sherpa_module("2.0.1+cuda12"), SherpaFeatures(True, False, False, False)),
176
+ (_sherpa_module(None), SherpaFeatures(True, False, False, False)),
177
+ (_sherpa_module("weird"), SherpaFeatures(True, False, False, False)),
178
+ # voiceio's patched wheels (built off 1.13.x/2.0.x).
179
+ (_sherpa_module("1.13.4", config_attr=True, pretokenized_flag=True),
180
+ SherpaFeatures(True, True, True, True)),
181
+ (_sherpa_module("2.0.1", config_attr=True), SherpaFeatures(True, True, False, True)),
182
+ ], ids=["2.0.2", "2.0.10", "2.1-dev", "3.0", "2.0.1", "1.13.8", "2.0.1-local", "no-version",
183
+ "junk-version", "patched", "patched-no-pretok"])
184
+ def test_features_detects_upstream_by_version_and_patched_builds_by_signal(
185
+ monkeypatch, module, expected):
186
+ monkeypatch.setitem(sys.modules, "sherpa_onnx", module)
187
+ REAL_FEATURES.cache_clear()
188
+ try:
189
+ assert REAL_FEATURES() == expected
190
+ finally:
191
+ REAL_FEATURES.cache_clear()
192
+
193
+
194
+ def test_features_patched_kwarg_found_by_signature(monkeypatch):
195
+ mod = _sherpa_module("2.0.1")
196
+
197
+ class OfflineRecognizer:
198
+ @staticmethod
199
+ def from_transducer(encoder, length_reward=0.0):
200
+ pass
201
+ mod.OfflineRecognizer = OfflineRecognizer
202
+ monkeypatch.setitem(sys.modules, "sherpa_onnx", mod)
203
+ REAL_FEATURES.cache_clear()
204
+ try:
205
+ assert REAL_FEATURES() == SherpaFeatures(True, True, False, True)
206
+ finally:
207
+ REAL_FEATURES.cache_clear()
208
+
209
+
210
+ def test_features_without_sherpa(monkeypatch):
211
+ monkeypatch.setitem(sys.modules, "sherpa_onnx", None) # import raises ImportError
212
+ REAL_FEATURES.cache_clear()
213
+ try:
214
+ assert REAL_FEATURES() == SherpaFeatures()
215
+ finally:
216
+ REAL_FEATURES.cache_clear()
217
+
218
+
128
219
  def test_sherpa_tokenization_fallback_passes_terms(fake, monkeypatch, tmp_path):
129
220
  monkeypatch.setattr(sherpa, "features", lambda: SherpaFeatures(True, True, False))
130
221
  dec = SherpaTransducer(_model_dir(tmp_path))
@@ -0,0 +1 @@
1
+ __version__ = "1.18.9"
@@ -23,9 +23,11 @@ def register(sub: argparse._SubParsersAction) -> None:
23
23
  d = msub.add_parser("download", help="Fetch a sherpa-onnx model (e.g. parakeet-tdt-0.6b-v2)")
24
24
  d.add_argument("name")
25
25
  d.set_defaults(func=cmd_download)
26
- s = msub.add_parser("sherpa", help="Install sherpa-onnx with the Parakeet fixes "
27
- "(until upstream releases them)")
26
+ s = msub.add_parser("sherpa", help="Install or upgrade sherpa-onnx to a release with the "
27
+ "Parakeet fixes (2.0.2+)")
28
28
  s.add_argument("--check", action="store_true", help="only say what is installed")
29
+ s.add_argument("--patched", action="store_true",
30
+ help="install voiceio's old patched build instead of the PyPI release")
29
31
  s.set_defaults(func=cmd_sherpa)
30
32
 
31
33
 
@@ -49,15 +51,16 @@ def _fine_tunes() -> list[str]:
49
51
 
50
52
  def _sherpa_note() -> str:
51
53
  """Why Parakeet is or isn't usable with the installed sherpa-onnx."""
54
+ from voiceio.core.decoders.fetch import SHERPA_REQUIREMENT
52
55
  from voiceio.core.decoders.sherpa import features
53
56
  f = features()
57
+ fix = f"pip install -U '{SHERPA_REQUIREMENT}' (or: voiceio models sherpa)"
54
58
  if not f.installed:
55
- return "needs sherpa-onnx: voiceio models sherpa"
59
+ return f"needs sherpa-onnx: {fix}"
56
60
  if not f.length_reward:
57
- return ("this sherpa-onnx lacks the NeMo TDT beam-search fix (no hotwords): "
58
- "voiceio models sherpa")
61
+ return f"this sherpa-onnx lacks the NeMo TDT beam-search fix (no hotwords): {fix}"
59
62
  if not f.pretokenized_hotwords:
60
- return "hotwords via sherpa's own tokenization (fewer names caught): voiceio models sherpa"
63
+ return f"hotwords via sherpa's own tokenization (fewer names caught): {fix}"
61
64
  return ""
62
65
 
63
66
 
@@ -133,7 +136,8 @@ def cmd_use(args: argparse.Namespace) -> None:
133
136
  if runtime_of(name) == "sherpa-onnx":
134
137
  from voiceio.core.decoders.sherpa import features
135
138
  if not features().installed:
136
- raise SystemExit("needs sherpa-onnx first: voiceio models sherpa")
139
+ raise SystemExit("needs sherpa-onnx first: "
140
+ "pip install 'python-voiceio[sherpa]'")
137
141
  if note := _sherpa_note():
138
142
  print(f"note: {note}")
139
143
  if m is not None and m.url:
@@ -167,20 +171,25 @@ def cmd_download(args: argparse.Namespace) -> None:
167
171
 
168
172
 
169
173
  def cmd_sherpa(args: argparse.Namespace) -> None:
170
- """Parakeet's hotwords need two sherpa-onnx fixes upstream hasn't
171
- released yet; install voiceio's build of them into this Python."""
174
+ """Install or upgrade sherpa-onnx in this Python to a release with
175
+ Parakeet's fixes (upstream 2.0.2+; `--patched`: voiceio's old build)."""
172
176
  from voiceio.core.decoders import fetch
173
177
  note = _sherpa_note()
174
178
  if args.check or not note:
175
179
  print(note or "sherpa-onnx has the Parakeet fixes (beam-search fix, pre-tokenized "
176
180
  "hotwords)")
177
181
  return
178
- print(f"installing the patched sherpa-onnx from {fetch.SHERPA_WHEELS}…", flush=True)
179
182
  try:
180
- wheel = fetch.install_patched_sherpa()
183
+ if args.patched:
184
+ print(f"installing the patched sherpa-onnx from {fetch.SHERPA_WHEELS}…", flush=True)
185
+ what = fetch.install_patched_sherpa()
186
+ else:
187
+ print(f"installing {fetch.SHERPA_REQUIREMENT} from PyPI…", flush=True)
188
+ fetch.install_sherpa()
189
+ what = fetch.SHERPA_REQUIREMENT
181
190
  except OSError as e:
182
191
  raise SystemExit(str(e)) from e
183
192
  from voiceio import config
184
193
  from voiceio.core.decoders.catalog import PARAKEET, PARAKEET_V3
185
194
  name = PARAKEET if config.load().model.language == "en" else PARAKEET_V3
186
- print(f"installed {wheel}\nnext: voiceio models use {name}")
195
+ print(f"installed {what}\nnext: voiceio models use {name} (or `use auto`)")
@@ -63,8 +63,7 @@ def _sherpa(model_cfg) -> Decoder:
63
63
  from voiceio.core.decoders import fetch
64
64
  from voiceio.core.decoders.sherpa import SherpaTransducer, default_threads, features
65
65
  if not features().installed: # before a 500 MB download it couldn't use
66
- raise DecodeError("sherpa-onnx not installed: pip install 'python-voiceio[sherpa]' "
67
- "(or the build with the Parakeet fixes: voiceio models sherpa)")
66
+ raise DecodeError("sherpa-onnx not installed: pip install 'python-voiceio[sherpa]'")
68
67
  name = model_cfg.name
69
68
  if name.startswith("sherpa:"):
70
69
  model_dir = Path(name.split(":", 1)[1]).expanduser()
@@ -142,11 +142,13 @@ def print_progress(label: str) -> Callable[[int, int], None]:
142
142
  return show
143
143
 
144
144
 
145
- # ── the patched sherpa-onnx ──────────────────────────────────────────────
146
- # Until k2-fsa/sherpa-onnx releases the NeMo TDT beam-search fix (#4084) and
147
- # pre-tokenized hotwords, Parakeet's biasing needs a build with both:
148
- # Hugo0/sherpa-onnx branch `voiceio-patched`, built by the voiceio repo's
149
- # "sherpa-wheels" workflow into this release, with a SHA256SUMS file.
145
+ # ── sherpa-onnx ──────────────────────────────────────────────────────────
146
+ # Parakeet's biasing needs the NeMo TDT beam-search fix (k2-fsa/sherpa-onnx
147
+ # #4084) and pre-tokenized hotwords (#4088), both released upstream in 2.0.2.
148
+ SHERPA_REQUIREMENT = "sherpa-onnx>=2.0.2"
149
+ # Before that release: Hugo0/sherpa-onnx branch `voiceio-patched`, built by the
150
+ # voiceio repo's "sherpa-wheels" workflow into this release, with a SHA256SUMS
151
+ # file (`voiceio models sherpa --patched`).
150
152
  SHERPA_WHEELS = "https://github.com/Hugo0/voiceio/releases/download/sherpa-onnx-voiceio"
151
153
 
152
154
 
@@ -176,8 +178,6 @@ def patched_sherpa_wheel(sums: str, version: tuple[int, int] | None = None,
176
178
  def install_patched_sherpa(base_url: str = SHERPA_WHEELS) -> str:
177
179
  """Download, verify and install the patched sherpa-onnx wheel into this
178
180
  Python. Returns the wheel's name; raises OSError with what went wrong."""
179
- import shutil as _shutil
180
- import subprocess
181
181
  import sys
182
182
  import tempfile
183
183
  try:
@@ -202,16 +202,30 @@ def install_patched_sherpa(base_url: str = SHERPA_WHEELS) -> str:
202
202
  raise OSError(f"{wheel}: checksum mismatch — not installing")
203
203
  path.write_bytes(data)
204
204
  # Same version number as upstream's release: force the swap.
205
- import importlib.util
206
- if importlib.util.find_spec("pip") is not None:
207
- cmd = [sys.executable, "-m", "pip", "install", "--force-reinstall", "--no-deps",
208
- str(path)]
209
- elif uv := _shutil.which("uv"):
210
- cmd = [uv, "pip", "install", "--python", sys.executable, "--reinstall",
211
- "--no-deps", str(path)]
212
- else:
213
- raise OSError(f"neither pip nor uv is available to install {wheel}")
214
- rc = subprocess.run(cmd).returncode
215
- if rc != 0:
216
- raise OSError(f"installing {wheel} failed (exit {rc}): {' '.join(cmd)}")
205
+ _pip_install([str(path)], reinstall=True)
217
206
  return wheel
207
+
208
+
209
+ def install_sherpa() -> None:
210
+ """Install or upgrade sherpa-onnx from PyPI to a release with the
211
+ Parakeet fixes. Raises OSError with what went wrong."""
212
+ _pip_install(["--upgrade", SHERPA_REQUIREMENT])
213
+
214
+
215
+ def _pip_install(args: list[str], *, reinstall: bool = False) -> None:
216
+ """pip (or uv) install into this Python; OSError on failure."""
217
+ import importlib.util
218
+ import shutil as _shutil
219
+ import subprocess
220
+ import sys
221
+ if importlib.util.find_spec("pip") is not None:
222
+ cmd = [sys.executable, "-m", "pip", "install"] + \
223
+ (["--force-reinstall", "--no-deps"] if reinstall else []) + args
224
+ elif uv := _shutil.which("uv"):
225
+ cmd = [uv, "pip", "install", "--python", sys.executable] + \
226
+ (["--reinstall", "--no-deps"] if reinstall else []) + args
227
+ else:
228
+ raise OSError(f"neither pip nor uv is available to install {args[-1]}")
229
+ rc = subprocess.run(cmd).returncode
230
+ if rc != 0:
231
+ raise OSError(f"installing {args[-1]} failed (exit {rc}): {' '.join(cmd)}")
@@ -3,16 +3,18 @@
3
3
  sherpa-onnx's hotwords are an Aho-Corasick graph with no token cap — the way
4
4
  past Whisper's ~35-term ceiling. They need `modified_beam_search`, which lost
5
5
  speech on NeMo TDT models until the `length_reward` fix (k2-fsa/sherpa-onnx
6
- #4084); `features()` detects it, and without it this decodes greedily with no
7
- biasing rather than lose words.
6
+ #4084, released in 2.0.2); `features()` detects it, and without it this
7
+ decodes greedily with no biasing rather than lose words.
8
8
 
9
9
  One recognizer per model load: the encoder alone is ~650 MB, so hotwords are
10
10
  never baked into the recognizer — each decode passes them to its own stream.
11
11
  sherpa-onnx re-tokenizes hotwords with bpe.vocab, which disagrees with how the
12
12
  model actually splits most proper nouns (`Hetzner` -> `▁H et zn er`, the
13
- model writes `▁Het zn er`), so the graph never matches them. A build with the
14
- pre-tokenized hotwords patch (`HOTWORDS_PRETOKENIZED`) takes the model's own
15
- BPE pieces instead; otherwise sherpa's tokenization is the fallback.
13
+ model writes `▁Het zn er`), so the graph never matches them. sherpa-onnx 2.0.2+
14
+ (#4088; earlier, voiceio's patched build with `HOTWORDS_PRETOKENIZED`) takes
15
+ the model's own BPE pieces instead — a phrase that starts with "▁" and whose
16
+ every space-separated piece is in tokens.txt; otherwise sherpa's tokenization
17
+ is the fallback.
16
18
 
17
19
  Only proper nouns become hotwords: lowercase mined jargon caused false
18
20
  insertions of those words on real dictation (measured, see CLAUDE.md).
@@ -59,14 +61,32 @@ LENGTH_REWARD = 0.5
59
61
  HOTWORDS_SCORE = 2.0
60
62
 
61
63
 
64
+ # The first upstream release with both fixes: the NeMo TDT modified_beam_search
65
+ # fix (k2-fsa/sherpa-onnx#4084, `length_reward` read per stream) and hotwords
66
+ # given as tokens.txt pieces (#4088, detected per phrase by its leading "▁").
67
+ UPSTREAM_FIXED = (2, 0, 2)
68
+
69
+
62
70
  @dataclass(frozen=True)
63
71
  class SherpaFeatures:
64
72
  installed: bool = False
65
73
  # The NeMo TDT modified_beam_search fix (k2-fsa/sherpa-onnx#4084). Without
66
74
  # it, beam search — and so hotwords — drops speech on Parakeet.
67
75
  length_reward: bool = False
68
- # Hotwords may be given as tokens from tokens.txt (voiceio's patched build).
76
+ # Hotwords may be given as tokens from tokens.txt (#4088; upstream since
77
+ # 2.0.2, voiceio's patched build before that).
69
78
  pretokenized_hotwords: bool = False
79
+ # `from_transducer(length_reward=…)` is accepted (voiceio's old patched
80
+ # build only; upstream takes it per stream and would raise TypeError).
81
+ length_reward_kwarg: bool = False
82
+
83
+
84
+ def _version(text: str) -> tuple[int, ...]:
85
+ """Leading numeric release of a version string ("2.0.2.dev1+cuda" ->
86
+ (2, 0, 2)); () when it has none."""
87
+ import re
88
+ m = re.match(r"\s*v?(\d+(?:\.\d+)*)", str(text or ""))
89
+ return tuple(int(x) for x in m.group(1).split(".")) if m else ()
70
90
 
71
91
 
72
92
  @functools.cache
@@ -76,17 +96,21 @@ def features() -> SherpaFeatures:
76
96
  import sherpa_onnx
77
97
  except Exception: # noqa: BLE001 — absent or a broken native lib: not installed
78
98
  return SherpaFeatures()
99
+ # 2.0.1 already has OfflineStream.set_option, so its presence
100
+ # proves nothing: upstream is judged by version, patched builds by the
101
+ # signals they export.
102
+ upstream = _version(getattr(sherpa_onnx, "__version__", "")) >= UPSTREAM_FIXED
79
103
  config = getattr(sherpa_onnx, "OfflineRecognizerConfig", None)
80
- length_reward = config is not None and hasattr(config, "length_reward")
81
- if not length_reward:
104
+ kwarg = config is not None and hasattr(config, "length_reward")
105
+ if not kwarg:
82
106
  import inspect
83
107
  try:
84
108
  params = inspect.signature(sherpa_onnx.OfflineRecognizer.from_transducer).parameters
85
- length_reward = "length_reward" in params
109
+ kwarg = "length_reward" in params
86
110
  except (AttributeError, TypeError, ValueError):
87
111
  pass
88
- return SherpaFeatures(True, length_reward,
89
- bool(getattr(sherpa_onnx, "HOTWORDS_PRETOKENIZED", False)))
112
+ pretokenized = upstream or bool(getattr(sherpa_onnx, "HOTWORDS_PRETOKENIZED", False))
113
+ return SherpaFeatures(True, upstream or kwarg, pretokenized, kwarg)
90
114
 
91
115
 
92
116
  def default_threads() -> int:
@@ -214,7 +238,7 @@ class SherpaTransducer:
214
238
  method = MBS if feats.length_reward else GREEDY
215
239
  elif method == MBS and not feats.length_reward:
216
240
  log.warning("This sherpa-onnx lacks the NeMo TDT beam-search fix: modified_beam_search "
217
- "may drop speech. Install the patched build: voiceio models sherpa")
241
+ "may drop speech. Upgrade it: pip install -U 'sherpa-onnx>=2.0.2'")
218
242
  self._method = method
219
243
  mbs = method == MBS
220
244
  self.name = f"sherpa:{label or self._dir.name}" + ("" if mbs else f"@{method}")
@@ -234,7 +258,7 @@ class SherpaTransducer:
234
258
  kwargs.update(max_active_paths=max_active_paths, hotwords_score=hotwords_score,
235
259
  modeling_unit="bpe",
236
260
  bpe_vocab=_bpe_vocab_file(self._dir, self._tokenizer))
237
- if feats.length_reward:
261
+ if feats.length_reward_kwarg:
238
262
  kwargs.update(length_reward=length_reward)
239
263
  # Upstream reads length_reward per stream (k2-fsa/sherpa-onnx#4084 after
240
264
  # review); builds without that read ignore the option.
@@ -339,16 +339,18 @@ def _decoder_status(cfg) -> dict[str, str]:
339
339
  """For a sherpa-onnx model: whether it can be biased, and why not. For
340
340
  Whisper: whether Parakeet would do better here."""
341
341
  from voiceio.core.decoders.catalog import WHISPER_DEFAULT, default_model, runtime_of
342
+ from voiceio.core.decoders.fetch import SHERPA_REQUIREMENT
342
343
  from voiceio.core.decoders.sherpa import features
343
344
  f = features()
345
+ fix = f"pip install -U '{SHERPA_REQUIREMENT}'"
344
346
  if runtime_of(cfg.model.name) == "sherpa-onnx":
345
347
  if not f.installed:
346
- return {"Decoder": "sherpa-onnx not installed — fix: voiceio models sherpa"}
348
+ return {"Decoder": f"sherpa-onnx not installed — fix: {fix}"}
347
349
  if not f.length_reward:
348
350
  return {"Decoder": "greedy, NO vocabulary biasing: this sherpa-onnx lacks the "
349
- "NeMo TDT beam-search fix — fix: voiceio models sherpa"}
351
+ f"NeMo TDT beam-search fix — fix: {fix}"}
350
352
  how = "pre-tokenized" if f.pretokenized_hotwords else \
351
- "sherpa-tokenized, misses many names — fix: voiceio models sherpa"
353
+ f"sherpa-tokenized, misses many names — fix: {fix}"
352
354
  return {"Decoder": f"beam search, every proper noun as a hotword ({how})"}
353
355
  if f.length_reward and (best := default_model(cfg.model.language)) != WHISPER_DEFAULT:
354
356
  return {"Decoder": f"Whisper; {best} would put your text down several times "
@@ -23,7 +23,7 @@ _SHA256 = "82fa96f91c4ef8abaae3a14a3f4153facf88bed821d1f7331cec2700f432c427"
23
23
  _SIZE_MB = 129
24
24
  _STEMS = ("duration_predictor", "text_encoder", "vector_estimator", "vocoder")
25
25
  _FILES = ("tts.json", "unicode_indexer.bin", "voice.bin")
26
- _HINT = "pip install 'python-voiceio[sherpa]' (then: voiceio models sherpa)"
26
+ _HINT = "pip install 'python-voiceio[sherpa]'"
27
27
 
28
28
 
29
29
  def _complete(path: Path) -> bool:
@@ -1 +0,0 @@
1
- __version__ = "1.18.8"
File without changes