- What is techworker/ssml used for in a Laravel application?
- techworker/ssml is a framework-agnostic PHP library for generating SSML markup that controls text-to-speech output. It provides a fluent API for adding breaks, emphasis, prosody, and phonemes for providers such as Amazon Polly, Google Cloud TTS, and Azure TTS. In Laravel, use it behind an internal SpeechRenderer or SsmlBuilder service rather than letting controllers, jobs, or notification channels depend on the package directly.
- How do I install techworker/ssml with Composer?
- Install it as a normal Composer dependency and call it from Laravel services, jobs, or notification channels. Because it is a generator library, no database, queue, or runtime infrastructure is implied. Confirm the PHP version constraint, PSR-4 autoloading, repository visibility, and license from the actual source before adopting it.
- Does techworker/ssml support Laravel 10 and Laravel 11?
- The package is described as framework-agnostic, so Laravel version support mainly depends on its PHP version constraint and your application runtime. If the package's PHP requirement matches your Laravel 10 or Laravel 11 environment, it can likely be used without a Laravel-specific integration. Validate compatibility in a low-risk branch before standardizing it across the application.
- Do I need a Laravel service provider or facade for techworker/ssml?
- A Laravel service provider or facade is not implied by this package because it is a plain PHP SSML generator. The safer integration is to wrap it in an application-owned service or value object and bind that interface in Laravel's container. This keeps call sites replaceable if the package stalls or your TTS provider requirements change.
- Which TTS providers does techworker/ssml support?
- The package is positioned for generating SSML used with Amazon Polly, Google Cloud TTS, and Azure TTS. However, each provider has its own SSML profile and may reject unsupported tags or attributes. Validate generated markup against the exact provider and voice you plan to use rather than assuming one SSML output fits all services.
- Is techworker/ssml safe for user-generated text and XML escaping?
- XML escaping is a key technical concern for any SSML generator, especially when text comes from users or untrusted sources. Confirm whether the package safely escapes text and attributes, and add tests for malformed input and special characters. Validate the final SSML before sending it to a TTS provider so invalid markup fails with an actionable error instead of producing broken audio.
- How should I test techworker/ssml output in a Laravel app?
- Start with snapshot or contract tests against representative TTS prompts, including breaks, emphasis, prosody, phonemes, and special characters. Add XML safety tests for malformed input and unescaped user text, plus provider validation where possible. Wrapping the package behind an internal interface makes these tests easier to maintain and lets you swap implementations later.
- Is techworker/ssml production-ready and actively maintained?
- The assessment flags maturity and provenance as the main risks because the repository is unknown and adoption appears low. Verify the public repository, tests, release cadence, dependency footprint, and license from the actual source before using it in production. Pin a Composer version, monitor upstream activity and security advisories, and consider forking or vendoring for production-critical flows.
- What are alternatives to techworker/ssml for generating SSML in PHP?
- Alternatives include building SSML with PHP's DOMDocument or XMLWriter, using provider SDK helpers where available, or maintaining a small internal SSML builder. The main trade-offs are provider-specific SSML coverage, XML escaping safety, testing effort, and long-term maintenance. Keeping an internal builder interface lets you compare techworker/ssml with these alternatives without rewriting every call site.
- How do I migrate from hand-built SSML to techworker/ssml in Laravel?
- Introduce an internal SsmlBuilder or SpeechRenderer interface, implement it with techworker/ssml, and add snapshot and contract tests for representative prompts. Swap call sites incrementally, starting with one low-risk use case such as a notification audio script. Keep a fallback or internal implementation for critical flows so the package does not become a hard-to-replace dependency.