You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated Text to Speech V2 to match browser `speechSynthesis` queue behavior instead of modeling fake concurrent speakers. Removed Auto Speak from the visible UI, schema, defaults, queue item data, and hydration path while safely stripping legacy `autoSpeak` from older saved queue items.
6
+
7
+
## Scope
8
+
9
+
- Tool fixed: Text to Speech V2.
10
+
- Failing behavior before: browser speech queue behavior was represented as active independent speakers, and Auto Speak remained in schema/default/control paths.
11
+
- Remaining failures after this PR: none known in the PR scope.
12
+
- Out of scope: non-browser speech backends, true concurrent speech, sample JSON alignment, and full samples smoke validation.
13
+
14
+
## Changes
15
+
16
+
-`src/engine/audio/TextToSpeechEngine.js`
17
+
- Replaced active speaker tracking with queued speech item tracking.
18
+
-`append` calls `speechSynthesis.speak()` without global cancel.
19
+
-`replace` explicitly calls `speechSynthesis.cancel()` and clears tracked queued items before speaking.
20
+
- Stop now reflects browser-global queue cancellation and logs cleared queued item count.
21
+
-`src/engine/audio/TextToSpeechDefaults.js`
22
+
- Removed `autoSpeak` from required fields, default options, and default queue data.
23
+
-`tools/schemas/tools/text2speach-V2.schema.json`
24
+
- Removed `autoSpeak` from schema required fields and properties.
25
+
-`tools/text2speach-V2/index.html`
26
+
- Removed Auto Speak and Stop All controls.
27
+
-`tools/text2speach-V2/js/TextToSpeechToolApp.js`
28
+
- Removed auto-speak triggering and Stop All wiring.
29
+
- Migrates legacy `autoSpeak`, `repeatCount`, and `delayBetweenRepeatsMs` fields out of saved queue items without rendering removed controls.
- Updated Text to Speech V2 coverage for queue behavior, Auto Speak removal, schema/default cleanup, voice match details, neutral/unknown voice helper buckets, and workspace launch controls.
40
+
41
+
## Playwright
42
+
43
+
Playwright impacted: Yes.
44
+
45
+
Validated behavior:
46
+
- Text to Speech V2 no longer exposes Auto Speak or Stop All controls.
47
+
- Schema/default queue data no longer require or emit `autoSpeak`.
48
+
- Browser queue append can queue multiple utterances without canceling existing queued speech.
49
+
- Replace mode uses global browser cancel and reports the current queue.
- PASS: `tools/schemas/tools/text2speach-V2.schema.json` parsed with `JSON.parse`.
76
+
- PASS: `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list -g "Text to Speech V2|text2speach-V2"` passed 5 tests.
77
+
- PASS: `npm run test:workspace-v2` passed 28 tests.
78
+
- PASS: `git diff --check HEAD -- .` passed with only Windows line-ending warnings.
79
+
- PASS: Text to Speech V2 HTML scan found no inline event handlers, no inline styles, and only allowed external module scripts.
80
+
- PASS: Forbidden-scope scan found no `tools/shared`, `imageDataUrl`, or `start_of_day` matches in changed implementation/test scopes.
81
+
82
+
## Coverage
83
+
84
+
Playwright V8 coverage was generated by the required Workspace V2 run.
85
+
86
+
-`(78%) src/engine/audio/TextToSpeechEngine.js - changed JS file with browser V8 coverage`
87
+
-`(100%) src/engine/audio/TextToSpeechDefaults.js - changed JS file with browser V8 coverage`
88
+
-`(100%) tools/text2speach-V2/js/bootstrap.js - changed JS file with browser V8 coverage`
89
+
-`(100%) tools/text2speach-V2/js/controls/ActionNavControl.js - changed JS file with browser V8 coverage`
90
+
-`(100%) tools/text2speach-V2/js/controls/SpeechOptionsControl.js - changed JS file with browser V8 coverage`
91
+
-`(100%) tools/text2speach-V2/js/TextToSpeechToolApp.js - changed JS file with browser V8 coverage`
92
+
93
+
## Full Samples Smoke Test
94
+
95
+
Skipped. This PR is limited to Text to Speech V2 browser speech queue behavior, Auto Speak removal, voice match display, and Workspace V2 Playwright coverage. It does not modify shared sample loading, sample JSON, broad game launch behavior, or shared runtime paths that require the full samples smoke test.
96
+
97
+
## Manual Validation
98
+
99
+
1. Open `tools/text2speach-V2/index.html`.
100
+
2. Confirm the Speech Options panel has no Auto Speak control and Named Sentences has Speak, Pause, Resume, and Stop only.
101
+
3. Confirm voice details show a heading like `4 voices match Any:` followed by one bullet per voice.
102
+
4. Select Queue Mode `Append to queue`, speak two different named sentences, and confirm the status reports queued item counts without claiming concurrent speakers.
103
+
5. Select Queue Mode `Replace current speech`, speak, and confirm status reports the replacement speech item.
104
+
6. Use Stop and confirm status reports the number of queued items cleared.
105
+
106
+
Expected outcome: Text to Speech V2 uses browser queue semantics, removed controls stay absent, and no UI copy claims true concurrent speech.
return{message: "SpeechSynthesis is unavailable in this browser.",ok: false};
242
-
}
243
-
constselectedSpeakerId=String(speakerId||"");
244
-
constspeaker=selectedSpeakerId
245
-
? this.activeSpeakers.get(selectedSpeakerId)
246
-
: this.activeSpeakerList()[0];
247
-
if(!speaker){
248
-
return{message: `No active ${TEXT_TO_SPEECH_DISPLAY_NAME} speaker is tracked for ${selectedSpeakerId||"the current selection"}.`,ok: false};
249
-
}
250
-
if(this.activeSpeakers.size>1){
251
-
return{
252
-
activeSpeakers: this.activeSpeakerList(),
253
-
message: `Cannot stop only ${speaker.name}: browser SpeechSynthesis exposes global cancel only. No global cancel was called while other speakers are active.`,
0 commit comments