Shazam Core

שולם
על ידי Tipsters CO | מְעוּדכָּן 14 days ago | Music
פּוֹפּוּלָרִיוּת

9.9 / 10

חֶבִיוֹן

1,750ms

רמת שירות

100%

Health Check

100%

חזרה לכל הדיונים

Not able to use track recognize

Rapid account: Buenc 86
buenc86
a year ago

I’m trying to use the track recognize endpoint. Has anybody accomplished it with javascript?

I’m creating a react native app, and I already have a chunk of the song recorded in a wav file, and have the file path.

I took the code snippet from the doc but have a doubt on what info should I send in this FormData? The file path, the actual file, or what?

const data = new FormData();
data.append(‘file’, ‘file.wav’);

I’m trying in this way

let audioFile = new File([""], fileUri, {type: “audio/wav”});

const data = new FormData();
data.append(‘file’, audioFile);

And I get this error
" ERROR [TypeError: Network request failed]"

Please help

Rapid account: Tipsters
tipsters Commented a year ago

Hello!
I don’t know this language. But it should be easy - send the file. Perhaps you should check code examples in other languages.
https://rapidapi.com/tipsters/api/shazam-core/tutorials/shazam-api-tutorial

Regards. Tipsters.

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות