openai-php / client

⚡️ OpenAI PHP is a supercharged community-maintained PHP API client that allows you to interact with OpenAI API.
MIT License
4.7k stars 483 forks source link

Unexpected / incomplete response for transcribe audio #173

Closed gidzr closed 1 year ago

gidzr commented 1 year ago

Hi folks

According to your response example, transcribe should provide a number of results in the segments subarray ($response->segments as $segment). For some reason I don't get any of these results using json_verbose on an mp3 speech recording.

(ref: https://github.com/openai-php/client#audio-resource)

I've looked into the response per OpenAi (https://platform.openai.com/docs/api-reference/audio/create), but there's not a lot on the expected full response.

Has the openAi response changed, is it the openai-php api? or does the json_verbose response depend on the length of the audio recording?

Thanks

gehrisandro commented 1 year ago

Hi @gidzr

Using exactly the example from the documentation I do receive a response containing segments.

Can you provide an example how to reproduce the issue?

gehrisandro commented 1 year ago

Closed due to inactivity. Please reopen if this is still an issue for you.