Skip to content

Commit e4541d6

Browse files
committed
PR_26171_061 text to speech engine audio feature parity
1 parent 0a364f8 commit e4541d6

14 files changed

Lines changed: 3149 additions & 490 deletions
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# PR_26171_061 Engine Audio Ownership Checklist
2+
3+
## Engine Ownership
4+
5+
- PASS: Reusable TTS voice filtering lives in `src/engine/audio/TextToSpeechEngine.js`.
6+
- PASS: Reusable TTS preset shaping lives in `src/engine/audio/TextToSpeechEngine.js`.
7+
- PASS: Reusable TTS queue item helpers live in `src/engine/audio/TextToSpeechEngine.js`.
8+
- PASS: Existing defaults remain in `src/engine/audio/TextToSpeechDefaults.js`.
9+
- PASS: Active toolbox UI consumes the engine module instead of duplicating all engine behavior locally.
10+
11+
## Active Tool Ownership
12+
13+
- PASS: Active tool remains under `toolbox/text-to-speech/`.
14+
- PASS: Active HTML remains Theme V2 only.
15+
- PASS: Active JavaScript remains external.
16+
- PASS: Active tool owns DOM wiring, status display, and control event handling.
17+
- PASS: Active tool does not create database behavior.
18+
19+
## Boundary Checks
20+
21+
- PASS: No `tools/text2speech/` path was created.
22+
- PASS: Archived `old_text2speech-V2` was used as a read-only functionality sample.
23+
- PASS: Archived tool files were not activated in navigation.
24+
- PASS: Browser SpeechSynthesis is the implemented local provider.
25+
- PASS: Planned providers remain documented but do not block browser preview.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# PR_26171_061 Instruction Compliance Checklist
2+
3+
## Pre-Work Gate
4+
5+
- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before file changes.
6+
- PASS: Read `docs_build/dev/PROJECT_MULTI_PC.txt` before file changes.
7+
- PASS: Reported instruction compliance PASS/FAIL before file changes.
8+
- PASS: `git branch --show-current` reported `main` before branch creation.
9+
- PASS: `git checkout main` completed before branch creation.
10+
- PASS: `git pull origin main` completed before branch creation.
11+
- PASS: `git status` reported a clean working tree before branch creation.
12+
- PASS: Created branch `pr/26171-061-text2speech-engine-audio-feature-parity` from clean latest `main`.
13+
14+
## Owner And Parity
15+
16+
- PASS: PR number `061` is odd.
17+
- PASS: Odd parity maps to Laptop / Environment 2.
18+
- PASS: Text To Speech / TTS is owned by Laptop / Environment 2.
19+
- PASS: Implementation path matches active owner path: `toolbox/text-to-speech/`.
20+
- PASS: Shared engine path matches approved reusable audio path: `src/engine/audio/`.
21+
22+
## Hard Stop Checks
23+
24+
- PASS: Instructions were present and readable.
25+
- PASS: Branch workflow could be followed.
26+
- PASS: Repository was clean before branching.
27+
- PASS: No owner mismatch.
28+
- PASS: No parity mismatch.
29+
- PASS: No wrong implementation path.
30+
- PASS: Scoped validation was not skipped.
31+
- PASS: Required reports were created.
32+
- PASS: Required repo ZIP was created.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# PR_26171_061 Manual Validation Notes
2+
3+
## Manual Review
4+
5+
- Confirmed active Text To Speech path is `toolbox/text-to-speech/`.
6+
- Confirmed no `tools/text2speech/` directory was created.
7+
- Confirmed old functionality sample path is `archive/v1-v2/tools/old_text2speech-V2/`.
8+
- Confirmed active HTML has external scripts only.
9+
- Confirmed active HTML has no inline style attributes or inline event handlers.
10+
- Confirmed no database files were changed.
11+
12+
## Automated Browser Coverage Used For Manual Equivalents
13+
14+
- Opened active Text To Speech page through targeted Playwright validation.
15+
- Verified browser voices render.
16+
- Verified restored control groups render.
17+
- Verified preset shaping updates pitch and volume values.
18+
- Verified named sentence Add, Duplicate, and Delete.
19+
- Verified output summary includes queue JSON.
20+
- Verified Speak, Pause, Resume, and Stop call the browser SpeechSynthesis mock.
21+
- Verified unavailable SpeechSynthesis shows actionable error.
22+
23+
## Out Of Scope Manual Checks
24+
25+
- No paid provider was manually exercised.
26+
- No generated audio file export was manually exercised.
27+
- No database behavior was manually exercised.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# PR_26171_061 Old TTS Feature Parity Checklist
2+
3+
Functionality sample: `archive/v1-v2/tools/old_text2speech-V2/`
4+
5+
## Controls And Options
6+
7+
- PASS: Gender helper filter restored.
8+
- PASS: Language filter restored.
9+
- PASS: Voice dropdown restored.
10+
- PASS: Voice details restored.
11+
- PASS: Voice Age select restored.
12+
- PASS: Character Preset select restored.
13+
- PASS: SSML-like Preset select restored.
14+
- PASS: Volume slider restored with visible value.
15+
- PASS: Rate / Speed slider restored with visible value.
16+
- PASS: Pitch slider restored with visible value.
17+
- PASS: Name field restored.
18+
- PASS: Text To Speak editor restored.
19+
20+
## Queue And JSON
21+
22+
- PASS: Named Sentences queue restored.
23+
- PASS: Add named sentence restored.
24+
- PASS: Duplicate named sentence restored.
25+
- PASS: Delete named sentence restored.
26+
- PASS: Output Summary JSON restored.
27+
- PASS: Import JSON restored for standalone launch.
28+
- PASS: Copy JSON restored for standalone launch.
29+
- PASS: Export JSON restored for standalone launch.
30+
- PASS: URL JSON source loading restored through `samplePresetPath`.
31+
32+
## Playback And Status
33+
34+
- PASS: Speak restored.
35+
- PASS: Pause restored when browser support exists.
36+
- PASS: Resume restored when browser support exists.
37+
- PASS: Stop restored.
38+
- PASS: Clearable status log restored.
39+
- PASS: Actionable unavailable-browser error restored.
40+
- PASS: No placeholder provider-blocking behavior remains for browser preview.
41+
42+
## Workspace
43+
44+
- PASS: Project Workspace launch detection restored.
45+
- PASS: Standalone JSON actions hide during Project Workspace launch.
46+
- PASS: Return to Project Workspace action restored.
47+
- PASS: Project Workspace toolState loading restored.
48+
- PASS: Project Workspace dirty-state writeback restored.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# PR_26171_061 Text To Speech Engine Audio Feature Parity
2+
3+
## Summary
4+
5+
Restored active Text To Speech feature parity from the archived `old_text2speech-V2` functionality sample while keeping active implementation in `toolbox/text-to-speech/` and reusable engine behavior in `src/engine/audio/`.
6+
7+
## Changed Scope
8+
9+
- Rebuilt reusable Text To Speech voice filtering, preset shaping, and queue-item helpers in `src/engine/audio/TextToSpeechEngine.js`.
10+
- Expanded `toolbox/text-to-speech/index.html` with Theme V2 controls for the old V2 feature set.
11+
- Rebuilt `toolbox/text-to-speech/text2speech.js` so the active tool consumes the engine audio module.
12+
- Expanded targeted browser validation in `tests/playwright/tools/TextToSpeechFunctional.spec.mjs`.
13+
- Updated Playwright V8 coverage artifacts for changed runtime JavaScript.
14+
15+
## Requirement Checklist
16+
17+
- PASS: Used `archive/v1-v2/tools/old_text2speech-V2/` as the required functionality sample.
18+
- PASS: Reusable TTS behavior lives in `src/engine/audio/`.
19+
- PASS: `toolbox/text-to-speech/` consumes `src/engine/audio/TextToSpeechEngine.js`.
20+
- PASS: Restored old controls/options/features in the active tool.
21+
- PASS: Browser SpeechSynthesis provider remains implemented.
22+
- PASS: Planned provider adapters do not block browser preview behavior.
23+
- PASS: No `tools/text2speech/` path was created.
24+
- PASS: No database files were changed.
25+
- PASS: Theme V2 remains the styling source.
26+
- PASS: HTML uses external JavaScript only.
27+
- PASS: No inline script, style, or event handler was added.
28+
29+
## Restored Feature Set
30+
31+
- Import JSON.
32+
- Copy JSON.
33+
- Export JSON.
34+
- Project Workspace return action during workspace launch.
35+
- Gender helper filter.
36+
- Language filter.
37+
- Browser voice selection.
38+
- Voice details.
39+
- Voice age shaping.
40+
- Character presets.
41+
- SSML-like presets.
42+
- Volume, rate, and pitch sliders with visible values.
43+
- Named sentence Name field.
44+
- Add, Duplicate, and Delete named sentence actions.
45+
- Text To Speak editor.
46+
- Speak, Pause, Resume, and Stop playback actions.
47+
- Named Sentences queue.
48+
- Output Summary JSON.
49+
- Clearable Status log.
50+
- URL JSON preset loading through `samplePresetPath`.
51+
- Project Workspace toolState loading and dirty-state writeback.
52+
53+
## Validation Summary
54+
55+
- PASS: `node --check src\engine\audio\TextToSpeechEngine.js`
56+
- PASS: `node --check toolbox\text-to-speech\text2speech.js`
57+
- PASS: `node --test tests\tools\Text2SpeechShell.test.mjs`
58+
- PASS: `npx playwright test tests/playwright/tools/TextToSpeechFunctional.spec.mjs`
59+
- PASS: `npm run test:workspace-v2`
60+
- Note: command name is legacy; user-facing language is Project Workspace.
61+
- PASS: `git diff --check`
62+
- PASS: changed runtime JS coverage collected for `src/engine/audio/TextToSpeechEngine.js`.
63+
- PASS: changed runtime JS coverage collected for `toolbox/text-to-speech/text2speech.js`.
64+
65+
## Out Of Scope
66+
67+
- No database changes.
68+
- No external paid provider implementation.
69+
- No generated audio file export provider.
70+
- No new `tools/text2speech/` path.
71+
- No archived tool activation.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# PR_26171_061 Validation Report
2+
3+
## Commands Run
4+
5+
- `node --check src\engine\audio\TextToSpeechEngine.js`
6+
- PASS.
7+
- `node --check toolbox\text-to-speech\text2speech.js`
8+
- PASS.
9+
- `node --test tests\tools\Text2SpeechShell.test.mjs`
10+
- PASS: 3 tests passed.
11+
- `npx playwright test tests/playwright/tools/TextToSpeechFunctional.spec.mjs`
12+
- PASS: 2 tests passed.
13+
- Covers restored controls, preset shaping, queue add/duplicate/delete, output summary, pause/resume, speak, stop, and unavailable SpeechSynthesis error handling.
14+
- `npm run test:workspace-v2`
15+
- PASS: 5 Project Workspace tests passed.
16+
- Note: command name is legacy; user-facing language is Project Workspace.
17+
- Note: first execution used a 120s timeout and timed out before completion; rerun with a longer timeout completed successfully.
18+
- `git diff --check`
19+
- PASS.
20+
21+
## Coverage
22+
23+
- PASS: `docs_build/dev/reports/playwright_v8_coverage_report.txt` produced changed runtime JS coverage.
24+
- PASS: `docs_build/dev/reports/coverage_changed_js_guardrail.txt` reports no changed runtime JS coverage warnings.
25+
- PASS: `src/engine/audio/TextToSpeechEngine.js` covered at 71%.
26+
- PASS: `toolbox/text-to-speech/text2speech.js` covered at 71%.
27+
28+
## Artifact Verification
29+
30+
- PASS: `docs_build/dev/reports/codex_review.diff` exists.
31+
- PASS: `docs_build/dev/reports/codex_changed_files.txt` exists.
32+
- PASS: `tmp/PR_26171_061-text2speech-engine-audio-feature-parity_delta.zip` exists.
33+
- PASS: ZIP size is greater than zero.
34+
- PASS: ZIP contents preserve repo-relative paths.
35+
36+
## Skipped
37+
38+
- Full samples validation skipped because no sample JSON or sample runtime behavior changed.
39+
- Database validation skipped because no database files or runtime persistence changed.
40+
- External provider validation skipped because paid/provider generation is out of scope and browser SpeechSynthesis is the implemented provider for this PR.
Lines changed: 56 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,65 @@
1-
# Codex Changed Files - PR_26171_063-codex-instruction-enforcement-hardening
1+
# Codex Changed Files - PR_26171_061-text2speech-engine-audio-feature-parity
22

3-
## Conflict Resolution Note
4-
- Merged latest `origin/main` into the PR branch after GitHub reported merge conflicts.
5-
- Regenerated Codex artifacts from the PR_063 delta against updated `origin/main`.
6-
- No implementation scope was changed while resolving conflicts.
3+
## Git Status Short
4+
```text
5+
A docs_build/dev/reports/PR_26171_061-engine-audio-ownership-checklist.md
6+
A docs_build/dev/reports/PR_26171_061-instruction-compliance-checklist.md
7+
A docs_build/dev/reports/PR_26171_061-manual-validation-notes.md
8+
A docs_build/dev/reports/PR_26171_061-old-tts-feature-parity-checklist.md
9+
A docs_build/dev/reports/PR_26171_061-text2speech-engine-audio-feature-parity.md
10+
A docs_build/dev/reports/PR_26171_061-validation.md
11+
M docs_build/dev/reports/codex_changed_files.txt
12+
M docs_build/dev/reports/codex_review.diff
13+
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
14+
M docs_build/dev/reports/playwright_v8_coverage_report.txt
15+
M src/engine/audio/TextToSpeechEngine.js
16+
M tests/playwright/tools/TextToSpeechFunctional.spec.mjs
17+
M toolbox/text-to-speech/index.html
18+
M toolbox/text-to-speech/text2speech.js
19+
```
20+
21+
## Git Diff Stat
22+
```text
23+
...R_26171_061-engine-audio-ownership-checklist.md | 25 +
24+
...R_26171_061-instruction-compliance-checklist.md | 32 +
25+
.../PR_26171_061-manual-validation-notes.md | 27 +
26+
...R_26171_061-old-tts-feature-parity-checklist.md | 48 +
27+
..._061-text2speech-engine-audio-feature-parity.md | 71 +
28+
docs_build/dev/reports/PR_26171_061-validation.md | 40 +
29+
docs_build/dev/reports/codex_changed_files.txt | 82 +-
30+
docs_build/dev/reports/codex_review.diff | 2057 +++++++++++++++++---
31+
.../dev/reports/coverage_changed_js_guardrail.txt | 8 +-
32+
.../dev/reports/playwright_v8_coverage_report.txt | 37 +-
33+
src/engine/audio/TextToSpeechEngine.js | 208 +-
34+
.../tools/TextToSpeechFunctional.spec.mjs | 30 +
35+
toolbox/text-to-speech/index.html | 119 +-
36+
toolbox/text-to-speech/text2speech.js | 853 ++++++--
37+
14 files changed, 3147 insertions(+), 490 deletions(-)
38+
```
739

840
## Changed Files
9-
- docs_build/dev/PROJECT_INSTRUCTIONS.md
10-
- docs_build/dev/PROJECT_MULTI_PC.txt
11-
- docs_build/dev/reports/PR_26171_063-codex-instruction-enforcement-hardening.md
12-
- docs_build/dev/reports/PR_26171_063-instruction-compliance-checklist.md
13-
- docs_build/dev/reports/PR_26171_063-validation.md
14-
- docs_build/dev/reports/PR_26171_063-manual-validation-notes.md
41+
- src/engine/audio/TextToSpeechEngine.js
42+
- toolbox/text-to-speech/index.html
43+
- toolbox/text-to-speech/text2speech.js
44+
- tests/playwright/tools/TextToSpeechFunctional.spec.mjs
45+
- docs_build/dev/reports/coverage_changed_js_guardrail.txt
46+
- docs_build/dev/reports/playwright_v8_coverage_report.txt
47+
- docs_build/dev/reports/PR_26171_061-text2speech-engine-audio-feature-parity.md
48+
- docs_build/dev/reports/PR_26171_061-instruction-compliance-checklist.md
49+
- docs_build/dev/reports/PR_26171_061-old-tts-feature-parity-checklist.md
50+
- docs_build/dev/reports/PR_26171_061-engine-audio-ownership-checklist.md
51+
- docs_build/dev/reports/PR_26171_061-validation.md
52+
- docs_build/dev/reports/PR_26171_061-manual-validation-notes.md
1553
- docs_build/dev/reports/codex_review.diff
1654
- docs_build/dev/reports/codex_changed_files.txt
1755

18-
## Git Diff Stat Against Updated origin/main
19-
```text
20-
docs_build/dev/PROJECT_INSTRUCTIONS.md | 47 ++
21-
docs_build/dev/PROJECT_MULTI_PC.txt | 58 ++
22-
..._063-codex-instruction-enforcement-hardening.md | 48 ++
23-
...R_26171_063-instruction-compliance-checklist.md | 37 ++
24-
.../PR_26171_063-manual-validation-notes.md | 19 +
25-
docs_build/dev/reports/PR_26171_063-validation.md | 32 +
26-
docs_build/dev/reports/codex_changed_files.txt | 48 ++
27-
docs_build/dev/reports/codex_review.diff | 699 +++++++++------------
28-
8 files changed, 569 insertions(+), 419 deletions(-)
29-
```
30-
3156
## Validation
32-
- PASS: `git diff --check` after conflict resolution.
33-
- PASS: targeted required instruction-anchor validation after conflict resolution.
34-
- SKIP: Playwright, because the PR explicitly requires no Playwright and changes docs/workflow only.
57+
- PASS: `node --check src\engine\audio\TextToSpeechEngine.js`.
58+
- PASS: `node --check toolbox\text-to-speech\text2speech.js`.
59+
- PASS: `node --test tests\tools\Text2SpeechShell.test.mjs`.
60+
- PASS: `npx playwright test tests/playwright/tools/TextToSpeechFunctional.spec.mjs`.
61+
- PASS: `npm run test:workspace-v2` (legacy command name; user-facing language is Project Workspace).
62+
- PASS: `git diff --check`.
3563

3664
## ZIP
37-
- Path: `tmp/PR_26171_063-codex-instruction-enforcement-hardening_delta.zip`.
65+
- Path: `tmp/PR_26171_061-text2speech-engine-audio-feature-parity_delta.zip`.

0 commit comments

Comments
 (0)