Request this API you should use “multipart/form-data” Content-Type. You can use this API to identify all of the audio formats or fingerprint extracted with our SDK. We suggest you use data type “fingerprint”, which will reduce the internet bandwidth and accelerate recognition speeds. Also we suggest you do not use large file to request this API, this can cause severe delays, its advised to reduce the file size before upload, files that are less than 15 seconds are generally better.
View examples with the following languages: cURL, PHP, JS, Ruby… on Github.
Java : SDK Github
Python: SDK Github
C#: SDK Github
|access_key||String||The project access key|
|data_type||String||Two data type: fingerprint or audio|
|sample_bytes||Number||The size of the data you want to identify|
|sample||String||The binary data of fingerprint or audio, If the sample data is bigger than 1M, error will be returned, so you'd better cut large file to small file, within 15 seconds data size is better.|
|signature_version||Number||The Version of generating signature|
|signature||String||Requests to ACRCloud must be signed—that is, they must include information that ACRCloud can use to authenticate the requestor.
string_to_sign = http_method+"\n"
sign = base64.b64encode(hmac.new(access_secret, string_to_sign, digestmod=hashlib.sha1).digest())
|timestamp||Date||the time since the Epoch (00:00:00 UTC, January 1, 1970), measured in millisecond.|
|audio_format (Optional)||String||The format of your audio data, like "mp3, wav, ma4, pcm, amr" etc, If your audio file does not have audio header, this parameter should be included|
|sample_rate (Optional)||Number||If your audio file does not have audio header, this parameter should be included|
|audio_channels (Optional)||Number||If your audio file does not have audio header, this parameter should be included
Allowed values: 1, 2
Please find the result fields and descriptions in Metadata page.
Error Result (Example)
|3001||Missing/Invalid Access Key|
|3002||Invalid ContentType. valid Content-Type is multipart/form-data|
|3015||Could not generate fingerprint|
|3016||The file you uploaded was too large, we sugguest you cut large file to smaller file, 10-20 seconds audio file is enough to identify|