听歌识曲好像不好使了呢
dadiYazZ opened this issue · comments
经有限测试,已验证听歌识曲API仍然有效
附:测试音频片段
17566198_10s.mp4
附:网页端输出
[rec.js] Audio Context started.
[rec.js] Microphone attached.
[index] File 17566198_10s.mp4 loaded.
[rec.js] Recording started
[rec.js] Recording finished
[index] Generated FP ZQHx/BD1TNPQICJIqb1c/6IM26Ta/QHgErUtXhNY4bUobqabv6bHdJCeN6XDUu8Ld1wHi78WwoJLDB8RqLAzmLrzGqvqwk0LwSxK4b1Ys4fLWpdndylU6GcLiaANoE1e+bROz7n9KWcQGMIDlqQk/5N2DW7NcwH2Q2DN2CJErt08cgD832G7fichHyek9q3xeg/TkydhaixiLNJrS10iY0vpdCcCFtTXqp5FlyA07A3LozxCm82hr7KGgarlnhgAQQOVCrol6qVIPn8jVgwp/ZZDGcKeRUQmBzaVXny7rYq3rbwZ/aE//yDiZPjjWHvFef6td6oRYiiJ6XIJY/kUIkRCcyDGoppT5iAgBGW4gAMBguKwuainLn0Sg5fs8GF08jOYNh6vQWFqHc/CdTARP9rwsFAYHQfWIiC2QsubzV8z3FVuiIQ5wm0wN6FBNr8C8KTocTwx+9aIpiZ7KYG+vIe8fK2PvhsVhLeCjWsDo8ymlvrD7HldP6N8k3yxl8C4wHG9IjwujGZCmOcAcc7soJ8k+1gW7cOkdaYGTDfktxmDkzJuPm4QX58MVMzGRbelGpjyTvPWS2PbYO/ecEvpJElj/ynTGgQJi49/eEHXRakPRGt4dvswNcyB2GSUreVIdWtNwqKGPGBDzZyBUjAEBd+3f3+qqJKGw3+bhrEY+qxgo8gceLRo4vQeSJ3X0bzHosYFfXTThbWNfKZJg3GKyOpY8ssxh19xeeVy7PryJ6sgOh6R7sdZjpsFgk/zYKfGxTVijMR/iXqHKzAhIDUMDmcR7axK9IHjq1g+2hNleqdgGofPeTR7M0pad4iq10cDqBJatxe6x57WT3TCh8wNHDSkgb9AMrlQQwgSGdtFy6/6s8k/QTZkrcjD7Qcn43+J85m1VB+6EV+Hcbm0bazfETtiOuvClusidi0DEFS2uJoZwzkrCXS5ACC3cbFZ0tazJOI22NX2pkZAwi4i4C62q7sLBqWMfvYGixmgSNuMk1U=
[index] Now querying, please wait...
[index] Query complete. Results=3
[result] [Between the Bars - Good Will Hunting (Music from the Miramax Motion Picture) (0.72s)](https://music.163.com/song?id=5056101)
[result] [Between the Bars - Either/Or: Expanded Edition (1.08s)](https://music.163.com/song?id=464035871)
[result] [Between The Bars - Stuck In Love (Original Motion Picture Soundtrack) (1.36s)](https://music.163.com/song?id=28086564)
附:Python 输出
ffmpeg -i ..\Desktop\17566198_10s.ogg -acodec pcm_f32le -f f32le -ar 8000 -ac 1 -t 3 - | python afp.py
[truncated]
* Expecting input to be 3s 8000hz PCM SF32 LE samples 0x
* With ffmpeg, you can use the following command to generate the samples:
* ffmpeg -i [input file] -acodec pcm_f32le -f f32le -ar 8000 -ac 1 -t 3 - | python afp.py
* Loading instance
* Reading from stdin...
[out#0/f32le @ 000002aaa7554880] video:0kB audio:94kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
size= 94kB time=00:00:02.99 bitrate= 256.6kbits/s speed=7.02x
[afp] input samples n= 24000
[afp] begin fingerprinting
* Fingerprint: QZUJH6HpI9BK/VDRaFx3bzj/WcAkYbqg4672TdkBkK0JPmr5xMZDkkqewDTiKkI7ai6UGM/XW3pZvakv5dXvZ+3h0HzEDaT29LQ/rPiLQ8exQdwxWVpD5Gka/tK+3HyGWnx/oi69sYwp36ZFF3lg+ihY8JU8o6irglS72r7OdpvCmI3J1Wb+qY/BEtqAqBEI0TV2W9jVy+h2JNjsE6aklIISvFKLXlGsSiOEjnqOIYsENVunonuifvkrsOLajQFSsu2hi74h2U3HoNxkfdevD7HdO96W6PD1CINF6fR9NWsv9B5wCPodXpjC21RrXaOaRK/z6hZ8ZJ2AfiRv/BvK7zg7OE/FnzsSgaAl4J3+m+/ivd8+iYmOVbmu2scgBPujO0s27neONwvGQJbv3BB0J0LzfJg7EenkBJIWrhgfeTkM954v+n6JX+slK7sDbtoXcB60ijC6Dxxn/n245ZrinD+dOTgEL74Hv48NCPI6yX7bSLjZWH+6Ofar0vG3ZTiizSJxJss9faxLGPMREtr5bBeMFdgkvQxdlZvG0UhQp5M0/70aqvZk0IjdCpF3zDjWsqNwrGOUTFH1ZviHpw6Ze5W1scmzuDMHrFaEhrTjqTjq4LsklTmLsMZS1pAz5uNxIr83/njuQ9WV6C/8iGhDFbAQWBFy9wegwgFJALtJLLXH2Z1bjvSNj4pFiwuKLWwVXDc6mxte3t7ZsDoWak8CQxLu2/Fzginf0uuPpsKe2XJBs3CiebEV2Em+utdsyscGxcu9shKvA+i2su7YUDRiMtnl7bg0iO+e9iBcWXSvFRJq2oHeTDtBZqEjB60q2c+KTNdSWlPvoejMox8Hu/PxN26r/U7De9X4tygyYlaHOTtzobmYG4SoAQj3CPQec6qNGHU+vZHkJiBRkb07s6p4kqnRgPSVYwmOJzNv74W1tD4=
{'code': 200,
'data': {'moduleList': ['relatedSongs',
'mv',
'recommendSongs',
'recommendPlayLists'],
'mv': [],
'noMatchReason': 0,
'queryId': 'f453deae-2446-4d07-a6cb-2c702678f8e9',
'result': [{'song': {'addTime': None,
[truncated]
注:使用 https://mos9527.github.io/ncm-afp/前,需要进入 https://cors-anywhere.herokuapp.com/corsdemo 并点击 Request temporary access to the demo server;确保页面显示 You currently have temporary access to the demo server.
注:同时,确保测试音频连续长度>=3s
如何在安卓项目里应用这个项目呢,比如我要如何获取这个audioFP呢
如何在安卓项目里应用这个项目呢,比如我要如何获取这个audioFP呢
抱歉,本人并不熟悉 Android 开发;不过考虑到最终invoke即调用 GenerateFP,以下链接可能有用:
https://developer.android.com/develop/ui/views/layout/webapps/jsengine
参数说明可参考afp.py;TL;DR: 3s 8000Hz PCM Float32LE 单声道音频样本