python-voiceio 1.18.9__tar.gz → 1.18.11__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.9/python_voiceio.egg-info → python_voiceio-1.18.11}/PKG-INFO +1 -1
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/pyproject.toml +1 -1
- {python_voiceio-1.18.9 → python_voiceio-1.18.11/python_voiceio.egg-info}/PKG-INFO +1 -1
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/python_voiceio.egg-info/SOURCES.txt +1 -0
- python_voiceio-1.18.11/tests/test_mic_test.py +150 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_telemetry.py +110 -3
- python_voiceio-1.18.11/voiceio/__init__.py +1 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/setup/speech.py +51 -12
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/telemetry.py +9 -7
- python_voiceio-1.18.9/voiceio/__init__.py +0 -1
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/LICENSE +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/README.md +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/python_voiceio.egg-info/dependency_links.txt +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/python_voiceio.egg-info/entry_points.txt +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/python_voiceio.egg-info/requires.txt +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/python_voiceio.egg-info/top_level.txt +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/setup.cfg +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_announce.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_app_wiring.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_audio_quality.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_audio_source.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_backend_probes.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_cancel.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_cli.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_clipboard_read.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_clipboard_typer.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_commands.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_concurrency_lockdown.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_config.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_context_terms.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_corrections.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_cuda_setup_hint.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_dead_mic.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_decoders.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_engine.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_errorlog.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_evdev_uaccess.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_evdev_x11_optional.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_fallback.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_fcitx_bridge.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_feedback_stream.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_focus.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_gpu_fallback.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_health.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_hints.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_history.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_hotkey_modes.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_ibus_engine_limits.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_ibus_engine_listener.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_ibus_pending.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_ibus_pids.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_ibus_ping.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_ibus_session.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_ibus_textlimit.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_ibus_typer.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_idle_audio.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_install_env.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_learn_clean.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_learn_import.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_learn_language.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_learn_metrics.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_learn_pipeline.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_learn_quiet.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_learn_resume.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_learn_review.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_learn_summary.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_learn_targets.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_llm.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_llm_api.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_mic_gain.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_modifier_guard.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_numbers.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_paste_last.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_pipeline.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_platform.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_postcorrect.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_postprocess.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_prebuffer.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_presence.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_prompt.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_quiet_audio.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_recorder_integration.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_replies.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_report.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_retention.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_robustness.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_security_hardening.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_server.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_service.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_setup.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_sherpa.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_spool.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_streaming.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_suggest.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_tokens.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_transcriber.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_tray.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_tts.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_typer_manager.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_vad.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_vocabulary.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_wordfreq.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/tests/test_worker_decode.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/__main__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/announce.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/app.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/audio_source.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/backends.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/cli/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/cli/configcmd.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/cli/corrections.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/cli/doctor.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/cli/history.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/cli/learn.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/cli/models.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/cli/replies.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/cli/servicecmd.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/cli/uninstall.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/cli/vocab.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/clipboard_read.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/commands.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/config.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/consent.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/context_terms.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/bias.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/decoders/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/decoders/base.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/decoders/catalog.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/decoders/faster_whisper/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/decoders/faster_whisper/worker.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/decoders/fetch.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/decoders/lanes.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/decoders/sherpa.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/decoders/whispercpp.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/engine.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/core/pipeline.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/corrections.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/data/60-voiceio-uaccess.rules +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/data/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/demo.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/display.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/errorlog.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/feedback.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/focus.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/health.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/hints.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/history.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/hotkeys/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/hotkeys/base.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/hotkeys/chain.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/hotkeys/evdev.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/hotkeys/pynput_backend.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/hotkeys/socket_backend.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/ibus/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/ibus/engine.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/ibus/install.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/ibus/pending.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/ibus/session.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/ibus/textlimit.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/idle_audio.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/install_env.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/augment.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/clean.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/evaluate.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/importer.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/lastrun.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/metrics.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/quiet.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/review.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/store.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/summary.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/teacher.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/learn/train.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/llm.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/llm_api.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/mic_gain.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/models/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/models/silero_vad.onnx +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/numbers.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/pidlock.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/platform.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/postcorrect.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/postprocess.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/power.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/presence.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/privacy.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/prompt.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/quiet_audio.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/recorder.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/replies.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/report.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/retention.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/server/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/server/__main__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/server/app.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/server/config.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/server/runtime.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/service.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/setup/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/setup/configfile.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/setup/extras.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/setup/hotkey.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/setup/noninteractive.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/setup/steps.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/setup/system.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/setup/ui.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/sounds/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/sounds/alert.wav +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/sounds/commit.wav +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/sounds/start.wav +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/sounds/stop.wav +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/spool.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/streaming.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/suggest.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tokens.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tray/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tray/_icons.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tray/_indicator.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tray/_pystray.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tts/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tts/base.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tts/chain.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tts/edge_engine.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tts/espeak.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tts/piper_engine.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tts/player.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/tts/supertonic_engine.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/__init__.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/base.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/chain.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/clipboard.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/collecting.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/fcitx_bridge.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/ibus.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/manager.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/modifier_guard.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/paste.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/pynput_type.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/wtype.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/xdotool.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/typers/ydotool.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/ui.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/vad.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/vocab_stats.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/vocabulary.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/watchdog.py +0 -0
- {python_voiceio-1.18.9 → python_voiceio-1.18.11}/voiceio/wordfreq.py +0 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"""The setup/doctor mic test (`_streaming_test`): when it stops listening.
|
|
2
|
+
|
|
3
|
+
Runs the real loop on a fake clock and a fake sounddevice stream, so a
|
|
4
|
+
"delayed audio path" (IP-KVM, remote desktop) is seconds of silence first.
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import types
|
|
9
|
+
|
|
10
|
+
import numpy as np
|
|
11
|
+
import pytest
|
|
12
|
+
|
|
13
|
+
from voiceio.setup import speech
|
|
14
|
+
|
|
15
|
+
SR = 16000
|
|
16
|
+
CHUNK = 0.5
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class _Clock:
|
|
20
|
+
"""time.time/sleep for the speech module; sleeping feeds the stream."""
|
|
21
|
+
|
|
22
|
+
def __init__(self):
|
|
23
|
+
self.now = 0.0
|
|
24
|
+
self.stream = None
|
|
25
|
+
|
|
26
|
+
def time(self):
|
|
27
|
+
return self.now
|
|
28
|
+
|
|
29
|
+
def sleep(self, secs):
|
|
30
|
+
self.now += secs
|
|
31
|
+
if self.stream is not None:
|
|
32
|
+
self.stream.feed(self.now)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _fake_sd(clock: _Clock, level, deliver: bool = True):
|
|
36
|
+
"""A sounddevice whose InputStream delivers 0.5 s chunks in clock time;
|
|
37
|
+
`level(t)` is the speech amplitude of the audio recorded at t."""
|
|
38
|
+
|
|
39
|
+
class InputStream:
|
|
40
|
+
def __init__(self, samplerate, channels, dtype, blocksize, callback):
|
|
41
|
+
self.cb = callback
|
|
42
|
+
self.sent = 0
|
|
43
|
+
clock.stream = self
|
|
44
|
+
|
|
45
|
+
def start(self):
|
|
46
|
+
pass
|
|
47
|
+
|
|
48
|
+
def feed(self, now):
|
|
49
|
+
while deliver and (self.sent + 1) * CHUNK <= now:
|
|
50
|
+
t0 = self.sent * CHUNK
|
|
51
|
+
n = int(SR * CHUNK)
|
|
52
|
+
t = t0 + np.arange(n) / SR
|
|
53
|
+
amp = level(t0)
|
|
54
|
+
data = (amp * np.sin(2 * np.pi * 220 * t)).astype(np.float32)
|
|
55
|
+
self.cb(data.reshape(-1, 1), n, None, None)
|
|
56
|
+
self.sent += 1
|
|
57
|
+
|
|
58
|
+
def stop(self):
|
|
59
|
+
pass
|
|
60
|
+
|
|
61
|
+
def close(self):
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
return types.SimpleNamespace(InputStream=InputStream)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class _Model:
|
|
68
|
+
"""Recognizes "hello world" in any audio that holds a tone."""
|
|
69
|
+
|
|
70
|
+
def __init__(self):
|
|
71
|
+
self.calls = 0
|
|
72
|
+
|
|
73
|
+
def transcribe(self, audio, **_):
|
|
74
|
+
self.calls += 1
|
|
75
|
+
if np.max(np.abs(audio), initial=0.0) > 1e-3:
|
|
76
|
+
return [types.SimpleNamespace(text="hello world")], None
|
|
77
|
+
return [], None
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
@pytest.fixture
|
|
81
|
+
def run(monkeypatch):
|
|
82
|
+
def _run(level, deliver=True):
|
|
83
|
+
clock = _Clock()
|
|
84
|
+
monkeypatch.setattr(speech, "time", clock)
|
|
85
|
+
monkeypatch.setitem(__import__("sys").modules, "sounddevice",
|
|
86
|
+
_fake_sd(clock, level, deliver))
|
|
87
|
+
text = speech._streaming_test(model=_Model(), language="en")
|
|
88
|
+
return text, clock.now
|
|
89
|
+
return _run
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def _speech(start, length, amp=0.1):
|
|
93
|
+
return lambda t: amp if start <= t < start + length else 0.0
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def test_delayed_speech_is_waited_for(run, capsys):
|
|
97
|
+
# The KVM case: 6 s of silence, then 3 s of speech.
|
|
98
|
+
text, ended = run(_speech(6.0, 3.0))
|
|
99
|
+
assert "hello world" in text.lower()
|
|
100
|
+
assert ended >= 9.0 + speech._STOP_SILENCE_SECS - 1.0
|
|
101
|
+
assert ended < 9.0 + speech._STOP_SILENCE_SECS + 2.0
|
|
102
|
+
assert "No speech" not in capsys.readouterr().out
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def test_prompt_speech_stops_soon_after_it_ends(run):
|
|
106
|
+
# The normal case is no slower: speech at once, stop ~1.5 s after.
|
|
107
|
+
text, ended = run(_speech(0.0, 2.0))
|
|
108
|
+
assert text
|
|
109
|
+
assert ended < 2.0 + speech._STOP_SILENCE_SECS + 1.5
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def test_silence_waits_then_says_nothing_arrived(run, capsys):
|
|
113
|
+
text, ended = run(lambda t: 0.0)
|
|
114
|
+
assert text == ""
|
|
115
|
+
assert speech._WAIT_FOR_SPEECH_SECS <= ended < speech._WAIT_FOR_SPEECH_SECS + 1.0
|
|
116
|
+
out = capsys.readouterr().out
|
|
117
|
+
assert f"No speech arrived within {speech._WAIT_FOR_SPEECH_SECS}s" in out
|
|
118
|
+
assert "IP-KVM" in out and "keep talking" in out
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def test_quiet_mic_recognized_words_count_as_speech(run):
|
|
122
|
+
# Below the RMS threshold for its whole length, yet decodable: the words
|
|
123
|
+
# alone keep the test going and end it once they stop changing.
|
|
124
|
+
text, ended = run(_speech(5.0, 3.0, amp=0.005))
|
|
125
|
+
assert text
|
|
126
|
+
assert ended < speech._WAIT_FOR_SPEECH_SECS + speech._MAX_SPEECH_SECS
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def test_long_speech_is_capped(run):
|
|
130
|
+
text, ended = run(_speech(1.0, 60.0))
|
|
131
|
+
assert text
|
|
132
|
+
assert ended < 1.0 + speech._MAX_SPEECH_SECS + 1.5
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def test_stream_with_no_audio_says_so(run, capsys):
|
|
136
|
+
text, _ = run(lambda t: 0.0, deliver=False)
|
|
137
|
+
assert text == ""
|
|
138
|
+
assert "delivered no audio" in capsys.readouterr().out
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
@pytest.mark.parametrize("elapsed,heard_at,silent,stop", [
|
|
142
|
+
(1.6, None, 1.6, False), # initial silence alone never stops it
|
|
143
|
+
(11.9, None, 11.9, False),
|
|
144
|
+
(12.0, None, 12.0, True),
|
|
145
|
+
(7.0, 6.0, 1.0, False),
|
|
146
|
+
(8.0, 6.0, 1.5, True),
|
|
147
|
+
(16.0, 6.0, 0.0, True), # speech cap
|
|
148
|
+
])
|
|
149
|
+
def test_should_stop(elapsed, heard_at, silent, stop):
|
|
150
|
+
assert speech._test_should_stop(elapsed, heard_at, silent) is stop
|
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
import argparse
|
|
5
5
|
import contextlib
|
|
6
6
|
import json
|
|
7
|
+
import re
|
|
7
8
|
import threading
|
|
8
9
|
|
|
9
10
|
import pytest
|
|
@@ -12,6 +13,7 @@ from voiceio import config, report, telemetry
|
|
|
12
13
|
from voiceio.platform import Platform
|
|
13
14
|
|
|
14
15
|
SHIPPED_LIVE = telemetry.ENDPOINT_LIVE # before any fixture patches it
|
|
16
|
+
REAL_URLOPEN = report._urlopen # before conftest's network block replaces it
|
|
15
17
|
DAY = 86400.0
|
|
16
18
|
T0 = 1_800_000_000.0
|
|
17
19
|
|
|
@@ -204,9 +206,114 @@ def test_config_set_turns_it_off(capsys):
|
|
|
204
206
|
assert telemetry.setting() is True
|
|
205
207
|
|
|
206
208
|
|
|
207
|
-
def
|
|
208
|
-
"""
|
|
209
|
-
|
|
209
|
+
def test_shipped_with_the_endpoint_live():
|
|
210
|
+
"""workers/ping is deployed at ping.voiceio.dev (2026-11): the count is
|
|
211
|
+
asked for and, once a user says yes, sent."""
|
|
212
|
+
assert SHIPPED_LIVE is True
|
|
213
|
+
assert telemetry.PING_URL == "https://ping.voiceio.dev/ping"
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def _worker_source() -> str:
|
|
217
|
+
from pathlib import Path
|
|
218
|
+
return (Path(__file__).resolve().parents[1] / "workers" / "ping" / "src" / "index.js").read_text()
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def _worker_rules() -> tuple[list[str], re.Pattern, int]:
|
|
222
|
+
src = _worker_source()
|
|
223
|
+
fields = json.loads(re.search(r"export const FIELDS = (\[.*?\]);", src).group(1))
|
|
224
|
+
value = re.search(r"export const VALUE = /(.*)/;", src).group(1)
|
|
225
|
+
max_body = int(re.search(r"export const MAX_BODY = (\d+);", src).group(1))
|
|
226
|
+
return fields, re.compile(value), max_body
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
def _passes_worker(body: bytes) -> bool:
|
|
230
|
+
fields, value, max_body = _worker_rules()
|
|
231
|
+
if len(body) > max_body:
|
|
232
|
+
return False
|
|
233
|
+
obj = json.loads(body.decode("utf-8"))
|
|
234
|
+
return (sorted(obj) == sorted(fields)
|
|
235
|
+
and all(isinstance(obj[k], str) and value.fullmatch(obj[k]) for k in fields))
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
def test_client_fields_match_the_worker():
|
|
239
|
+
fields, _, _ = _worker_rules()
|
|
240
|
+
assert list(telemetry.FIELDS) == fields
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
@pytest.mark.parametrize("desktop,session,distro", [
|
|
244
|
+
("gnome", "wayland", {"ID": "ubuntu", "VERSION_ID": "26.04"}),
|
|
245
|
+
("", "", {}),
|
|
246
|
+
("_KDE", "+x11", {"ID": ".hidden", "VERSION_ID": ""}),
|
|
247
|
+
("x-" + "Ä" * 100, "wayland", {"ID": "-" * 60 + "arch", "VERSION_ID": "z" * 60}),
|
|
248
|
+
("ubuntu:GNOME", "tty", {"ID": "fedora", "VERSION_ID": "41"}),
|
|
249
|
+
])
|
|
250
|
+
def test_what_is_sent_passes_the_workers_validation(monkeypatch, sent, desktop, session, distro):
|
|
251
|
+
"""The exact bytes maybe_send posts satisfy workers/ping's parsePing: the
|
|
252
|
+
same five keys, each a value matching VALUE, under MAX_BODY."""
|
|
253
|
+
from voiceio import platform as plat
|
|
254
|
+
monkeypatch.setattr(plat, "detect", lambda: Platform(
|
|
255
|
+
os="linux", display_server=session, desktop=desktop))
|
|
256
|
+
monkeypatch.setattr(telemetry._py_platform, "freedesktop_os_release", lambda: distro)
|
|
257
|
+
bodies: list[bytes] = []
|
|
258
|
+
monkeypatch.setattr(report, "_urlopen", lambda url, *, timeout, json_body=None: (
|
|
259
|
+
bodies.append(json_body),
|
|
260
|
+
contextlib.nullcontext(type("R", (), {"read": lambda self: b""})()))[1])
|
|
261
|
+
_turn(True)
|
|
262
|
+
for name in ("small", "parakeet-tdt-0.6b-v2", "whispercpp:http://h:1", "sherpa:/x"):
|
|
263
|
+
(config.LOG_DIR / "ping.json").unlink(missing_ok=True)
|
|
264
|
+
assert telemetry.maybe_send(name, now=T0)
|
|
265
|
+
assert len(bodies) == 4
|
|
266
|
+
for body in bodies:
|
|
267
|
+
assert _passes_worker(body), body
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def test_posted_as_json(monkeypatch):
|
|
271
|
+
"""The request itself: a POST to PING_URL with a JSON content type."""
|
|
272
|
+
seen = []
|
|
273
|
+
|
|
274
|
+
class Resp:
|
|
275
|
+
def read(self):
|
|
276
|
+
return b""
|
|
277
|
+
|
|
278
|
+
def __enter__(self):
|
|
279
|
+
return self
|
|
280
|
+
|
|
281
|
+
def __exit__(self, *a):
|
|
282
|
+
return False
|
|
283
|
+
|
|
284
|
+
monkeypatch.setattr(report, "_urlopen", REAL_URLOPEN)
|
|
285
|
+
monkeypatch.setattr(report.urllib.request, "urlopen",
|
|
286
|
+
lambda req, timeout: seen.append((req, timeout)) or Resp())
|
|
287
|
+
_turn(True)
|
|
288
|
+
assert telemetry.maybe_send("small", now=T0)
|
|
289
|
+
(req, timeout), = seen
|
|
290
|
+
assert req.full_url == telemetry.PING_URL
|
|
291
|
+
assert req.get_method() == "POST"
|
|
292
|
+
assert req.get_header("Content-type") == "application/json"
|
|
293
|
+
assert timeout == telemetry.TIMEOUT_SECS
|
|
294
|
+
assert _passes_worker(req.data)
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def test_a_rejected_ping_is_silent_and_not_recorded(monkeypatch):
|
|
298
|
+
import urllib.error
|
|
299
|
+
|
|
300
|
+
def reject(*a, **k):
|
|
301
|
+
raise urllib.error.HTTPError(telemetry.PING_URL, 400, "Bad Request", {}, None)
|
|
302
|
+
|
|
303
|
+
monkeypatch.setattr(report, "_urlopen", reject)
|
|
304
|
+
_turn(True)
|
|
305
|
+
assert not telemetry.maybe_send("small", now=T0)
|
|
306
|
+
assert not (config.LOG_DIR / "ping.json").exists()
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
def test_setup_ready_panel_names_the_count_only_when_on(monkeypatch, capsys):
|
|
310
|
+
from voiceio.setup import steps
|
|
311
|
+
monkeypatch.setattr(steps.shutil, "which", lambda _: "/usr/bin/voiceio")
|
|
312
|
+
steps._print_ready_panel("ctrl+alt+v", autostart=True)
|
|
313
|
+
assert "Zero telemetry." in capsys.readouterr().out
|
|
314
|
+
_turn(True)
|
|
315
|
+
steps._print_ready_panel("ctrl+alt+v", autostart=True)
|
|
316
|
+
assert "anonymous weekly count you allowed" in capsys.readouterr().out
|
|
210
317
|
|
|
211
318
|
|
|
212
319
|
def test_before_the_endpoint_is_live_nothing_is_asked_or_sent(monkeypatch):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.18.11"
|
|
@@ -116,6 +116,24 @@ def _download_model(model_name: str) -> bool:
|
|
|
116
116
|
return False
|
|
117
117
|
|
|
118
118
|
|
|
119
|
+
# The mic test's timing. Silence ends the test only once something has been
|
|
120
|
+
# heard: an audio path with seconds of latency (remote desktop, IP-KVM,
|
|
121
|
+
# Bluetooth) delivers nothing but silence at first, and stopping then said
|
|
122
|
+
# "no speech" before the user's voice had even arrived.
|
|
123
|
+
_STOP_SILENCE_SECS = 1.5 # after speech: this much quiet ends the test
|
|
124
|
+
_WAIT_FOR_SPEECH_SECS = 12 # before speech: give up after this long
|
|
125
|
+
_MAX_SPEECH_SECS = 10 # after speech starts: record at most this long
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def _test_should_stop(elapsed: float, heard_at: float | None, silent_secs: float) -> bool:
|
|
129
|
+
"""Whether the mic test is done, `elapsed` seconds in. `heard_at` is when
|
|
130
|
+
speech was first heard (None: not yet); `silent_secs` is the quiet since."""
|
|
131
|
+
if heard_at is None:
|
|
132
|
+
return elapsed >= _WAIT_FOR_SPEECH_SECS
|
|
133
|
+
return (silent_secs >= _STOP_SILENCE_SECS
|
|
134
|
+
or elapsed - heard_at >= _MAX_SPEECH_SECS)
|
|
135
|
+
|
|
136
|
+
|
|
119
137
|
def _streaming_test(model=None, language: str | None = None) -> str:
|
|
120
138
|
"""Record audio and stream transcription results in real-time. Returns transcribed text."""
|
|
121
139
|
import numpy as np
|
|
@@ -127,7 +145,6 @@ def _streaming_test(model=None, language: str | None = None) -> str:
|
|
|
127
145
|
chunk_secs = 0.5
|
|
128
146
|
chunk_size = int(sample_rate * chunk_secs)
|
|
129
147
|
silence_threshold = 0.01
|
|
130
|
-
max_duration = 10
|
|
131
148
|
|
|
132
149
|
if model is None:
|
|
133
150
|
with Spinner("Loading model...") as sp:
|
|
@@ -142,27 +159,31 @@ def _streaming_test(model=None, language: str | None = None) -> str:
|
|
|
142
159
|
lang = language if language != "auto" else None
|
|
143
160
|
lang_str = lang or "en"
|
|
144
161
|
|
|
145
|
-
print(f"\n {YELLOW}Speak now!{RESET} (
|
|
162
|
+
print(f"\n {YELLOW}Speak now!{RESET} (stops {_STOP_SILENCE_SECS:g}s after you finish, "
|
|
163
|
+
f"waits up to {_WAIT_FOR_SPEECH_SECS}s for your voice)")
|
|
146
164
|
print(f" {DIM}{'─' * 40}{RESET}")
|
|
147
165
|
sys.stdout.write(f" {BOLD}")
|
|
148
166
|
sys.stdout.flush()
|
|
149
167
|
|
|
150
168
|
audio_chunks: list[np.ndarray] = []
|
|
151
|
-
silent_time = 0.0
|
|
169
|
+
silent_time = 0.0 # seconds of audio below the threshold, in a row
|
|
170
|
+
heard_sound = False # a chunk above the threshold arrived
|
|
171
|
+
heard_at: float | None = None
|
|
152
172
|
last_text = ""
|
|
153
173
|
last_text_len = 0 # characters printed on screen
|
|
154
174
|
recording = True
|
|
155
175
|
|
|
156
176
|
def callback(indata, frames, time_info, status):
|
|
157
|
-
nonlocal silent_time,
|
|
177
|
+
nonlocal silent_time, heard_sound
|
|
158
178
|
if not recording:
|
|
159
179
|
return
|
|
160
180
|
audio_chunks.append(indata.copy())
|
|
161
181
|
rms = np.sqrt(np.mean(indata ** 2))
|
|
162
182
|
if rms < silence_threshold:
|
|
163
|
-
silent_time +=
|
|
183
|
+
silent_time += frames / sample_rate
|
|
164
184
|
else:
|
|
165
185
|
silent_time = 0.0
|
|
186
|
+
heard_sound = True
|
|
166
187
|
|
|
167
188
|
stream = sd.InputStream(
|
|
168
189
|
samplerate=sample_rate, channels=1, dtype="float32",
|
|
@@ -170,18 +191,16 @@ def _streaming_test(model=None, language: str | None = None) -> str:
|
|
|
170
191
|
)
|
|
171
192
|
stream.start()
|
|
172
193
|
start_time = time.time()
|
|
194
|
+
elapsed = 0.0
|
|
173
195
|
|
|
174
196
|
try:
|
|
175
197
|
while recording:
|
|
176
198
|
time.sleep(0.8)
|
|
177
199
|
elapsed = time.time() - start_time
|
|
178
200
|
|
|
179
|
-
if
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
# Stop on sustained silence (but only after we've heard something)
|
|
184
|
-
if silent_time >= 1.5 and len(audio_chunks) > 3:
|
|
201
|
+
if heard_at is None and heard_sound:
|
|
202
|
+
heard_at = elapsed
|
|
203
|
+
if _test_should_stop(elapsed, heard_at, silent_time):
|
|
185
204
|
recording = False
|
|
186
205
|
break
|
|
187
206
|
|
|
@@ -199,6 +218,13 @@ def _streaming_test(model=None, language: str | None = None) -> str:
|
|
|
199
218
|
text = cleanup(text, lang_str)
|
|
200
219
|
|
|
201
220
|
if text and text != last_text:
|
|
221
|
+
# New words are speech too, even from a mic too quiet to
|
|
222
|
+
# cross the threshold: for that mic they are the only sign
|
|
223
|
+
# of speech, so they also hold off the silence stop.
|
|
224
|
+
if heard_at is None:
|
|
225
|
+
heard_at = time.time() - start_time
|
|
226
|
+
if not heard_sound:
|
|
227
|
+
silent_time = 0.0
|
|
202
228
|
# Clear previous text and rewrite
|
|
203
229
|
if last_text_len > 0:
|
|
204
230
|
sys.stdout.write("\b" * last_text_len + " " * last_text_len + "\b" * last_text_len)
|
|
@@ -209,6 +235,7 @@ def _streaming_test(model=None, language: str | None = None) -> str:
|
|
|
209
235
|
except KeyboardInterrupt:
|
|
210
236
|
pass
|
|
211
237
|
finally:
|
|
238
|
+
recording = False
|
|
212
239
|
stream.stop()
|
|
213
240
|
stream.close()
|
|
214
241
|
|
|
@@ -231,11 +258,23 @@ def _streaming_test(model=None, language: str | None = None) -> str:
|
|
|
231
258
|
if last_text:
|
|
232
259
|
print(f" {GREEN}✓{RESET} Transcribed successfully!")
|
|
233
260
|
else:
|
|
234
|
-
print(f" {YELLOW}⚠{RESET}
|
|
261
|
+
print(f" {YELLOW}⚠{RESET} {_no_speech_message(elapsed, bool(audio_chunks), heard_sound)}")
|
|
235
262
|
|
|
236
263
|
return last_text
|
|
237
264
|
|
|
238
265
|
|
|
266
|
+
def _no_speech_message(elapsed: float, got_audio: bool, heard_sound: bool) -> str:
|
|
267
|
+
if not got_audio:
|
|
268
|
+
return (f"The microphone delivered no audio in {elapsed:.0f}s. "
|
|
269
|
+
"Check the input device in your sound settings.")
|
|
270
|
+
if heard_sound:
|
|
271
|
+
return ("Heard sound, but no words were recognized. "
|
|
272
|
+
"Speak closer to the microphone or raise its input level.")
|
|
273
|
+
return (f"No speech arrived within {elapsed:.0f}s. Check your microphone. "
|
|
274
|
+
"If your audio goes through a remote desktop, IP-KVM or Bluetooth "
|
|
275
|
+
"link with a delay, keep talking until your words appear.")
|
|
276
|
+
|
|
277
|
+
|
|
239
278
|
def run_test() -> None:
|
|
240
279
|
"""Standalone test command: voiceio-test."""
|
|
241
280
|
print(f"{CYAN}{BOLD}voiceio doctor --live{RESET}\n")
|
|
@@ -20,9 +20,10 @@ from voiceio import config
|
|
|
20
20
|
|
|
21
21
|
log = logging.getLogger(__name__)
|
|
22
22
|
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
|
|
23
|
+
# workers/ping is deployed on its Custom Domain ping.voiceio.dev. Set this back
|
|
24
|
+
# to False to stop asking and sending (a kill switch): then nothing is asked,
|
|
25
|
+
# nothing is sent, and doctor shows no line.
|
|
26
|
+
ENDPOINT_LIVE = True
|
|
26
27
|
PING_URL = "https://ping.voiceio.dev/ping"
|
|
27
28
|
INTERVAL_SECS = 7 * 86400
|
|
28
29
|
CHECK_EVERY_SECS = 86400
|
|
@@ -42,9 +43,10 @@ def _state_path():
|
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
def _clean(value: str) -> str:
|
|
45
|
-
"""Lowercase, only [a-z0-9._+ -],
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
"""Lowercase, only [a-z0-9._+ -], starting with a letter or digit, at most
|
|
47
|
+
MAX_FIELD characters: what the server accepts (workers/ping VALUE), and
|
|
48
|
+
nothing that could carry more than a label."""
|
|
49
|
+
text = " ".join(_UNSAFE.sub("-", str(value).lower()).split()).strip(" -").lstrip("._+ -")
|
|
48
50
|
return text[:MAX_FIELD].strip() or "unknown"
|
|
49
51
|
|
|
50
52
|
|
|
@@ -79,7 +81,7 @@ def setting() -> bool | None:
|
|
|
79
81
|
|
|
80
82
|
def status_line(model_name: str | None = None) -> str:
|
|
81
83
|
"""Doctor's line: whether the count is on, and the exact payload if it
|
|
82
|
-
is; ''
|
|
84
|
+
is; '' when ENDPOINT_LIVE is switched off."""
|
|
83
85
|
if not ENDPOINT_LIVE:
|
|
84
86
|
return ""
|
|
85
87
|
try:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.18.9"
|
|
File without changes
|
|
File without changes
|
{python_voiceio-1.18.9 → python_voiceio-1.18.11}/python_voiceio.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|