如何使用Python和Gracenote识别音乐样本? [英] How to recognize a music sample using Python and Gracenote?

查看:186
本文介绍了如何使用Python和Gracenote识别音乐样本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近发现了 GNSDK (Gracenote SDK),它似乎提供了几种编程语言的示例,以供识别通过对音乐样本进行指纹识别,然后请求其音频数据库来获取相应的艺术家和歌曲名称.

I recently discovered the GNSDK (Gracenote SDK) that seems to provide examples in several programming languages to recognize music samples by fingerprinting them, and then to request their audio database to get the corresponding artist and song title.

但是文档太可怕了.

如何使用Python和GNSDK对音频样本文件进行识别?提供的文档中没有任何示例或教程.

How can I, using Python and the GNSDK, perform a recognition of an audio sample file? There isn't any examples or tutorials in the provided docs.

我真的想将GNSDK与Python结合使用.不要发布任何无关的内容,否则会浪费时间.

I really want to use the GNSDK with Python. Don't post anything unrelated, you'll waste your time.

推荐答案

我最终使用了有效的 ACRCloud 很好.似乎由于某些原因,每个想使用Gracenote的人都退回到ACRCloud了...现在我知道了.

I ended up using ACRCloud which works very well. Seems that everyone that want to use Gracenote fall back to ACRCloud for reasons... Now I know why.

Python示例:

from acrcloud.recognizer import ACRCloudRecognizer

config = {
    'host': 'eu-west-1.api.acrcloud.com',
    'access_key': 'access key',
    'access_secret': 'secret key',
    'debug': True,
    'timeout': 10
}

acrcloud = ACRCloudRecognizer(config)

print(acrcloud.recognize_by_file('sample of a track.wav', 0))

这篇关于如何使用Python和Gracenote识别音乐样本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆