Skip to content

feat: revamp setup wizard, fix number conversion, improve TTS reliability#3

Merged
Hugo0 merged 1 commit into
mainfrom
feat/wizard-tts-numbers
Mar 12, 2026
Merged

feat: revamp setup wizard, fix number conversion, improve TTS reliability#3
Hugo0 merged 1 commit into
mainfrom
feat/wizard-tts-numbers

Conversation

@Hugo0
Copy link
Copy Markdown
Owner

@Hugo0 Hugo0 commented Mar 12, 2026

Summary

  • Reorganize setup wizard into coherent 8-step flow: language before model, immediate model download + mic test with satisfaction loop, TTS promoted to its own step with interactive engine demos and audio playback
  • Add arrow-key y/n prompts (_ask_yn) replacing all free-text y/n inputs — no more escape sequence garbage from arrow keys
  • Fix number conversion bug where "one two three" was summed to 6 instead of staying separate
  • Fix edge-tts probe() to detect missing soundfile/pydub decoder before synthesis fails at runtime
  • Fix piper probe() to detect incomplete installs (missing piper.download module)
  • TTS enabled by default in config
  • Bump version to 0.3.2

Test plan

  • uv run ruff check voiceio/ passes
  • uv run pytest tests/ -x -q — 404 passed, 3 skipped
  • Manual voiceio setup walkthrough end-to-end
  • CI passes

Summary by CodeRabbit

Release Notes

  • New Features

    • Language selection added to setup wizard.
    • Enhanced text-to-speech setup with live engine demonstrations.
    • Text-to-speech now enabled by default.
  • Bug Fixes

    • Fixed number word parsing to prevent incorrect combinations.
    • Improved edge-tts fallback handling when audio decoders are available.
    • Enhanced dependency error messages.

…lity

- Reorganize wizard into coherent 8-step flow: language before model,
  immediate download + mic test with satisfaction loop, TTS promoted
  to its own step with interactive engine demos
- Add arrow-key y/n prompts (_ask_yn) replacing all text-input y/n
- Fix "one two three" being summed to 6 — consecutive ones-words now
  break the number span
- Fix edge-tts probe to detect missing soundfile/pydub decoder
- Fix piper probe to detect incomplete installs (missing piper.download)
- TTS enabled by default
- Bump version to 0.3.2
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 12, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The PR updates the version to 0.3.2, changes TTSConfig.enabled default from False to True, refines number word parsing to prevent consecutive ones-words from combining incorrectly, enhances TTS engine probe methods with fallback logic and improved error reporting, and substantially refactors the interactive setup wizard with new helper functions and restructured configuration steps.

Changes

Cohort / File(s) Summary
Version Updates
pyproject.toml, voiceio/__init__.py
Bumped version from 0.3.1 to 0.3.2.
Configuration Defaults
voiceio/config.py
Changed TTSConfig.enabled default from False to True.
Tests
tests/test_tts.py
Updated assertions to reflect new TTSConfig.enabled default (True instead of False).
Number Parsing Logic
voiceio/numbers.py
Introduced last_category state tracking during number-word collection to prevent consecutive ones-words from forming invalid multi-word numbers while preserving valid constructs like "twenty three".
TTS Engine Probes
voiceio/tts/edge_engine.py, voiceio/tts/piper_engine.py
Enhanced probe methods: edge_engine now accepts missing edge-tts if soundfile or pydub is available with improved error hints; piper_engine now imports ensure_voice_exists and get_voices during probe and captures dynamic error messages.
Interactive Setup Wizard
voiceio/wizard.py
Added utility helpers (_ask_yn, _install_pip_package, _satisfaction_loop); refactored _streaming_test to accept optional language parameter and return transcribed text; restructured wizard steps with separate language selection (Step 2), redesigned speech recognition (Step 3) and TTS flows (Step 5) with satisfaction loops and live demos, enhanced autocorrect and advanced options handling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A version hop, defaults now true,
Number words parsed just right for you,
Engines probe deeper, helpers bloom bright,
The wizard's dance—steps reorganized just right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 45.45% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title comprehensively covers the three main objectives: wizard revamp, number conversion fix, and TTS reliability improvements, accurately summarizing the primary changes across multiple files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/wizard-tts-numbers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Hugo0 Hugo0 merged commit c1a1e00 into main Mar 12, 2026
10 checks passed
@Hugo0 Hugo0 deleted the feat/wizard-tts-numbers branch March 12, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant