Originally published at hafiz.dev
Taylor Otwell dropped a one-liner on X yesterday that stopped me mid-scroll:
$audio = Str :: of ( 'Hello, Laravel' ) -> toAudio ();
Enter fullscreen mode
Exit fullscreen mode
That's it. One method call and your string becomes audio. No external SDK wiring, no Guzzle calls, no API response parsing. Just ->toAudio() on a Stringable, the same way you'd call ->upper() or ->slug() .
If you've been following the Laravel AI SDK through Part 1 (building a smart assistant) and Part 2 (RAG-powered support bot) , you already know how text generation and tool calling work. But there's a whole side of the SDK that most developers haven't touched yet: audio.…