python-voiceio 1.18.16__tar.gz → 1.18.18__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 (254) hide show
  1. {python_voiceio-1.18.16/python_voiceio.egg-info → python_voiceio-1.18.18}/PKG-INFO +1 -1
  2. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/pyproject.toml +1 -1
  3. {python_voiceio-1.18.16 → python_voiceio-1.18.18/python_voiceio.egg-info}/PKG-INFO +1 -1
  4. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/python_voiceio.egg-info/SOURCES.txt +1 -0
  5. python_voiceio-1.18.18/tests/test_setup_sherpa_install.py +181 -0
  6. python_voiceio-1.18.18/voiceio/__init__.py +1 -0
  7. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/decoders/fetch.py +60 -15
  8. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/setup/speech.py +51 -7
  9. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/setup/steps.py +5 -1
  10. python_voiceio-1.18.16/voiceio/__init__.py +0 -1
  11. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/LICENSE +0 -0
  12. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/README.md +0 -0
  13. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/python_voiceio.egg-info/dependency_links.txt +0 -0
  14. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/python_voiceio.egg-info/entry_points.txt +0 -0
  15. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/python_voiceio.egg-info/requires.txt +0 -0
  16. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/python_voiceio.egg-info/top_level.txt +0 -0
  17. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/setup.cfg +0 -0
  18. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_announce.py +0 -0
  19. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_app_wiring.py +0 -0
  20. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_audio_devices.py +0 -0
  21. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_audio_quality.py +0 -0
  22. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_audio_source.py +0 -0
  23. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_backend_probes.py +0 -0
  24. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_cancel.py +0 -0
  25. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_cli.py +0 -0
  26. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_clipboard_read.py +0 -0
  27. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_clipboard_typer.py +0 -0
  28. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_commands.py +0 -0
  29. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_concurrency_lockdown.py +0 -0
  30. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_config.py +0 -0
  31. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_context_terms.py +0 -0
  32. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_corrections.py +0 -0
  33. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_cuda_setup_hint.py +0 -0
  34. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_dead_mic.py +0 -0
  35. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_decoders.py +0 -0
  36. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_engine.py +0 -0
  37. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_errorlog.py +0 -0
  38. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_evdev_uaccess.py +0 -0
  39. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_evdev_x11_optional.py +0 -0
  40. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_fallback.py +0 -0
  41. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_fcitx_bridge.py +0 -0
  42. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_feedback_stream.py +0 -0
  43. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_focus.py +0 -0
  44. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_gpu_fallback.py +0 -0
  45. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_health.py +0 -0
  46. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_hints.py +0 -0
  47. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_history.py +0 -0
  48. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_hotkey_modes.py +0 -0
  49. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_ibus_engine_limits.py +0 -0
  50. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_ibus_engine_listener.py +0 -0
  51. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_ibus_pending.py +0 -0
  52. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_ibus_pids.py +0 -0
  53. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_ibus_ping.py +0 -0
  54. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_ibus_session.py +0 -0
  55. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_ibus_textlimit.py +0 -0
  56. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_ibus_typer.py +0 -0
  57. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_idle_audio.py +0 -0
  58. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_input_latency.py +0 -0
  59. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_install_env.py +0 -0
  60. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_learn_clean.py +0 -0
  61. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_learn_import.py +0 -0
  62. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_learn_language.py +0 -0
  63. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_learn_metrics.py +0 -0
  64. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_learn_pipeline.py +0 -0
  65. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_learn_quiet.py +0 -0
  66. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_learn_resume.py +0 -0
  67. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_learn_review.py +0 -0
  68. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_learn_summary.py +0 -0
  69. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_learn_targets.py +0 -0
  70. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_llm.py +0 -0
  71. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_llm_api.py +0 -0
  72. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_mic_gain.py +0 -0
  73. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_mic_test.py +0 -0
  74. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_modifier_guard.py +0 -0
  75. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_numbers.py +0 -0
  76. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_paste_last.py +0 -0
  77. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_pipeline.py +0 -0
  78. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_platform.py +0 -0
  79. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_postcorrect.py +0 -0
  80. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_postprocess.py +0 -0
  81. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_prebuffer.py +0 -0
  82. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_presence.py +0 -0
  83. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_prompt.py +0 -0
  84. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_quiet_audio.py +0 -0
  85. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_recorder_integration.py +0 -0
  86. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_replies.py +0 -0
  87. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_report.py +0 -0
  88. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_retention.py +0 -0
  89. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_robustness.py +0 -0
  90. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_security_hardening.py +0 -0
  91. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_server.py +0 -0
  92. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_service.py +0 -0
  93. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_setup.py +0 -0
  94. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_sherpa.py +0 -0
  95. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_spool.py +0 -0
  96. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_streaming.py +0 -0
  97. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_suggest.py +0 -0
  98. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_telemetry.py +0 -0
  99. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_tokens.py +0 -0
  100. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_transcriber.py +0 -0
  101. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_tray.py +0 -0
  102. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_tts.py +0 -0
  103. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_tts_socket.py +0 -0
  104. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_typer_manager.py +0 -0
  105. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_vad.py +0 -0
  106. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_vocabulary.py +0 -0
  107. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_wordfreq.py +0 -0
  108. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/tests/test_worker_decode.py +0 -0
  109. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/__main__.py +0 -0
  110. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/announce.py +0 -0
  111. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/app.py +0 -0
  112. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/audio_devices.py +0 -0
  113. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/audio_source.py +0 -0
  114. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/backends.py +0 -0
  115. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/cli/__init__.py +0 -0
  116. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/cli/configcmd.py +0 -0
  117. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/cli/corrections.py +0 -0
  118. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/cli/doctor.py +0 -0
  119. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/cli/history.py +0 -0
  120. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/cli/learn.py +0 -0
  121. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/cli/models.py +0 -0
  122. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/cli/replies.py +0 -0
  123. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/cli/servicecmd.py +0 -0
  124. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/cli/uninstall.py +0 -0
  125. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/cli/vocab.py +0 -0
  126. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/clipboard_read.py +0 -0
  127. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/commands.py +0 -0
  128. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/config.py +0 -0
  129. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/consent.py +0 -0
  130. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/context_terms.py +0 -0
  131. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/__init__.py +0 -0
  132. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/bias.py +0 -0
  133. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/decoders/__init__.py +0 -0
  134. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/decoders/base.py +0 -0
  135. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/decoders/catalog.py +0 -0
  136. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/decoders/faster_whisper/__init__.py +0 -0
  137. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/decoders/faster_whisper/worker.py +0 -0
  138. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/decoders/lanes.py +0 -0
  139. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/decoders/sherpa.py +0 -0
  140. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/decoders/whispercpp.py +0 -0
  141. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/engine.py +0 -0
  142. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/core/pipeline.py +0 -0
  143. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/corrections.py +0 -0
  144. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/data/60-voiceio-uaccess.rules +0 -0
  145. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/data/__init__.py +0 -0
  146. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/demo.py +0 -0
  147. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/display.py +0 -0
  148. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/errorlog.py +0 -0
  149. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/feedback.py +0 -0
  150. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/focus.py +0 -0
  151. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/health.py +0 -0
  152. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/hints.py +0 -0
  153. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/history.py +0 -0
  154. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/hotkeys/__init__.py +0 -0
  155. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/hotkeys/base.py +0 -0
  156. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/hotkeys/chain.py +0 -0
  157. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/hotkeys/evdev.py +0 -0
  158. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/hotkeys/pynput_backend.py +0 -0
  159. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/hotkeys/socket_backend.py +0 -0
  160. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/ibus/__init__.py +0 -0
  161. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/ibus/engine.py +0 -0
  162. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/ibus/install.py +0 -0
  163. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/ibus/pending.py +0 -0
  164. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/ibus/session.py +0 -0
  165. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/ibus/textlimit.py +0 -0
  166. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/idle_audio.py +0 -0
  167. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/install_env.py +0 -0
  168. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/__init__.py +0 -0
  169. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/augment.py +0 -0
  170. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/clean.py +0 -0
  171. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/evaluate.py +0 -0
  172. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/importer.py +0 -0
  173. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/lastrun.py +0 -0
  174. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/metrics.py +0 -0
  175. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/quiet.py +0 -0
  176. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/review.py +0 -0
  177. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/store.py +0 -0
  178. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/summary.py +0 -0
  179. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/teacher.py +0 -0
  180. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/learn/train.py +0 -0
  181. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/llm.py +0 -0
  182. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/llm_api.py +0 -0
  183. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/mic_gain.py +0 -0
  184. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/models/__init__.py +0 -0
  185. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/models/silero_vad.onnx +0 -0
  186. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/numbers.py +0 -0
  187. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/pidlock.py +0 -0
  188. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/platform.py +0 -0
  189. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/postcorrect.py +0 -0
  190. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/postprocess.py +0 -0
  191. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/power.py +0 -0
  192. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/presence.py +0 -0
  193. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/privacy.py +0 -0
  194. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/prompt.py +0 -0
  195. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/quiet_audio.py +0 -0
  196. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/recorder.py +0 -0
  197. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/replies.py +0 -0
  198. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/report.py +0 -0
  199. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/retention.py +0 -0
  200. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/server/__init__.py +0 -0
  201. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/server/__main__.py +0 -0
  202. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/server/app.py +0 -0
  203. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/server/config.py +0 -0
  204. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/server/runtime.py +0 -0
  205. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/service.py +0 -0
  206. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/setup/__init__.py +0 -0
  207. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/setup/configfile.py +0 -0
  208. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/setup/extras.py +0 -0
  209. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/setup/hotkey.py +0 -0
  210. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/setup/noninteractive.py +0 -0
  211. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/setup/system.py +0 -0
  212. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/setup/ui.py +0 -0
  213. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/sounds/__init__.py +0 -0
  214. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/sounds/alert.wav +0 -0
  215. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/sounds/commit.wav +0 -0
  216. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/sounds/start.wav +0 -0
  217. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/sounds/stop.wav +0 -0
  218. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/spool.py +0 -0
  219. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/streaming.py +0 -0
  220. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/suggest.py +0 -0
  221. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/telemetry.py +0 -0
  222. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tokens.py +0 -0
  223. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tray/__init__.py +0 -0
  224. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tray/_icons.py +0 -0
  225. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tray/_indicator.py +0 -0
  226. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tray/_pystray.py +0 -0
  227. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tts/__init__.py +0 -0
  228. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tts/base.py +0 -0
  229. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tts/chain.py +0 -0
  230. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tts/edge_engine.py +0 -0
  231. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tts/espeak.py +0 -0
  232. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tts/piper_engine.py +0 -0
  233. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tts/player.py +0 -0
  234. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/tts/supertonic_engine.py +0 -0
  235. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/__init__.py +0 -0
  236. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/base.py +0 -0
  237. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/chain.py +0 -0
  238. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/clipboard.py +0 -0
  239. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/collecting.py +0 -0
  240. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/fcitx_bridge.py +0 -0
  241. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/ibus.py +0 -0
  242. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/manager.py +0 -0
  243. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/modifier_guard.py +0 -0
  244. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/paste.py +0 -0
  245. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/pynput_type.py +0 -0
  246. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/wtype.py +0 -0
  247. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/xdotool.py +0 -0
  248. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/typers/ydotool.py +0 -0
  249. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/ui.py +0 -0
  250. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/vad.py +0 -0
  251. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/vocab_stats.py +0 -0
  252. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/vocabulary.py +0 -0
  253. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/watchdog.py +0 -0
  254. {python_voiceio-1.18.16 → python_voiceio-1.18.18}/voiceio/wordfreq.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-voiceio
3
- Version: 1.18.16
3
+ Version: 1.18.18
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.16"
7
+ version = "1.18.18"
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.16
3
+ Version: 1.18.18
4
4
  Summary: Voice dictation for Linux. Speak → text, locally, instantly.
5
5
  Author: Hugo Montenegro
6
6
  License-Expression: MIT
@@ -83,6 +83,7 @@ tests/test_security_hardening.py
83
83
  tests/test_server.py
84
84
  tests/test_service.py
85
85
  tests/test_setup.py
86
+ tests/test_setup_sherpa_install.py
86
87
  tests/test_sherpa.py
87
88
  tests/test_spool.py
88
89
  tests/test_streaming.py
@@ -0,0 +1,181 @@
1
+ """The setup wizard offering Parakeet to English users without sherpa-onnx."""
2
+ from __future__ import annotations
3
+
4
+ import sys
5
+
6
+ import pytest
7
+
8
+ from voiceio.core.decoders import catalog, fetch, sherpa
9
+ from voiceio.core.decoders.sherpa import SherpaFeatures
10
+ from voiceio.setup import noninteractive, speech, steps
11
+ from test_setup import _patch_noninteractive, cfg_paths # noqa: F401 — fixture
12
+
13
+ # conftest replaces `sherpa.features` in every test; keep the real one.
14
+ REAL_FEATURES = sherpa.features
15
+ FIXED = SherpaFeatures(installed=True, length_reward=True, pretokenized_hotwords=True)
16
+
17
+
18
+ @pytest.fixture
19
+ def installable(monkeypatch):
20
+ """English user, no sherpa-onnx, an environment the installer can write to."""
21
+ monkeypatch.setattr(fetch, "can_install_sherpa", lambda: True)
22
+
23
+
24
+ @pytest.fixture
25
+ def wizard(monkeypatch):
26
+ """Run `_step_model` with the menu answer given; record downloads."""
27
+ downloads: list[str] = []
28
+ monkeypatch.setattr(steps, "_download_model", lambda name: downloads.append(name) or True)
29
+ monkeypatch.setattr(steps, "_ask_yn", lambda *a, **k: False)
30
+ monkeypatch.setattr(steps, "_print_step", lambda *a: None)
31
+
32
+ def run(answer: int = 0, language: str = "en") -> tuple[steps.SetupState, list, list]:
33
+ shown: list = []
34
+
35
+ def ask(options, default=0):
36
+ shown.append((list(options), default))
37
+ return answer
38
+ monkeypatch.setattr(steps, "_ask_choice", ask)
39
+ state = steps.SetupState(language=language)
40
+ steps._step_model(state)
41
+ return state, shown, downloads
42
+ return run
43
+
44
+
45
+ def test_english_without_sherpa_offers_parakeet_first_with_install_label(installable):
46
+ choices = speech.model_choices("en", offer_install=True)
47
+ assert choices[0] == speech.PARAKEET_INSTALL_CHOICE
48
+ assert choices[0][0] == catalog.PARAKEET
49
+ assert "installs sherpa-onnx" in choices[0][2]
50
+ assert speech.default_choice(choices) == 0
51
+ assert not any("recommended" in c[2] for c in choices[1:])
52
+ # Only the interactive wizard asks for it.
53
+ assert speech.model_choices("en") is speech.MODELS
54
+
55
+
56
+ def test_choosing_it_runs_the_shared_installer_then_selects_parakeet(
57
+ installable, wizard, monkeypatch):
58
+ calls = []
59
+
60
+ def install(**kw):
61
+ calls.append(kw)
62
+ monkeypatch.setattr(sherpa, "features", lambda: FIXED)
63
+ monkeypatch.setattr(fetch, "install_sherpa", install)
64
+ state, shown, downloads = wizard(0)
65
+ assert shown[0][0][0] == speech.PARAKEET_INSTALL_CHOICE and shown[0][1] == 0
66
+ assert calls == [{"quiet": True}]
67
+ assert state.model_name == catalog.PARAKEET
68
+ assert downloads == [catalog.PARAKEET]
69
+
70
+
71
+ def test_installer_failure_falls_back_to_small_and_setup_goes_on(
72
+ installable, wizard, monkeypatch, capsys):
73
+ def install(**kw):
74
+ raise OSError("no network")
75
+ monkeypatch.setattr(fetch, "install_sherpa", install)
76
+ state, _, downloads = wizard(0)
77
+ assert state.model_name == "small"
78
+ assert downloads == ["small"]
79
+ out = capsys.readouterr().out
80
+ assert "Couldn't install sherpa-onnx (no network)" in out
81
+
82
+
83
+ def test_install_that_still_cannot_load_falls_back(installable, wizard, monkeypatch):
84
+ monkeypatch.setattr(fetch, "install_sherpa", lambda **kw: None) # features unchanged
85
+ state, _, downloads = wizard(0)
86
+ assert state.model_name == "small" and downloads == ["small"]
87
+
88
+
89
+ def test_picking_whisper_does_not_install(installable, wizard, monkeypatch):
90
+ monkeypatch.setattr(fetch, "install_sherpa", lambda **kw: pytest.fail("installed"))
91
+ state, shown, _ = wizard(3)
92
+ assert state.model_name == shown[0][0][3][0] == "small"
93
+
94
+
95
+ def test_non_english_is_unchanged(installable, wizard, monkeypatch):
96
+ assert speech.model_choices("es", offer_install=True) is speech.MODELS
97
+ monkeypatch.setattr(fetch, "install_sherpa", lambda **kw: pytest.fail("installed"))
98
+ state, shown, _ = wizard(2, language="es")
99
+ assert shown[0][0] == speech.MODELS and state.model_name == "small"
100
+
101
+
102
+ def test_already_installed_sherpa_keeps_todays_label(installable, wizard, monkeypatch):
103
+ monkeypatch.setattr(sherpa, "features", lambda: FIXED)
104
+ monkeypatch.setattr(fetch, "install_sherpa", lambda **kw: pytest.fail("installed"))
105
+ assert speech.model_choices("en", offer_install=True)[0] == speech.PARAKEET_CHOICE
106
+ state, _, downloads = wizard(0)
107
+ assert state.model_name == catalog.PARAKEET and downloads == [catalog.PARAKEET]
108
+
109
+
110
+ def test_an_older_sherpa_is_not_swapped_inside_the_wizard(installable, monkeypatch):
111
+ monkeypatch.setattr(sherpa, "features", lambda: SherpaFeatures(installed=True))
112
+ assert speech.model_choices("en", offer_install=True) is speech.MODELS
113
+
114
+
115
+ @pytest.mark.parametrize("where", ["deb", "nix", "uvx", "readonly", "no-pip", "armv7l"])
116
+ def test_not_offered_where_the_install_cannot_work(monkeypatch, tmp_path, where):
117
+ import platform
118
+ import sysconfig
119
+
120
+ import voiceio.install_env as install_env
121
+ import voiceio.service as service
122
+ monkeypatch.setattr(service, "packaged_by", lambda: "deb" if where == "deb" else None)
123
+ monkeypatch.setattr(sys, "prefix", "/nix/store/abc-voiceio" if where == "nix" else
124
+ str(tmp_path))
125
+ monkeypatch.setattr(install_env, "running_ephemeral", lambda: where == "uvx")
126
+ monkeypatch.setattr(platform, "machine", lambda: "armv7l" if where == "armv7l" else "x86_64")
127
+ monkeypatch.setattr(fetch, "_pip_command",
128
+ lambda reinstall=False: None if where == "no-pip" else ["pip"])
129
+ site = tmp_path / "site"
130
+ site.mkdir()
131
+ monkeypatch.setattr(sysconfig, "get_paths",
132
+ lambda: {"purelib": str(site), "platlib": str(site)})
133
+ if where == "readonly":
134
+ monkeypatch.setattr(fetch.os, "access", lambda p, mode: False)
135
+ assert fetch.can_install_sherpa() is False
136
+ assert speech.model_choices("en", offer_install=True) is speech.MODELS
137
+
138
+
139
+ def test_offered_in_a_writable_pip_environment(monkeypatch, tmp_path):
140
+ import platform
141
+ import sysconfig
142
+
143
+ import voiceio.install_env as install_env
144
+ import voiceio.service as service
145
+ monkeypatch.setattr(service, "packaged_by", lambda: None)
146
+ monkeypatch.setattr(sys, "prefix", str(tmp_path))
147
+ monkeypatch.setattr(install_env, "running_ephemeral", lambda: False)
148
+ monkeypatch.setattr(platform, "machine", lambda: "x86_64")
149
+ monkeypatch.setattr(fetch, "_pip_command", lambda reinstall=False: ["pip"])
150
+ monkeypatch.setattr(sysconfig, "get_paths",
151
+ lambda: {"purelib": str(tmp_path), "platlib": str(tmp_path)})
152
+ assert fetch.can_install_sherpa() is True
153
+
154
+
155
+ def test_noninteractive_setup_installs_nothing(installable, cfg_paths, monkeypatch): # noqa: F811
156
+ _patch_noninteractive(monkeypatch)
157
+ monkeypatch.setattr(fetch, "install_sherpa", lambda **kw: pytest.fail("installed"))
158
+ assert noninteractive.run_setup_noninteractive({}) == 0
159
+ from voiceio import config
160
+ assert config.load(cfg_paths).model.name == "small"
161
+
162
+
163
+ def test_install_sherpa_uses_the_shared_pip_path_and_refreshes_detection(monkeypatch):
164
+ monkeypatch.setattr(sherpa, "features", REAL_FEATURES)
165
+ REAL_FEATURES()
166
+ assert REAL_FEATURES.cache_info().currsize == 1
167
+ calls = []
168
+ monkeypatch.setattr(fetch, "_pip_install", lambda args, **kw: calls.append((args, kw)))
169
+ fetch.install_sherpa(quiet=True)
170
+ assert calls == [(["--upgrade", fetch.SHERPA_REQUIREMENT], {"quiet": True})]
171
+ assert REAL_FEATURES.cache_info().currsize == 0
172
+
173
+
174
+ def test_quiet_pip_failure_names_pips_last_line(monkeypatch):
175
+ import subprocess
176
+ import types
177
+ monkeypatch.setattr(fetch, "_pip_command", lambda reinstall=False: ["pip", "install"])
178
+ monkeypatch.setattr(subprocess, "run", lambda cmd, **kw: types.SimpleNamespace(
179
+ returncode=1, stderr="Collecting x\nERROR: No matching distribution\n"))
180
+ with pytest.raises(OSError, match="No matching distribution"):
181
+ fetch._pip_install(["sherpa-onnx>=2.0.2"], quiet=True)
@@ -0,0 +1 @@
1
+ __version__ = "1.18.18"
@@ -203,29 +203,74 @@ def install_patched_sherpa(base_url: str = SHERPA_WHEELS) -> str:
203
203
  path.write_bytes(data)
204
204
  # Same version number as upstream's release: force the swap.
205
205
  _pip_install([str(path)], reinstall=True)
206
+ _refresh_sherpa()
206
207
  return wheel
207
208
 
208
209
 
209
- def install_sherpa() -> None:
210
+ def install_sherpa(*, quiet: bool = False) -> None:
210
211
  """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])
212
+ Parakeet fixes. Raises OSError with what went wrong. `quiet`: keep pip's
213
+ output off the terminal (the setup wizard shows a spinner instead)."""
214
+ _pip_install(["--upgrade", SHERPA_REQUIREMENT], quiet=quiet)
215
+ _refresh_sherpa()
213
216
 
214
217
 
215
- def _pip_install(args: list[str], *, reinstall: bool = False) -> None:
216
- """pip (or uv) install into this Python; OSError on failure."""
218
+ def _refresh_sherpa() -> None:
219
+ """Let this process see a sherpa-onnx installed after it started: the
220
+ import system's directory caches and the cached feature detection."""
221
+ import importlib
222
+
223
+ from voiceio.core.decoders.sherpa import features
224
+ importlib.invalidate_caches()
225
+ features.cache_clear()
226
+
227
+
228
+ # Platforms PyPI has sherpa-onnx wheels for that voiceio offers to install on.
229
+ _SHERPA_MACHINES = frozenset({"x86_64", "amd64", "aarch64", "arm64"})
230
+
231
+
232
+ def can_install_sherpa() -> bool:
233
+ """Whether `install_sherpa` can work here: a pip or uv to run, a wheel for
234
+ this CPU, and an environment this user may write to that will still be
235
+ there tomorrow. Not a distro package (/usr/lib/voiceio is root's), not the
236
+ Nix store (read-only), not a uvx environment (uv may delete it)."""
237
+ import platform
238
+ import sys
239
+ import sysconfig
240
+
241
+ from voiceio.install_env import running_ephemeral
242
+ from voiceio.service import packaged_by
243
+ if packaged_by() or sys.prefix.startswith("/nix/store/") or running_ephemeral():
244
+ return False
245
+ if platform.machine().lower() not in _SHERPA_MACHINES or _pip_command() is None:
246
+ return False
247
+ paths = sysconfig.get_paths()
248
+ return all(os.access(paths[k], os.W_OK) for k in ("purelib", "platlib"))
249
+
250
+
251
+ def _pip_command(reinstall: bool = False) -> list[str] | None:
252
+ """The pip (or uv) command that installs into this Python, or None."""
217
253
  import importlib.util
218
254
  import shutil as _shutil
219
- import subprocess
220
255
  import sys
221
256
  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:
257
+ return [sys.executable, "-m", "pip", "install"] + \
258
+ (["--force-reinstall", "--no-deps"] if reinstall else [])
259
+ if uv := _shutil.which("uv"):
260
+ return [uv, "pip", "install", "--python", sys.executable] + \
261
+ (["--reinstall", "--no-deps"] if reinstall else [])
262
+ return None
263
+
264
+
265
+ def _pip_install(args: list[str], *, reinstall: bool = False, quiet: bool = False) -> None:
266
+ """pip (or uv) install into this Python; OSError on failure."""
267
+ import subprocess
268
+ base = _pip_command(reinstall)
269
+ if base is None:
228
270
  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)}")
271
+ cmd = base + args
272
+ res = subprocess.run(cmd, capture_output=quiet, text=quiet)
273
+ if res.returncode != 0:
274
+ tail = (res.stderr or "").strip().splitlines()[-1:] if quiet else []
275
+ raise OSError(f"installing {args[-1]} failed (exit {res.returncode})"
276
+ + (f": {tail[0]}" if tail else f": {' '.join(cmd)}"))
@@ -21,20 +21,64 @@ MODELS = [
21
21
  # English, with a sherpa-onnx that has the NeMo TDT beam-search fix.
22
22
  PARAKEET_CHOICE = ("parakeet-tdt-0.6b-v2", "480 MB",
23
23
  "Fastest, best on names; English only (recommended)")
24
-
25
-
26
- def model_choices(language: str = "en") -> list[tuple[str, str, str]]:
27
- """The wizard's model menu, the default decoder first when it's Parakeet."""
24
+ # The same model where the wizard can install that sherpa-onnx first
25
+ # (`voiceio models sherpa`'s installer). ~16 MB: sherpa-onnx + sherpa-onnx-core
26
+ # wheels for Linux x86_64 (2.0.3 on PyPI).
27
+ PARAKEET_INSTALL_CHOICE = (PARAKEET_CHOICE[0], PARAKEET_CHOICE[1],
28
+ "Fastest, best on names; English only "
29
+ "(recommended, installs sherpa-onnx ~16 MB)")
30
+
31
+
32
+ def model_choices(language: str = "en", *, offer_install: bool = False,
33
+ ) -> list[tuple[str, str, str]]:
34
+ """The wizard's model menu, the default decoder first when it's Parakeet.
35
+
36
+ `offer_install`: for English without a usable sherpa-onnx, still put
37
+ Parakeet first, labelled as installing sherpa-onnx, where that install can
38
+ work (see `fetch.can_install_sherpa`). Only an interactive wizard asks for
39
+ it; the non-interactive setup never installs packages by itself.
40
+ """
28
41
  from voiceio.core.decoders.catalog import default_model
29
- if default_model(language) != PARAKEET_CHOICE[0]:
42
+ if default_model(language) == PARAKEET_CHOICE[0]:
43
+ first = PARAKEET_CHOICE
44
+ elif offer_install and language == "en" and _can_offer_sherpa_install():
45
+ first = PARAKEET_INSTALL_CHOICE
46
+ else:
30
47
  return MODELS
31
- return [PARAKEET_CHOICE] + [
48
+ return [first] + [
32
49
  (n, size, desc.replace(" (recommended)", "")) for n, size, desc in MODELS]
33
50
 
34
51
 
52
+ def _can_offer_sherpa_install() -> bool:
53
+ """No sherpa-onnx at all, and an environment the installer can write to.
54
+ An older sherpa-onnx already imported here can't be swapped for the new
55
+ one inside this process: `voiceio models sherpa` upgrades that."""
56
+ from voiceio.core.decoders.fetch import can_install_sherpa
57
+ from voiceio.core.decoders.sherpa import features
58
+ return not features().installed and can_install_sherpa()
59
+
60
+
35
61
  def default_choice(choices: list[tuple[str, str, str]]) -> int:
36
62
  from voiceio.setup.ui import _index_of
37
- return 0 if choices[0] == PARAKEET_CHOICE else _index_of(choices, "small", 2)
63
+ return 0 if choices[0][0] == PARAKEET_CHOICE[0] else _index_of(choices, "small", 2)
64
+
65
+
66
+ def _install_sherpa() -> bool:
67
+ """Install sherpa-onnx for Parakeet, with a spinner; True once Parakeet is
68
+ the default here. On any failure: one line, False (caller falls back)."""
69
+ from voiceio.core.decoders import fetch
70
+ from voiceio.core.decoders.catalog import default_model
71
+ with Spinner(f"Installing {fetch.SHERPA_REQUIREMENT}...") as sp:
72
+ try:
73
+ fetch.install_sherpa(quiet=True)
74
+ except OSError as e:
75
+ sp.warn(f"Couldn't install sherpa-onnx ({e}); using Whisper small instead.")
76
+ return False
77
+ if default_model("en") != PARAKEET_CHOICE[0]:
78
+ sp.warn("sherpa-onnx installed but can't load here; using Whisper small instead.")
79
+ return False
80
+ sp.ok("sherpa-onnx installed")
81
+ return True
38
82
 
39
83
 
40
84
  class _SherpaModel:
@@ -302,11 +302,15 @@ def _step_model(state: SetupState) -> None:
302
302
  print(f" {DIM}Larger models are more accurate but slower and use more RAM.{RESET}")
303
303
  _current_note(state.is_rerun, cur.model.name if cur else "")
304
304
  print()
305
- models = model_choices(state.language)
305
+ models = model_choices(state.language, offer_install=True)
306
306
  model_default = _index_of(models, cur.model.name, default_choice(models)) if cur \
307
307
  else default_choice(models)
308
308
  model_idx = _ask_choice(models, default=model_default)
309
309
  state.model_name = models[model_idx][0]
310
+ if models[model_idx] == speech.PARAKEET_INSTALL_CHOICE and not speech._install_sherpa():
311
+ models = model_choices(state.language)
312
+ model_idx = _index_of(models, "small", default_choice(models))
313
+ state.model_name = models[model_idx][0]
310
314
 
311
315
  # Download immediately
312
316
  if not _download_model(state.model_name):
@@ -1 +0,0 @@
1
- __version__ = "1.18.16"