python-voiceio 1.18.20__tar.gz → 1.18.21__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.
- {python_voiceio-1.18.20/python_voiceio.egg-info → python_voiceio-1.18.21}/PKG-INFO +1 -1
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/pyproject.toml +1 -1
- {python_voiceio-1.18.20 → python_voiceio-1.18.21/python_voiceio.egg-info}/PKG-INFO +1 -1
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/python_voiceio.egg-info/SOURCES.txt +6 -0
- python_voiceio-1.18.21/tests/test_learn_tts.py +89 -0
- python_voiceio-1.18.21/tests/test_parakeet_learn.py +216 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_sherpa.py +4 -2
- python_voiceio-1.18.21/tests/test_upgrade.py +55 -0
- python_voiceio-1.18.21/voiceio/__init__.py +1 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/cli/__init__.py +2 -1
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/cli/learn.py +111 -37
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/cli/models.py +5 -2
- python_voiceio-1.18.21/voiceio/cli/upgrade.py +114 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/decoders/__init__.py +2 -1
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/decoders/catalog.py +46 -3
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/health.py +12 -5
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/evaluate.py +19 -4
- python_voiceio-1.18.21/voiceio/learn/parakeet.py +703 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/teacher.py +48 -2
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/train.py +16 -0
- python_voiceio-1.18.21/voiceio/learn/tts_voice.py +261 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/replies.py +4 -2
- python_voiceio-1.18.20/voiceio/__init__.py +0 -1
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/LICENSE +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/README.md +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/python_voiceio.egg-info/dependency_links.txt +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/python_voiceio.egg-info/entry_points.txt +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/python_voiceio.egg-info/requires.txt +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/python_voiceio.egg-info/top_level.txt +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/setup.cfg +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_announce.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_app_wiring.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_architecture_ratchets.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_audio_devices.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_audio_quality.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_audio_source.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_backend_probes.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_cancel.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_cli.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_clipboard_read.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_clipboard_typer.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_commands.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_concurrency_lockdown.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_config.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_context_terms.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_corrections.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_cuda_setup_hint.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_dead_mic.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_decoders.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_engine.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_errorlog.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_evdev_uaccess.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_evdev_x11_optional.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_fallback.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_fcitx_bridge.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_feedback_stream.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_focus.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_gpu_fallback.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_health.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_hints.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_history.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_hotkey_modes.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_ibus_engine_limits.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_ibus_engine_listener.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_ibus_pending.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_ibus_pids.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_ibus_ping.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_ibus_session.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_ibus_textlimit.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_ibus_typer.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_idle_audio.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_input_latency.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_install_env.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_learn_clean.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_learn_import.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_learn_language.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_learn_metrics.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_learn_pipeline.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_learn_quiet.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_learn_resume.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_learn_review.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_learn_summary.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_learn_targets.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_lifecycle_hardening.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_llm.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_llm_api.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_mic_gain.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_mic_test.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_modifier_guard.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_numbers.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_paste_last.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_pipeline.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_platform.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_postcorrect.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_postprocess.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_prebuffer.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_presence.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_prompt.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_property_chaos.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_quiet_audio.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_recorder_integration.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_replies.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_report.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_retention.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_robustness.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_security_hardening.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_server.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_service.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_setup.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_setup_sherpa_install.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_silent_tail.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_spool.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_state_machine.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_streaming.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_suggest.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_telemetry.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_tokens.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_transcriber.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_tray.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_tts.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_tts_socket.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_typer_manager.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_vad.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_vocabulary.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_wordfreq.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/tests/test_worker_decode.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/__main__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/announce.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/app.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/audio_devices.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/audio_source.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/backends.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/cli/configcmd.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/cli/corrections.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/cli/doctor.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/cli/history.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/cli/replies.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/cli/servicecmd.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/cli/uninstall.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/cli/vocab.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/clipboard_read.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/commands.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/config.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/consent.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/context_terms.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/bias.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/decoders/base.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/decoders/faster_whisper/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/decoders/faster_whisper/worker.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/decoders/fetch.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/decoders/lanes.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/decoders/sherpa.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/decoders/whispercpp.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/engine.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/core/pipeline.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/corrections.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/data/60-voiceio-uaccess.rules +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/data/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/demo.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/display.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/errorlog.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/feedback.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/focus.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/hints.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/history.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/hotkeys/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/hotkeys/base.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/hotkeys/chain.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/hotkeys/evdev.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/hotkeys/pynput_backend.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/hotkeys/socket_backend.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/ibus/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/ibus/engine.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/ibus/install.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/ibus/pending.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/ibus/session.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/ibus/textlimit.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/idle_audio.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/install_env.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/augment.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/clean.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/importer.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/lastrun.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/metrics.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/quiet.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/review.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/store.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/learn/summary.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/llm.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/llm_api.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/mic_gain.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/models/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/models/silero_vad.onnx +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/numbers.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/pidlock.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/platform.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/postcorrect.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/postprocess.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/power.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/presence.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/privacy.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/prompt.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/quiet_audio.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/recorder.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/report.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/retention.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/server/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/server/__main__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/server/app.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/server/config.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/server/runtime.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/service.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/setup/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/setup/configfile.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/setup/extras.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/setup/hotkey.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/setup/noninteractive.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/setup/speech.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/setup/steps.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/setup/system.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/setup/ui.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/sounds/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/sounds/alert.wav +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/sounds/commit.wav +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/sounds/start.wav +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/sounds/stop.wav +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/spool.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/state.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/streaming.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/suggest.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/telemetry.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tokens.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tray/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tray/_icons.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tray/_indicator.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tray/_pystray.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tts/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tts/base.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tts/chain.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tts/edge_engine.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tts/espeak.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tts/piper_engine.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tts/player.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/tts/supertonic_engine.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/__init__.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/base.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/chain.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/clipboard.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/collecting.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/fcitx_bridge.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/ibus.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/manager.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/modifier_guard.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/paste.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/pynput_type.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/wtype.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/xdotool.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/typers/ydotool.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/ui.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/vad.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/vocab_stats.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/vocabulary.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/watchdog.py +0 -0
- {python_voiceio-1.18.20 → python_voiceio-1.18.21}/voiceio/wordfreq.py +0 -0
|
@@ -60,6 +60,7 @@ tests/test_learn_resume.py
|
|
|
60
60
|
tests/test_learn_review.py
|
|
61
61
|
tests/test_learn_summary.py
|
|
62
62
|
tests/test_learn_targets.py
|
|
63
|
+
tests/test_learn_tts.py
|
|
63
64
|
tests/test_lifecycle_hardening.py
|
|
64
65
|
tests/test_llm.py
|
|
65
66
|
tests/test_llm_api.py
|
|
@@ -67,6 +68,7 @@ tests/test_mic_gain.py
|
|
|
67
68
|
tests/test_mic_test.py
|
|
68
69
|
tests/test_modifier_guard.py
|
|
69
70
|
tests/test_numbers.py
|
|
71
|
+
tests/test_parakeet_learn.py
|
|
70
72
|
tests/test_paste_last.py
|
|
71
73
|
tests/test_pipeline.py
|
|
72
74
|
tests/test_platform.py
|
|
@@ -100,6 +102,7 @@ tests/test_tray.py
|
|
|
100
102
|
tests/test_tts.py
|
|
101
103
|
tests/test_tts_socket.py
|
|
102
104
|
tests/test_typer_manager.py
|
|
105
|
+
tests/test_upgrade.py
|
|
103
106
|
tests/test_vad.py
|
|
104
107
|
tests/test_vocabulary.py
|
|
105
108
|
tests/test_wordfreq.py
|
|
@@ -167,6 +170,7 @@ voiceio/cli/models.py
|
|
|
167
170
|
voiceio/cli/replies.py
|
|
168
171
|
voiceio/cli/servicecmd.py
|
|
169
172
|
voiceio/cli/uninstall.py
|
|
173
|
+
voiceio/cli/upgrade.py
|
|
170
174
|
voiceio/cli/vocab.py
|
|
171
175
|
voiceio/core/__init__.py
|
|
172
176
|
voiceio/core/bias.py
|
|
@@ -202,12 +206,14 @@ voiceio/learn/evaluate.py
|
|
|
202
206
|
voiceio/learn/importer.py
|
|
203
207
|
voiceio/learn/lastrun.py
|
|
204
208
|
voiceio/learn/metrics.py
|
|
209
|
+
voiceio/learn/parakeet.py
|
|
205
210
|
voiceio/learn/quiet.py
|
|
206
211
|
voiceio/learn/review.py
|
|
207
212
|
voiceio/learn/store.py
|
|
208
213
|
voiceio/learn/summary.py
|
|
209
214
|
voiceio/learn/teacher.py
|
|
210
215
|
voiceio/learn/train.py
|
|
216
|
+
voiceio/learn/tts_voice.py
|
|
211
217
|
voiceio/models/__init__.py
|
|
212
218
|
voiceio/models/silero_vad.onnx
|
|
213
219
|
voiceio/server/__init__.py
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"""Tests for personal Qwen3-TTS dataset export (`voiceio learn tts`)."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import json
|
|
5
|
+
import wave
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
import numpy as np
|
|
9
|
+
import pytest
|
|
10
|
+
|
|
11
|
+
from voiceio import config
|
|
12
|
+
from voiceio.learn import store, tts_voice
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _write_pcm16(path: Path, samples: np.ndarray, sr: int = 16000) -> None:
|
|
16
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
17
|
+
pcm = (np.clip(samples, -1.0, 1.0) * 32767).astype(np.int16)
|
|
18
|
+
with wave.open(str(path), "wb") as wf:
|
|
19
|
+
wf.setnchannels(1)
|
|
20
|
+
wf.setsampwidth(2)
|
|
21
|
+
wf.setframerate(sr)
|
|
22
|
+
wf.writeframes(pcm.tobytes())
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _clean_speech(secs: float, *, sr: int = 16000, noise: float = 0.001) -> np.ndarray:
|
|
26
|
+
"""Alternating active speech bursts + quiet pauses → high SNR."""
|
|
27
|
+
rng = np.random.default_rng(1)
|
|
28
|
+
n = int(secs * sr)
|
|
29
|
+
t = np.arange(n, dtype=np.float32) / sr
|
|
30
|
+
x = rng.normal(0, noise, n).astype(np.float32)
|
|
31
|
+
# 70% speech tone, 30% quiet pause
|
|
32
|
+
active = int(n * 0.7)
|
|
33
|
+
x[:active] += 0.25 * np.sin(2.0 * np.pi * 220.0 * t[:active])
|
|
34
|
+
return x
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def test_measure_quality_distinguishes_clean_from_noisy():
|
|
38
|
+
clean = _clean_speech(4.0, noise=0.001)
|
|
39
|
+
noisy = _clean_speech(4.0, noise=0.15)
|
|
40
|
+
qc = tts_voice.measure_quality(clean)
|
|
41
|
+
qn = tts_voice.measure_quality(noisy)
|
|
42
|
+
assert qc.snr_db > 25.0
|
|
43
|
+
assert qn.snr_db < 15.0
|
|
44
|
+
assert qc.clipped_frac == 0.0
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def test_resample_linear_preserves_duration_and_bounds():
|
|
48
|
+
x = _clean_speech(2.0, sr=16000)
|
|
49
|
+
y = tts_voice.resample_linear(x, 16000, 24000)
|
|
50
|
+
assert len(y) == 48000
|
|
51
|
+
assert y.dtype == np.float32
|
|
52
|
+
assert np.max(np.abs(y)) <= 1.0
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def test_export_qwen_tts_selects_clean_desktop_clips_and_writes_manifest(tmp_path):
|
|
56
|
+
rec = config.RECORDINGS_DIR
|
|
57
|
+
rec.mkdir(parents=True, exist_ok=True)
|
|
58
|
+
_write_pcm16(rec / "clean.wav", _clean_speech(6.0, noise=0.001))
|
|
59
|
+
_write_pcm16(rec / "noisy.wav", _clean_speech(6.0, noise=0.18))
|
|
60
|
+
_write_pcm16(rec / "phone.wav", _clean_speech(6.0, noise=0.001))
|
|
61
|
+
|
|
62
|
+
config.HISTORY_PATH.parent.mkdir(parents=True, exist_ok=True)
|
|
63
|
+
rows = [
|
|
64
|
+
{"audio": "clean.wav", "ts": 1.0, "duration": 6.0, "text": "hello world from my clean studio mic", "source": "desktop"},
|
|
65
|
+
{"audio": "noisy.wav", "ts": 2.0, "duration": 6.0, "text": "hello world from a very noisy room", "source": "desktop"},
|
|
66
|
+
{"audio": "phone.wav", "ts": 3.0, "duration": 6.0, "text": "hello world from my mobile phone", "source": "phone"},
|
|
67
|
+
]
|
|
68
|
+
config.HISTORY_PATH.write_text("\n".join(json.dumps(r) for r in rows) + "\n")
|
|
69
|
+
for r in rows:
|
|
70
|
+
store.add_label(r["audio"], [store.Segment(0.0, 6.0, r["text"])], "teacher:test")
|
|
71
|
+
|
|
72
|
+
out = tmp_path / "tts-exp"
|
|
73
|
+
stats = tts_voice.export_qwen_tts(out, target_minutes=5.0, min_snr_db=20.0)
|
|
74
|
+
assert stats.clips == 1
|
|
75
|
+
assert (out / "ref.wav").is_file()
|
|
76
|
+
manifest_rows = [json.loads(ln) for ln in (out / "train_raw.jsonl").read_text().splitlines()]
|
|
77
|
+
assert len(manifest_rows) == 1
|
|
78
|
+
assert manifest_rows[0]["ref_audio"] == "ref.wav"
|
|
79
|
+
assert "clean studio mic" in manifest_rows[0]["text"]
|
|
80
|
+
with wave.open(str(out / manifest_rows[0]["audio"])) as wf:
|
|
81
|
+
assert wf.getframerate() == tts_voice.TARGET_SR
|
|
82
|
+
|
|
83
|
+
recipe = tts_voice.remote_recipe(out, speaker="hugo")
|
|
84
|
+
assert "prepare_data.py" in recipe and "sft_12hz.py" in recipe and "hugo" in recipe
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def test_export_qwen_tts_errors_when_no_clips_meet_snr(tmp_path):
|
|
88
|
+
with pytest.raises(RuntimeError, match="no clean desktop clips"):
|
|
89
|
+
tts_voice.export_qwen_tts(tmp_path / "empty", min_snr_db=25.0)
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"""Parakeet fine-tuning support: manifests, multi-device augmentation, sherpa
|
|
2
|
+
run discovery, label collision avoidance, promotion, and stop-tail trimming."""
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import json
|
|
7
|
+
import types
|
|
8
|
+
import wave
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
import numpy as np
|
|
12
|
+
import pytest
|
|
13
|
+
|
|
14
|
+
from voiceio import config
|
|
15
|
+
from voiceio.core.decoders import catalog
|
|
16
|
+
from voiceio.learn import evaluate, metrics, parakeet, teacher, train
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _write_wav(path: Path, secs: float, *, sr: int = 16000, amp: float = 0.2) -> None:
|
|
20
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
21
|
+
n = int(secs * sr)
|
|
22
|
+
t = np.arange(n, dtype=np.float32) / sr
|
|
23
|
+
samples = (amp * np.sin(2.0 * np.pi * 440.0 * t)).astype(np.float32)
|
|
24
|
+
pcm = (np.clip(samples, -1.0, 1.0) * 32767).astype(np.int16)
|
|
25
|
+
with wave.open(str(path), "wb") as wf:
|
|
26
|
+
wf.setnchannels(1)
|
|
27
|
+
wf.setsampwidth(2)
|
|
28
|
+
wf.setframerate(sr)
|
|
29
|
+
wf.writeframes(pcm.tobytes())
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _fake_sherpa_run(models_root: Path, run_name: str) -> Path:
|
|
33
|
+
sherpa_dir = models_root / run_name / "sherpa"
|
|
34
|
+
sherpa_dir.mkdir(parents=True, exist_ok=True)
|
|
35
|
+
for fname in ("encoder.int8.onnx", "decoder.int8.onnx", "joiner.int8.onnx", "tokens.txt"):
|
|
36
|
+
(sherpa_dir / fname).write_text("x", encoding="utf-8")
|
|
37
|
+
return models_root / run_name
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# ── base detection & catalog labels ──────────────────────────────────────
|
|
41
|
+
|
|
42
|
+
def test_parakeet_base_and_sherpa_dir_detection(tmp_path):
|
|
43
|
+
assert parakeet.is_parakeet_base("parakeet-tdt-0.6b-v2")
|
|
44
|
+
assert parakeet.is_parakeet_base("parakeet-tdt-0.6b-v3")
|
|
45
|
+
assert parakeet.is_parakeet_base("nvidia/parakeet-tdt-0.6b-v2")
|
|
46
|
+
assert parakeet.is_parakeet_base("/tmp/custom.nemo")
|
|
47
|
+
assert not parakeet.is_parakeet_base("small")
|
|
48
|
+
assert not parakeet.is_parakeet_base("openai/whisper-small")
|
|
49
|
+
|
|
50
|
+
incomplete = tmp_path / "run-a" / "sherpa"
|
|
51
|
+
incomplete.mkdir(parents=True)
|
|
52
|
+
(incomplete / "tokens.txt").write_text("x")
|
|
53
|
+
assert not parakeet.is_sherpa_model_dir(incomplete)
|
|
54
|
+
assert train.run_model_spec(tmp_path / "run-a") is None
|
|
55
|
+
|
|
56
|
+
run = _fake_sherpa_run(tmp_path, "v0008-parakeet-tdt-0.6b-v2-20261128-2200")
|
|
57
|
+
assert parakeet.is_sherpa_model_dir(run / "sherpa")
|
|
58
|
+
assert train.run_model_spec(run) == f"sherpa:{run / 'sherpa'}"
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def test_sherpa_label_uses_run_name_and_avoids_collisions(tmp_path):
|
|
62
|
+
run_a = _fake_sherpa_run(tmp_path, "v0008-parakeet-tdt-0.6b-v2-20261128-2200")
|
|
63
|
+
(run_a / "train.json").write_text(json.dumps({"base": "parakeet-tdt-0.6b-v2"}))
|
|
64
|
+
a = f"sherpa:{run_a / 'sherpa'}"
|
|
65
|
+
b = "sherpa:/home/u/.local/share/voiceio/learn/models/v0009-parakeet-tdt-0.6b-v2-20261129-0100/sherpa"
|
|
66
|
+
assert catalog.sherpa_label(a) == "v0008-parakeet-tdt-0.6b-v2-20261128-2200"
|
|
67
|
+
assert catalog.sherpa_label(b) == "v0009-parakeet-tdt-0.6b-v2-20261129-0100"
|
|
68
|
+
assert catalog.sherpa_label(a) != catalog.sherpa_label(b)
|
|
69
|
+
assert catalog.sherpa_label("sherpa:/custom/my-transducer") == "my-transducer"
|
|
70
|
+
assert catalog.sherpa_label(catalog.PARAKEET) == catalog.PARAKEET
|
|
71
|
+
assert catalog.family(a) == "parakeet"
|
|
72
|
+
assert catalog.is_parakeet(a)
|
|
73
|
+
# Arbitrary user directory names must NOT leak into telemetry family.
|
|
74
|
+
assert catalog.family("sherpa:/home/alice/models/parakeet-custom-sherpa-onnx") == "sherpa-onnx"
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
# ── multi-device acoustic augmentation ───────────────────────────────────
|
|
78
|
+
|
|
79
|
+
@pytest.mark.parametrize("profile", ["home", "laptop", "phone"])
|
|
80
|
+
def test_augment_waveform_profiles_are_finite_and_bounded(profile):
|
|
81
|
+
rng = np.random.default_rng(42)
|
|
82
|
+
t = np.arange(16000, dtype=np.float32) / 16000
|
|
83
|
+
clean = (0.3 * np.sin(2.0 * np.pi * 300.0 * t)).astype(np.float32)
|
|
84
|
+
out = parakeet.augment_waveform(clean, rng, profile=profile)
|
|
85
|
+
assert out.dtype == np.float32
|
|
86
|
+
assert len(out) > 14000
|
|
87
|
+
assert np.all(np.isfinite(out))
|
|
88
|
+
assert np.max(np.abs(out)) <= 1.0
|
|
89
|
+
assert not np.allclose(out[:min(len(out), len(clean))], clean[:min(len(out), len(clean))])
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def test_augment_waveform_handles_empty_and_is_deterministic():
|
|
93
|
+
empty = np.zeros(0, dtype=np.float32)
|
|
94
|
+
assert len(parakeet.augment_waveform(empty, np.random.default_rng(0))) == 0
|
|
95
|
+
x = np.linspace(-0.2, 0.2, 8000, dtype=np.float32)
|
|
96
|
+
a = parakeet.augment_waveform(x, np.random.default_rng(7), profile="phone")
|
|
97
|
+
b = parakeet.augment_waveform(x, np.random.default_rng(7), profile="phone")
|
|
98
|
+
np.testing.assert_array_equal(a, b)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
# ── NeMo manifest export ─────────────────────────────────────────────────
|
|
102
|
+
|
|
103
|
+
def test_export_nemo_manifests_filters_short_and_empty(tmp_path):
|
|
104
|
+
_write_wav(tmp_path / "train" / "000000.wav", 2.0)
|
|
105
|
+
_write_wav(tmp_path / "train" / "000001.wav", 0.1) # too short
|
|
106
|
+
_write_wav(tmp_path / "train" / "000002.wav", 1.5) # empty text
|
|
107
|
+
_write_wav(tmp_path / "dev" / "000000.wav", 3.0)
|
|
108
|
+
(tmp_path / "train.jsonl").write_text(
|
|
109
|
+
json.dumps({"audio": "train/000000.wav", "text": "Hello Kalshi."}) + "\n"
|
|
110
|
+
+ json.dumps({"audio": "train/000001.wav", "text": "too short"}) + "\n"
|
|
111
|
+
+ json.dumps({"audio": "train/000002.wav", "text": " "}) + "\n",
|
|
112
|
+
encoding="utf-8",
|
|
113
|
+
)
|
|
114
|
+
(tmp_path / "dev.jsonl").write_text(
|
|
115
|
+
json.dumps({"audio": "dev/000000.wav", "text": "Dev clip."}) + "\n",
|
|
116
|
+
encoding="utf-8",
|
|
117
|
+
)
|
|
118
|
+
tr, dv, counts = parakeet.export_nemo_manifests(tmp_path)
|
|
119
|
+
assert counts == {"train": 1, "dev": 1}
|
|
120
|
+
row = json.loads(tr.read_text(encoding="utf-8").strip())
|
|
121
|
+
assert row["text"] == "Hello Kalshi."
|
|
122
|
+
assert row["duration"] == pytest.approx(2.0, abs=0.02)
|
|
123
|
+
assert Path(row["audio_filepath"]).is_absolute()
|
|
124
|
+
assert len(dv.read_text(encoding="utf-8").splitlines()) == 1
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
# ── trailing silence trimming (teacher data hygiene) ─────────────────────
|
|
128
|
+
|
|
129
|
+
def test_trim_trailing_silence_cuts_stop_tail_but_keeps_quiet_clips():
|
|
130
|
+
class FakeVad:
|
|
131
|
+
def __init__(self, speech_until_samples: int):
|
|
132
|
+
self._until = speech_until_samples
|
|
133
|
+
self._pos = 0
|
|
134
|
+
|
|
135
|
+
def reset(self):
|
|
136
|
+
self._pos = 0
|
|
137
|
+
|
|
138
|
+
def is_speech(self, chunk):
|
|
139
|
+
start = self._pos
|
|
140
|
+
self._pos += len(chunk)
|
|
141
|
+
return start < self._until
|
|
142
|
+
|
|
143
|
+
audio = np.zeros(16000 * 6, dtype=np.float32) # 6s clip
|
|
144
|
+
# Speech ends at 2.0s → keep 2.0 + 0.4 = 2.4s (trims 3.6s tail).
|
|
145
|
+
trimmed = teacher.trim_trailing_silence(audio, FakeVad(16000 * 2))
|
|
146
|
+
assert len(trimmed) == pytest.approx(int(2.4 * 16000), abs=512)
|
|
147
|
+
# Speech ends at 5.8s → <0.3s to trim, leave untouched.
|
|
148
|
+
untouched = teacher.trim_trailing_silence(audio, FakeVad(int(5.8 * 16000)))
|
|
149
|
+
assert len(untouched) == len(audio)
|
|
150
|
+
# No speech detected → leave untouched (never wipe a quiet clip).
|
|
151
|
+
silent = teacher.trim_trailing_silence(audio, FakeVad(0))
|
|
152
|
+
assert len(silent) == len(audio)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
# ── eval matching, source breakdown, models list, health & promote ───────
|
|
156
|
+
|
|
157
|
+
def test_eval_matches_parakeet_finetune_by_run_name_and_prints_sources(monkeypatch, tmp_path):
|
|
158
|
+
run = _fake_sherpa_run(tmp_path / "models", "v0008-parakeet-tdt-0.6b-v2-20261128-2200")
|
|
159
|
+
spec = f"sherpa:{run / 'sherpa'}"
|
|
160
|
+
runs = tmp_path / "runs"
|
|
161
|
+
runs.mkdir()
|
|
162
|
+
(runs / "eval-20261128-221000.json").write_text(json.dumps({
|
|
163
|
+
"decoder": "sherpa:v0008-parakeet-tdt-0.6b-v2-20261128-2200",
|
|
164
|
+
"dataset": "v0008", "mode": "offline",
|
|
165
|
+
"metrics": metrics.METRICS_VERSION, "wer": 0.045, "term_recall": 0.88,
|
|
166
|
+
"repetitions": 0, "clips": 10,
|
|
167
|
+
}))
|
|
168
|
+
monkeypatch.setattr(evaluate, "learn_dir", lambda: tmp_path)
|
|
169
|
+
assert evaluate.latest(spec, "v0008")["wer"] == 0.045
|
|
170
|
+
|
|
171
|
+
res = evaluate.EvalResult(
|
|
172
|
+
decoder="sherpa:test", dataset="v0008", clips=2, ref_words=20, errors=2,
|
|
173
|
+
terms_spoken=4, terms_recalled=3, audio_secs=10.0, decode_secs=1.0,
|
|
174
|
+
per_clip=[
|
|
175
|
+
{"file": "a.wav", "source": "desktop", "wer": 0.0, "errors": 0, "ref_words": 10,
|
|
176
|
+
"terms": [2, 2], "secs": 0.5},
|
|
177
|
+
{"file": "b.wav", "source": "phone", "wer": 0.2, "errors": 2, "ref_words": 10,
|
|
178
|
+
"terms": [2, 1], "secs": 0.5},
|
|
179
|
+
],
|
|
180
|
+
)
|
|
181
|
+
summary = res.summary()
|
|
182
|
+
assert "by source:" in summary and "desktop (1): WER 0.0%" in summary
|
|
183
|
+
assert "phone (1): WER 20.0%" in summary
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def test_models_and_health_and_promote_support_parakeet_finetunes(monkeypatch, tmp_path):
|
|
187
|
+
from voiceio.cli import learn as learn_cli
|
|
188
|
+
from voiceio.cli import models as models_cli
|
|
189
|
+
from voiceio.health import _learning_status
|
|
190
|
+
|
|
191
|
+
run = _fake_sherpa_run(tmp_path / "models", "v0008-parakeet-tdt-0.6b-v2-20261128-2200")
|
|
192
|
+
spec = f"sherpa:{run / 'sherpa'}"
|
|
193
|
+
monkeypatch.setattr("voiceio.learn.store.learn_dir", lambda: tmp_path)
|
|
194
|
+
|
|
195
|
+
assert models_cli._fine_tunes() == [spec]
|
|
196
|
+
|
|
197
|
+
cfg = config.Config()
|
|
198
|
+
cfg.model.name = spec
|
|
199
|
+
status = _learning_status(cfg)
|
|
200
|
+
assert "fine-tuned on you (v0008-parakeet-tdt-0.6b-v2-20261128-2200)" in status["Voice model"]
|
|
201
|
+
|
|
202
|
+
saved = {}
|
|
203
|
+
monkeypatch.setattr(config, "set_value", lambda sec, key, val: saved.update({(sec, key): val}))
|
|
204
|
+
monkeypatch.setattr(learn_cli, "_cfg", lambda: types.SimpleNamespace(
|
|
205
|
+
model=config.ModelConfig(name=catalog.PARAKEET),
|
|
206
|
+
learn=config.LearnConfig(on_promote=""),
|
|
207
|
+
))
|
|
208
|
+
learn_cli.cmd_promote(argparse.Namespace(run=run.name, force=True))
|
|
209
|
+
assert saved[("model", "name")] == spec
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def test_remote_recipe_mentions_parakeet_module_and_eval(tmp_path):
|
|
213
|
+
recipe = parakeet.remote_recipe(tmp_path / "exp", tmp_path / "run", "parakeet-tdt-0.6b-v2")
|
|
214
|
+
assert "python -m voiceio.learn.parakeet" in recipe
|
|
215
|
+
assert "sherpa:" in recipe
|
|
216
|
+
assert "voiceio learn promote" in recipe
|
|
@@ -433,7 +433,7 @@ def test_learn_says_fine_tunes_are_unused_while_parakeet_decodes(monkeypatch):
|
|
|
433
433
|
from voiceio.cli import learn
|
|
434
434
|
monkeypatch.setattr(learn, "_cfg", lambda: types.SimpleNamespace(
|
|
435
435
|
model=ModelConfig(name=catalog.PARAKEET)))
|
|
436
|
-
assert "
|
|
436
|
+
assert "parakeet-tdt-0.6b-v2" in learn._whisper_unused()
|
|
437
437
|
monkeypatch.setattr(learn, "_cfg", lambda: types.SimpleNamespace(
|
|
438
438
|
model=ModelConfig(name="small")))
|
|
439
439
|
assert learn._whisper_unused() == ""
|
|
@@ -463,7 +463,9 @@ def test_doctor_reports_the_decoder(monkeypatch):
|
|
|
463
463
|
assert "NO vocabulary biasing" in _decoder_status(cfg)["Decoder"]
|
|
464
464
|
monkeypatch.setattr(sherpa, "features", lambda: FIXED)
|
|
465
465
|
assert "pre-tokenized" in _decoder_status(cfg)["Decoder"]
|
|
466
|
-
assert
|
|
466
|
+
assert _learning_status(cfg)["Voice model"] == f"stock ({catalog.PARAKEET})"
|
|
467
|
+
cfg.data.retain_audio = True
|
|
468
|
+
assert "parakeet-tdt-0.6b-v2 --remote" in _learning_status(cfg)["Voice model"]
|
|
467
469
|
cfg.model.name = "small"
|
|
468
470
|
assert catalog.PARAKEET in _decoder_status(cfg)["Decoder"]
|
|
469
471
|
cfg.model.language = "es"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""Tests for `voiceio upgrade` install-method detection and CLI."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
|
|
6
|
+
from voiceio.cli import upgrade
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def test_detect_install_identifies_pipx_uv_deb_aur_nix_source_and_pip(tmp_path):
|
|
10
|
+
empty_pacman = tmp_path / "no-pacman"
|
|
11
|
+
m = upgrade.detect_install(prefix="/nix/store/abc123-python-voiceio")
|
|
12
|
+
assert m.kind == "nix" and m.command is None and "nix flake update" in m.instructions
|
|
13
|
+
|
|
14
|
+
m = upgrade.detect_install(prefix="/home/u/.local/share/pipx/venvs/python-voiceio")
|
|
15
|
+
assert m.kind == "pipx" and m.command == ("pipx", "upgrade", "python-voiceio")
|
|
16
|
+
|
|
17
|
+
m = upgrade.detect_install(prefix="/home/u/.local/share/uv/tools/python-voiceio")
|
|
18
|
+
assert m.kind == "uv-tool" and m.command == ("uv", "tool", "upgrade", "python-voiceio")
|
|
19
|
+
|
|
20
|
+
m = upgrade.detect_install(prefix="/opt/voiceio/venv", pacman_root=empty_pacman)
|
|
21
|
+
assert m.kind == "deb" and m.command is None and "sudo apt install ./voiceio_*.deb" in m.instructions
|
|
22
|
+
|
|
23
|
+
pacman = tmp_path / "pacman"
|
|
24
|
+
(pacman / "voiceio-1.18.20-1").mkdir(parents=True)
|
|
25
|
+
m = upgrade.detect_install(prefix="/usr/lib/voiceio/venv", pacman_root=pacman)
|
|
26
|
+
assert m.kind == "aur" and m.command is None and "AUR" in m.instructions
|
|
27
|
+
|
|
28
|
+
repo = tmp_path / "voiceio"
|
|
29
|
+
(repo / ".git").mkdir(parents=True)
|
|
30
|
+
(repo / "pyproject.toml").write_text('[project]\nname = "python-voiceio"\n')
|
|
31
|
+
pkg = repo / "voiceio" / "cli" / "upgrade.py"
|
|
32
|
+
pkg.parent.mkdir(parents=True)
|
|
33
|
+
pkg.write_text("")
|
|
34
|
+
m = upgrade.detect_install(prefix=repo / ".venv", pkg_file=pkg)
|
|
35
|
+
assert m.kind == "source" and m.command is None and "git -C" in m.instructions
|
|
36
|
+
|
|
37
|
+
# An unrelated project's venv must NOT be misdetected as a voiceio source checkout.
|
|
38
|
+
other = tmp_path / "other-project"
|
|
39
|
+
(other / ".git").mkdir(parents=True)
|
|
40
|
+
(other / "pyproject.toml").write_text('[project]\nname = "my-other-app"\n')
|
|
41
|
+
other_pkg = other / ".venv" / "lib" / "python3.12" / "site-packages" / "voiceio" / "cli" / "upgrade.py"
|
|
42
|
+
other_pkg.parent.mkdir(parents=True)
|
|
43
|
+
other_pkg.write_text("")
|
|
44
|
+
m = upgrade.detect_install(prefix=other / ".venv", pkg_file=other_pkg)
|
|
45
|
+
assert m.kind == "pip" and m.command is not None and "pip" in m.command
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def test_cmd_upgrade_prints_instructions_without_running(monkeypatch, capsys):
|
|
49
|
+
monkeypatch.setattr("voiceio.install_env.running_ephemeral", lambda: False)
|
|
50
|
+
monkeypatch.setattr(upgrade, "detect_install", lambda: upgrade.InstallMethod(
|
|
51
|
+
"pipx", ("pipx", "upgrade", "python-voiceio"), "pipx upgrade python-voiceio"))
|
|
52
|
+
upgrade.cmd_upgrade(argparse.Namespace(run=False))
|
|
53
|
+
out = capsys.readouterr().out
|
|
54
|
+
assert "pipx upgrade python-voiceio" in out
|
|
55
|
+
assert "voiceio upgrade --run" in out
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.18.21"
|
|
@@ -15,7 +15,7 @@ def main() -> None:
|
|
|
15
15
|
from voiceio import __version__
|
|
16
16
|
from voiceio.cli import (
|
|
17
17
|
configcmd, corrections, doctor, history, learn, models, replies, servicecmd, uninstall,
|
|
18
|
-
vocab,
|
|
18
|
+
upgrade, vocab,
|
|
19
19
|
)
|
|
20
20
|
|
|
21
21
|
parser = argparse.ArgumentParser(
|
|
@@ -78,6 +78,7 @@ def main() -> None:
|
|
|
78
78
|
learn.register(sub)
|
|
79
79
|
history.register(sub)
|
|
80
80
|
configcmd.register(sub)
|
|
81
|
+
upgrade.register(sub)
|
|
81
82
|
|
|
82
83
|
sub.add_parser("demo", help="Guided tour of the features").set_defaults(
|
|
83
84
|
func=lambda a: __import__("voiceio.demo", fromlist=["run_demo"]).run_demo())
|