refactor(web-test): add resolveEdgeTts() with fallback chain

Mirrors resolveFfmpeg() pattern: tries global/project-level import
first, then tools/tts/node_modules/, then throws error with install
instructions. Caches resolved module for subsequent calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-03-03 00:03:16 +03:00
co-authored by Claude Opus 4.6
parent e9b53505ac
commit 7f6ea32533
2 changed files with 32 additions and 5 deletions
+1 -1
View File
@@ -191,7 +191,7 @@ Add voiceover to recorded videos. Captions shown via `showCaption()` are automat
### Prerequisites
- **ffmpeg** — same as for video recording (ffprobe must be next to ffmpeg)
- **node-edge-tts** — `npm install node-edge-tts` (for Edge TTS provider, free, no API key)
- **node-edge-tts** — `npm install --prefix tools/tts node-edge-tts` (for Edge TTS provider, free, no API key). Also works if installed globally or at project level — the resolver tries multiple locations automatically
### Configuration in `.v8-project.json`