Skip to content

Commit 759196c

Browse files
committed
Update README
1 parent 69a19ba commit 759196c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,22 @@ $client->audio()->speech([
365365
]); // audio file content as string
366366
```
367367

368+
#### `speechStreamed`
369+
370+
Generates streamed audio from the input text.
371+
372+
```php
373+
$stream = $client->audio()->speechStreamed([
374+
'model' => 'tts-1',
375+
'input' => 'The quick brown fox jumped over the lazy dog.',
376+
'voice' => 'alloy',
377+
]);
378+
379+
foreach($stream as $chunk){
380+
$chunk; // chunk of audio file content as string
381+
}
382+
```
383+
368384
#### `transcribe`
369385

370386
Transcribes audio into the input language.

0 commit comments

Comments
 (0)