Hi,
I’m posting 15MB files to the audio transcription endpoint. It frequently times out and I still get charged.
conn = Faraday.new(faraday_options) do |f|
f.request :multipart
f.adapter :net_http
f.headers['Content-Type'] = 'multipart\/form-data'
f.headers['Authorization'] = "Bearer " + key
end
payload = { file: Faraday::Multipart::FilePart.new(file, fileinfo.fetch('content_type')),
model: 'whisper-1',
response_format: 'verbose_json' }
@response = conn.post(transcriptions_endpoint, payload)
I already set the timeout to 120 seconds, to give it a lot of time. It’s posting from an AWS so the connection speed shouldn’t be an issue.
The error is intermittent, so I know that the code works and the timeouts don’t always happen.
Does anyone have any suggestions other than splitting files down further (docs say up to 25MB is ok)?
Thanks,
Tom