Posting a sound file to an API ensuring transcription

Hi there,
Julien from France.

having experience with no code app tools like Bubble and MIT App inventor.

I am currently trying to send audio files, recorded by the App, to an API service ensuring speech to text

async function query(filename) {
const data = fs.readFileSync(filename);
const response = await fetch(”,
headers: { Authorization: “Bearer {API_TOKEN}” },
method: “POST”,
body: data,
const result = await response.json();
return result;

query(“sample1.flac”).then((response) => {
here: speechbrain/asr-crdnn-commonvoice-fr · Hugging Face

i struggle to find my way among the different methods described
-use the upload function
-create a variable linked to a rest API
-using an HTTP Request

Considering my coding level is basic, would any good samaritan would have documentation/ links or advices to help me find my way?