Repository navigation
Commit a910f2e
* Revert "fix(tts): Azure SSML parsing error on adjacent break elements (#67) (#71)"
This reverts commit 0bdb217.
* Revert "fix(tts): insert inter-word <break> tags to prevent Hebrew word merging (#70)"
This reverts commit d0c273b.
* restore(tts): reinstate hardenings from #71 unrelated to #70 + add #83 regression test
The initial revert in this branch (revert PR #70 + PR #71 wholesale) was
too aggressive: PR #71 bundled three independent hardenings, only one of
which was caused by PR #70. This commit restores the two hardenings that
have nothing to do with inter-word break injection, and narrows the third
to the residual case that survives #70's revert. Also adds the #83
regression test that pins the bisect finding.
Restored from #71 (and explicitly verified to NOT re-introduce #83):
- `_sanitize_text` + `_XML_INVALID_CHARS_RE` regex. Defends against an
LLM emitting XML 1.0 control characters that otherwise make the SSML
unparseable by Azure. Independent bug class from per-word breaks.
- Azure-range prosody clamping in `_semitones_to_percent`,
`_rate_to_string`, `_volume_to_string`, plus warning logs on clamp
activation. `speaker_BYS_F_6-10_001.yaml` ships `pitch_delta_st=+9`
→ +54% unclamped, which Azure rejects. Independent bug class.
- Adjacent `<break>` merging in `_apply_phrase_prosody`, narrowed to the
phrase-after / phrase-before case (the only adjacent-break source that
survives #70's revert). The original #71 logic also had a word-break
branch that is no longer reachable.
Added:
- `test_no_per_word_breaks_in_default_ssml` regression test pinned to
#83. The default multi-word SSML must not contain `<break>` tags;
per-word break injection (PR #70) tripped Whisper's silence-detection
heuristic and produced the WER regression. Any future Hebrew word-
merge mitigation (#62) must not re-introduce per-word breaks.
- `test_text_with_invalid_xml_chars_sanitized`,
`test_prosody_pitch_clamped_to_azure_range`,
`test_prosody_rate_clamped_to_azure_range`,
`test_prosody_volume_clamped_to_azure_range`,
`test_adjacent_phrase_breaks_are_merged` — pin the restored hardenings.
All three of these were independently flagged by Copilot's review on this
PR (resolves three Copilot review threads).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 588cf05 commit a910f2e
3 files changed
Lines changed: 92 additions & 546 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 29 | | |
38 | 30 | | |
39 | 31 | | |
| |||
57 | 49 | | |
58 | 50 | | |
59 | 51 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 52 | | |
129 | 53 | | |
130 | 54 | | |
| |||
188 | 112 | | |
189 | 113 | | |
190 | 114 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
195 | 122 | | |
196 | 123 | | |
197 | 124 | | |
| |||
202 | 129 | | |
203 | 130 | | |
204 | 131 | | |
205 | | - | |
206 | 132 | | |
207 | 133 | | |
208 | 134 | | |
209 | | - | |
210 | | - | |
211 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
212 | 139 | | |
213 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
214 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
215 | 152 | | |
216 | 153 | | |
217 | 154 | | |
| |||
227 | 164 | | |
228 | 165 | | |
229 | 166 | | |
230 | | - | |
231 | | - | |
232 | | - | |
| 167 | + | |
233 | 168 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 169 | + | |
247 | 170 | | |
248 | 171 | | |
249 | 172 | | |
| |||
257 | 180 | | |
258 | 181 | | |
259 | 182 | | |
260 | | - | |
| 183 | + | |
261 | 184 | | |
262 | 185 | | |
263 | 186 | | |
| |||
350 | 273 | | |
351 | 274 | | |
352 | 275 | | |
353 | | - | |
| 276 | + | |
354 | 277 | | |
355 | 278 | | |
356 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
| 336 | + | |
| 337 | + | |
343 | 338 | | |
344 | 339 | | |
345 | 340 | | |
| |||
377 | 372 | | |
378 | 373 | | |
379 | 374 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
| 375 | + | |
| 376 | + | |
386 | 377 | | |
387 | 378 | | |
388 | 379 | | |
| |||
0 commit comments