How to detect if message contains audio or text

I creat AI assistants that I train on client data, so that they function as customer support, sales, etc. They know how to ask questions to warm leads or filter out irrelevant ones, answer questions well and even collect lead data and integrate it with CRMs or Google Sheets. I can connect them to WhatsApp and social media.

I want to add a new feature that transcribes audio to text. For that, I need to first check whether the input is audio or not, this way I can use a router to either send the data for transcription or just continue as is.

Is there a module or a function that can do this?

And also, what would be the best way to send the audio to Make? I assume I can’t just send the audio file using a webhook.


It is feasible to use CloudConvert for the conversion process, as ChatGPT might not accept all audio data for conversion to an MP3 format. An alternative solution could involve utilizing the Deepgram API for the conversion process.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support | Book Live Implementation
Visit us here
Youtube Channel

1 Like

I understand, but how can I check if the file is actually an audio or text?
And what would be the best way to send the file to Make in the first place?


You can upload in Dropbox and send Dropbox link to make.
You can confirm with url existence.