@danhachuel/thunderbolt 0.3.80 → 0.3.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.3.80",
3
+ "version": "0.3.81",
4
4
  "description": "Thunderbolt — interface local para operação de canais faceless e motor MoneyPrinterTurbo",
5
5
  "license": "MIT",
6
6
  "main": "scripts/cli.mjs",
@@ -116,10 +116,11 @@ def chunk_character_limit(rate: float) -> int:
116
116
  def _build_ssml(text: str, voice: str, rate: float) -> str:
117
117
  parts = voice.split("-", 2)
118
118
  locale = "-".join(parts[:2]) if len(parts) >= 2 else "en-US"
119
+ escaped_voice = escape(voice, {'"': """})
119
120
  return (
120
121
  '<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" '
121
122
  f'xml:lang="{escape(locale)}">'
122
- f'<voice name="{escape(voice, {"\"": "&quot;"})}">'
123
+ f'<voice name="{escaped_voice}">'
123
124
  f'<prosody rate="{_normalise_rate(rate):g}">{escape(text)}</prosody>'
124
125
  "</voice></speak>"
125
126
  )