C
C
che_aa2020-06-28 23:27:32
Python
che_aa, 2020-06-28 23:27:32

Working with ACRCloud?

Has anyone had experience with ACRCloud? Just through from the api, according to their examples, I'm trying to check the music, the code is:

from acrcloud.recognizer import ACRCloudRecognizer, ACRCloudRecognizeType
import sys
config = {
    'host': 'identify-eu-west-1.acrcloud.com',
    'access_key': 'ххх',
    'access_secret': 'ххх',
    'debug': True,
    'timeout': 0,
}

acrcloud = ACRCloudRecognizer(config)

print(acrcloud.recognize_by_file( 'test2.mp3',  0))

and gives me an error:
{"status": {"msg": "Http Error:<urlopen error [WinError 10035] \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430 \u043d\u0435\u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0441\u043e\u043a\u0435\u0442\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e>", "code": 3000}}
filter_energy_min: 100
silence_energy_threshold: 1200
silence_rate_threshold: 0.70
file_name=text2.mp3,start_s=0, audio_len=10, is_db=0, filter_energy_min=100, silence_energy_threshold=1200, silence_rate_threshold=0.70
file_name=text2.mp3 start_s=0 audio_len=10 is_db=0
[mp3 @ 0000000002d0f5a0] Skipping 0 bytes of junk at 565.
Input #0, mp3, from 'text2.mp3':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.45.100
  Duration: 00:01:00.03, start: 0.025057, bitrate: 128 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
    Metadata:
      encoder         : Lavc58.91
in_channels=2,in_sample_rate=44100,out_channels=2,out_sample_rate=44100
st->audio_pcm_data_len=159646

After decoding the unicode, I got:
An operation on an unlocked socket cannot be completed immediately

The error code on the site reads:
Recognition service error(http error 500)

Who knows how to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2020-06-29
@che_aa

Timeout is zero

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question