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
helpers:ssml_to_deepgram() and TextBuilder.from_ssml() now keep a <break> pause when the tag carries other attributes or spaces around =, such as <break strength="medium" time="500ms"/> or <break time = "500ms"/>. These spellings previously failed to match and were deleted by the generic tag stripper, so the pause silently vanished from the text sent for synthesis. Behavior change: a <break> with extra attributes is now validated like a bare <break time="...">, and raises ValueError when the duration is below 500ms, above 3000ms or off the 100ms grid, when a document holds more than eight pauses, or when it is combined with a pronunciation. Also fixes a hang present in 7.20.0 and earlier: the <break> and <phoneme> SSML matchers backtracked cubically on an unterminated tag (about 22 seconds on a 4 KB input), which could stall any caller passing user-supplied SSML; both now return in under a millisecond at 20,000 characters. Known limitation: a time= written inside another attribute's quoted value is still read as the real one. (#809) (dc7e585)
Bug Fixes
helpers:TextBuilder.text() with an inline pronunciation, and TextBuilder.from_ssml(), now count the spoken word of a pronunciation toward the 2,000-character limit, matching the fluent pronunciation() call. Previously the whole control, including the word, was removed before counting, so the same text could be rejected through the fluent API but accepted at 2,001 characters through inline or SSML input. The word is counted by its decoded length, so Unicode and JSON-escaped quotes and backslashes are measured as spoken; pause controls still contribute no text. Inputs just over the limit that were previously accepted now raise ValueError. (#807) (373d43c)