From 759196cb9eb5550c16c7d1b15364a925a3b8d3e3 Mon Sep 17 00:00:00 2001 From: gehrisandro Date: Thu, 30 Nov 2023 15:45:31 +0100 Subject: [PATCH] Update README --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 97983077..c85f3045 100644 --- a/README.md +++ b/README.md @@ -365,6 +365,22 @@ $client->audio()->speech([ ]); // audio file content as string ``` +#### `speechStreamed` + +Generates streamed audio from the input text. + +```php +$stream = $client->audio()->speechStreamed([ + 'model' => 'tts-1', + 'input' => 'The quick brown fox jumped over the lazy dog.', + 'voice' => 'alloy', +]); + +foreach($stream as $chunk){ + $chunk; // chunk of audio file content as string +} +``` + #### `transcribe` Transcribes audio into the input language.