Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: transcribe 3 times and did not succeed #301

Closed
chengxs1994 opened this issue Dec 21, 2023 · 4 comments
Closed

[Bug]: transcribe 3 times and did not succeed #301

chengxs1994 opened this issue Dec 21, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@chengxs1994
Copy link

Description

When I use larger audio files

Error: The cURL request was retried 3 times and did not succeed. The most likely reason for the failure is that cURL was unable to rewind the body of the request and subsequent retries resulted in the same error. Turn on the debug option to see what went wrong.

Steps To Reproduce

    $client = OpenAI::factory()
        ->withApiKey('sk-xxx')
        ->withBaseUri('one-api.xxx.com/v1')
        ->make();

    $response = $client->audio()->transcribe([
        'model' => 'whisper-1',
        'file' => fopen(base_path().'/test.wav', 'r'),
        'response_format' => 'verbose_json',
    ]);

OpenAI PHP Client Version

v0.7.10

PHP Version

8.1

Notes

No response

@chengxs1994 chengxs1994 added the bug Something isn't working label Dec 21, 2023
@chengxs1994
Copy link
Author

The problem I encountered in SWOOLE is that I can request it normally after opening--enable-swoole-curl

@chengxs1994
Copy link
Author

But when I use --enable-swoole-curl, the headers of the request response will become uppercase, and the logic in the code is to get lowercase, which will cause another error
有度即时通20231222143519

@chengxs1994
Copy link
Author

#306

@gehrisandro
Copy link
Collaborator

swoole header should now work in the latest release v0.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants