techworker/ssml
techworker/ssml is a PHP library for building SSML markup to control text-to-speech output. Use its fluent API to add breaks, emphasis, prosody, and phonemes for Amazon Polly, Google Cloud, and Azure TTS.
<break>, <say-as interpret-as="..."> for dates/currency/acronyms). Supports a decision to standardize on SSML as the interchange format for all spoken output rather than per-feature ad-hoc strings.Consider it when:
<speak>, <voice>, <prosody>, <break>, <emphasis>, <say-as>, <phoneme>. A builder covering the common tags is enough.Look elsewhere (or build in-house) when:
To executives: This is a small, free (MIT) PHP utility that lets us produce the markup text-to-speech engines require, instead of hand-assembling strings. It is a speed and quality lever for any voice or accessibility feature on the roadmap — not a platform bet. Cost is near zero; the real cost is a minor dependency risk that we contain by keeping our own thin wrapper around it so it can be swapped or replaced in days.
To engineering: It provides a fluent SSML builder — voice, prosody, breaks, emphasis, say-as — so feature code expresses intent rather than XML. Integration is a Composer require and a wrapper service. Two caveats to design around: pin the version and wrap it behind our own interface, and don't rely on it for provider-specific validation. If we outgrow it, the wrapper makes replacement a contained refactor rather than a codebase-wide one.
Recommendation: Adopt behind an internal abstraction for voice features on the near-term roadmap; do not make it a load-bearing dependency for regulated or long-lived audio pipelines without a fallback plan.
How can I help you explore Laravel packages today?