Why am I getting an out of memory error for uploading 30-min voice recordings in my workflow with Google Drive, AWS S3, OpenAI Whisper, and Notion?

This topic was automatically generated from Slack. You can find the original thread here.

Hey everyone,

I’m trying to create a workflow where I upload voice recordings from my phone to a Google Drive folder, have those recordings pushed into an AWS S3 bucket, then transcribed using the OpenAI Whisper API and then upload the transcription to my Notion database. I have these steps working for <10min recordings but more than that I keep getting an out of memory error. This seems odd to me given a 30min audio recording is like max 20MB and my workflow memory max is set at ~4800 MB. Thoughts on why I may be getting this error? I even delete the variables from memory in the step where I save the files into a variable to upload them to s3

Hello , to best save your time and provide support to you on this

  1. If you have subscribed to Pipedream team plan, you will be added to a dedicated slack support channel
  2. If you’d like to hire a Pipedream expert for your usecase, feel free to use this link: Connect with a Pipedream Partner

Could you do me a favor and take a look at the OpenAI Transcription action and see if its memory use could be improved? I noticed this too when testing with large files

just to confirm, are you hitting the Whisper / Audio API directly, or are you using our built-in Create Transcription action? Either way we should improve our action, but just curious

Figured it out, it was actually a missing param for large body lengths. The default value capped those 30+min audios
PR: [OpenAI] Fix memory exceeded for large audio files (30+ min) by andrewjschuang · Pull Request #5929 · PipedreamHQ/pipedream · GitHub

awesome :pray: , approved!

I’m working on this as well - nice to know I’m not the only one dealing with this issue today haha

just merged that fix, should be out in a few minutes, let’s see if that helps!

Heck yeah! Was just about to swap out my transcription step with Deepgram, but if I can keep Whisper I will

nice, yeah there should be nothing preventing us from steaming large files to the Whisper API in the Pipedream execution environment, hopefully we can reduce the needed memory to the minimum for y’all

If it helps, I’ve enabled support access for my workflow: https://pipedream.com/@tomfrankly/test-chat-api-test-p_brCyb6n/build

do you see the option to update that action in your workflow now? The new version should be out

yep, will test on my 24mb test file now.

Ha, well one thing I can share: the limit isn’t 25mb

{"error":{"message":"Maximum content size limit (26214400) exceeded (26401220 bytes read)","type":"server_error","param":null,"code":null}}

Reconverting to 22m

do you know of a service that can connect to Pipedream and split mp3 files?

From what I gather, ffmpeg is out since you’d have to actually install it on the host machines

you can actually use ffpmeg in the Pipedream execution environment via an npm installer, let me share another example

Could you describe exactly what you’d like to do? I’d love to test our new ai.m.pipedream.net endpoint on this use case, it worked pretty well for another ffmpeg example

will look at that in a second - first, I want to say that the fix worked!

awesome