Skip to content

fix(tts): call _check_cache_writable before pocket_tts import (#3480)#3482

Merged
mrveiss merged 1 commit intoDev_new_guifrom
fix/issue-3480
Apr 5, 2026
Merged

fix(tts): call _check_cache_writable before pocket_tts import (#3480)#3482
mrveiss merged 1 commit intoDev_new_guifrom
fix/issue-3480

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 5, 2026

Summary

Moves _check_cache_writable(MODELS_DIR) to execute before from pocket_tts import TTSModel in _load_model(). Since pocket_tts or its dependencies may perform HuggingFace Hub cache I/O at import time, checking writability first ensures we get a clear diagnostic error rather than a misleading "accept terms / hf auth login" message.

Also removes the redundant MODELS_DIR.mkdir(parents=True, exist_ok=True) call that followed the check, since _check_cache_writable already calls mkdir internally (added in #3471). VOICES_DIR.mkdir() is unchanged.

Changes

  • Reorder: _check_cache_writable(MODELS_DIR) moved before from pocket_tts import TTSModel
  • Remove: redundant MODELS_DIR.mkdir(parents=True, exist_ok=True) after the check

Related

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

@mrveiss
Copy link
Copy Markdown
Owner Author

mrveiss commented Apr 5, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@mrveiss mrveiss merged commit 4d3a6ba into Dev_new_gui Apr 5, 2026
4 of 5 checks passed
@mrveiss mrveiss deleted the fix/issue-3480 branch April 5, 2026 06:58
@mrveiss mrveiss restored the fix/issue-3480 branch April 5, 2026 07:06
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