Skip to content

v1.3.1

Choose a tag to compare

@pajeronda pajeronda released this 16 Feb 11:19

Release Notes

Overview

This release focuses on reliability and advanced SSML support for personal Home Assistant setups.

Changes

  1. Home Assistant compatibility aligned with streaming support.
    • manifest.json now requires 2024.2.0+.
  2. Streaming reliability improved.
    • Added retry for transient Azure errors (429, 500, 502, 503, 504).
    • Added forced buffer flush for long text without sentence-ending punctuation.
    • Added fallback to request.message when message_gen is unavailable.
  3. New advanced option: allow_raw_ssml.
    • Added to integration options flow.
    • Default is false (safe behavior, message is escaped).
    • When enabled, raw SSML is accepted with XML validation.
    • Invalid SSML automatically falls back to escaped plain text to avoid Azure failures.
  4. Per-call SSML override for tts.speak.
    • Added options.raw_ssml to force enable/disable raw SSML on a single request.
    • Priority: options.raw_ssml > global allow_raw_ssml > default false.
  5. Language compatibility fix for service calls.
    • supported_languages now exposes both original and lowercase locale formats (for example it-IT and it-it).

New Option

  • Name: allow_raw_ssml
  • Location: Integration Options -> Voice step
  • Type: Boolean
  • Default: false

Per-Call Override

  • Name: raw_ssml
  • Location: options field in tts.speak
  • Type: Boolean
  • Default: not set (falls back to global allow_raw_ssml)

Behavior Matrix

  1. options.raw_ssml is set in request
    • Per-call value is used.
  2. options.raw_ssml not set + allow_raw_ssml = false
    • Input is always escaped.
    • Safest mode.
  3. options.raw_ssml not set + allow_raw_ssml = true + message starts with <speak
    • Full SSML document is sent as-is.
  4. options.raw_ssml not set + allow_raw_ssml = true + message does not start with <speak
    • Message is treated as SSML fragment inside integration wrapper.
  5. Raw SSML invalid XML
    • Automatic fallback to escaped plain text.

Usage Examples

1. Standard plain text (default and recommended)

speech:
  type: plain
  text: "It's play time!"

2. Full SSML document (requires allow_raw_ssml: true)

speech:
  type: plain
  text: "<speak version='1.0' xml:lang='en-US'><voice name='en-US-JennyNeural'><prosody rate='+5%'>It's play time!</prosody></voice></speak>"

3. SSML fragment (requires allow_raw_ssml: true)

speech:
  type: plain
  text: "<break time='300ms'/>It's <emphasis level='moderate'>play time</emphasis>!"

Notes

  1. If you pass full <speak>...</speak>, voice/prosody in that SSML may override integration-level defaults.
  2. Keep allow_raw_ssml disabled unless you need direct SSML control.
  3. You can set options.raw_ssml: true on a single service call without changing global settings.
  4. Use either locale format in service calls (it-IT or it-it, en-US or en-us).
  5. This integration is intended as a personal replacement for the legacy official Microsoft TTS integration.

Service Call Example (tts.speak)

action: tts.speak
target:
  entity_id: tts.microsoft_text_to_speech_tts
data:
  media_player_entity_id: media_player.soggiorno
  language: it-IT
  message: "<speak version='1.0' xml:lang='it-IT'><voice name='it-IT-ElsaNeural'><prosody rate='+5%'>Test SSML.</prosody></voice></speak>"
  options:
    raw_ssml: true

Full Changelog: 1.3.0...1.3.1