JSL
JSL13mo ago

Blob URLS

Hi I have been trying to work on a solution to go from Flutterflow Recordings to OpenAi Whisper. It's seems that I can achieve this with Buildship. Flutterflow gives you a Audio Path that is a blob url of an OPUS audio. I send this Audio Path to Buildship with an API. Something similar to: blob:https://d... The part that I am getting stuck with is how to get the OPUS file from the blob url. I found this that works in the browser and downloads the file:
var xhr = new XMLHttpRequest();
xhr.responseType = 'blob';
xhr.onload = function() {
var a = document.createElement('a');
a.href = window.URL.createObjectURL(xhr.response);
a.download = 'filename.opus'; // You can name the file here
a.style.display = 'none';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
};
xhr.open('GET', 'BLOB_URL_HERE');
xhr.send();
var xhr = new XMLHttpRequest();
xhr.responseType = 'blob';
xhr.onload = function() {
var a = document.createElement('a');
a.href = window.URL.createObjectURL(xhr.response);
a.download = 'filename.opus'; // You can name the file here
a.style.display = 'none';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
};
xhr.open('GET', 'BLOB_URL_HERE');
xhr.send();
But I need to find a solution in Buildship that I can then use in an API to Whisper. I have tried the AI Gen and various code version but no luck yet. Appreciate any help.
0 Replies
No replies yetBe the first to reply to this messageJoin