Closed dposkachei closed 9 months ago
Hi @dposkachei
Thank you for your report.
I wasn't aware the response is chunked. But nevertheless, it should return the full response, as it waits for the complete response. Maybe you are using a different Http-Client than Guzzle?
Probably I will add a second method speechStreamed
to get an iterator. But I think it is handy to have a method to fetch the complete response and not having to use an iterator.
What do you think?
Here is the streaming implementation: https://github.com/openai-php/client/pull/282
Description
Response for audio speech for TTS must be with requestStream format https://platform.openai.com/docs/guides/text-to-speech
This type of file editing allows you to correctly use new TTS functionality:
And then the file can be saved to the system:
Steps To Reproduce
OpenAI PHP Client Version
v0.7.10
PHP Version
8.2.10
Notes
Thank you for this package, you would have come to this small edit yourself, just a little help for the new update :)