{"id":393,"date":"2017-11-29T20:34:09","date_gmt":"2017-11-29T12:34:09","guid":{"rendered":"http:\/\/www.tastestars.com\/?p=393"},"modified":"2017-11-29T20:41:53","modified_gmt":"2017-11-29T12:41:53","slug":"librosa","status":"publish","type":"post","link":"https:\/\/tastestars.com\/index.php\/2017\/11\/29\/librosa\/","title":{"rendered":"\u97f3\u9891\u4fe1\u53f7\u5904\u7406python\u5e93\u2014\u2014librosa\u7b80\u4ecb"},"content":{"rendered":"<p>\u505a\u7684\u9879\u76ee\u9700\u8981\u63d0\u4e00\u4e9b\u97f3\u9891\u7279\u5f81\uff0c\u800clibrosa\u8fd9\u4e2a\u5e93\u975e\u5e38\u7ed9\u529b\uff0c\u8fd9\u91cc\u5199\u4e00\u4e9b\u4ecb\u7ecd\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"394\" data-permalink=\"https:\/\/tastestars.com\/index.php\/2017\/11\/29\/librosa\/%e6%8d%95%e8%8e%b7-4\/\" data-orig-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2017\/11\/\u6355\u83b7-1.png\" data-orig-size=\"624,406\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"\u6355\u83b7\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2017\/11\/\u6355\u83b7-1.png\" data-large-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2017\/11\/\u6355\u83b7-1.png\" src=\"http:\/\/www.tastestars.com\/wp-content\/uploads\/2017\/11\/\u6355\u83b7-1.png\" alt=\"\" width=\"624\" height=\"406\" class=\"alignnone size-full wp-image-394\" \/><\/p>\n<p>Youtube\u4e0a\u6709\u4e00\u4e2a\u4ecb\u7ecd\u7684\u89c6\u9891\uff0c\u53f0\u4e0a\u8fd9\u4f4d\u5927\u4f6c\u975e\u5e38\u5e05\u5440\uff0c\u60f3\u60f3\u4ed6\u4e5f\u662flibrosa team member\uff0c\u6211\u4f1a\u66f4\u559c\u6b22librosa\u7684\u3002<br \/>\n\u4e0b\u9762\u6839\u636e\u6587\u6863\u7b80\u5355\u7684\u4ecb\u7ecd\u4e0blibrosa\u7684\u5b89\u88c5\u3001\u529f\u80fd\u7b49\u7b49\u3002<br \/>\n\u6bcf\u5929\u505a\u4e00\u70b9\u5427\uff0c\u5e0c\u671b\u671f\u672b\u7684\u65f6\u5019\u80fd\u5b8c\u6210\u3002<\/p>\n<p>\u4e00\u3001\u5b89\u88c5<br \/>\n1. Windows: pip install librosa<br \/>\n2. Linux: sudo pip install librosa<br \/>\n\u4e5f\u6709\u5bf9\u5e94ffmpeg\u7684\u63a5\u53e3<br \/>\n\u4e8c\u3001 \u4e3b\u8981\u7684IO\u548c\u4fe1\u53f7\u5904\u7406\u529f\u80fd<br \/>\n2.1 \u97f3\u9891\u5904\u7406<br \/>\n[table id=1 \/]<\/p>\n<p>2.1 \u9891\u8c31\u8868\u793a<br \/>\nstft(y[,\u00a0n_fft,\u00a0hop_length,\u00a0win_length,\u00a0&#8230;]) \u77ed\u65f6\u5085\u91cc\u53f6\u53d8\u5316 (STFT)<br \/>\nistft(stft_matrix[,\u00a0hop_length,\u00a0win_length,\u00a0&#8230;]) \u9006\u77ed\u65f6\u5085\u91cc\u53f6\u53d8\u5316 (ISTFT).<br \/>\nifgram(y[,\u00a0sr,\u00a0n_fft,\u00a0hop_length,\u00a0&#8230;]) \u8ba1\u7b97\u77ac\u65f6\u9891\u7387\uff08\u6309\u7167\u91c7\u6837\u7387\u7684\u6bd4\u4f8b\uff09\u6765\u83b7\u5f97\u590d\u6742\u7684\u9891\u8c31\u7684\u65f6\u95f4\u5012\u6570<br \/>\ncqt(y[,\u00a0sr,\u00a0hop_length,\u00a0fmin,\u00a0n_bins,\u00a0&#8230;]) \u8ba1\u7b97\u97f3\u9891\u4fe1\u53f7\u7684\u5e38\u91cfQ\u53d8\u6362<br \/>\nhybrid_cqt(y[,\u00a0sr,\u00a0hop_length,\u00a0fmin,\u00a0&#8230;]) \u8ba1\u7b97\u97f3\u9891\u4fe1\u53f7\u7684\u6df7\u5408\u5e38\u91cfQ\u53d8\u6362<br \/>\npseudo_cqt(y[,\u00a0sr,\u00a0hop_length,\u00a0fmin,\u00a0&#8230;]) \u8ba1\u7b97\u4f2a\u5e38\u91cfQ\u53d8\u6362<br \/>\nfmt(y[,\u00a0t_min,\u00a0n_fmt,\u00a0kind,\u00a0beta,\u00a0&#8230;]) The fast Mellin transform (FMT) [R5] of a uniformly sampled signal y.<br \/>\ninterp_harmonics(x,\u00a0freqs,\u00a0h_range[,\u00a0kind,\u00a0&#8230;]) \u8ba1\u7b97\u5747\u5300\u91c7\u6837\u4e0b\u7684\u5feb\u901f\u6885\u6797\u53d8\u6362 \uff08FMT\uff09<br \/>\nsalience(S,\u00a0freqs,\u00a0h_range[,\u00a0weights,\u00a0&#8230;]) \u8c10\u6ce2\u7279\u5f81\u51fd\u6570<br \/>\nphase_vocoder(D,\u00a0rate[,\u00a0hop_length]) \u76f8\u4f4d\u7f16\u7801\u5668<br \/>\nmagphase(D) \u5c06\u4e00\u4e2a\u590d\u5236\u7684\u9891\u8c31\u56feD\u5206\u79bb\u6210\u5b83\u7684\u5e45\u503cS\u548c\u76f8\u4f4dD\u5206\u91cf\uff0cD=S*P<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u505a\u7684\u9879\u76ee\u9700\u8981\u63d0\u4e00\u4e9b\u97f3\u9891\u7279\u5f81\uff0c\u800clibrosa\u8fd9\u4e2a\u5e93\u975e\u5e38\u7ed9\u529b\uff0c\u8fd9\u91cc\u5199\u4e00\u4e9b\u4ecb\u7ecd\u3002 Youtube\u4e0a\u6709\u4e00\u4e2a\u4ecb\u7ecd\u7684\u89c6\u9891 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[52],"tags":[75,77,76],"class_list":["post-393","post","type-post","status-publish","format-standard","hentry","category-52","tag-librosa","tag-77","tag-76"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s9Hs6X-librosa","_links":{"self":[{"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/posts\/393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/comments?post=393"}],"version-history":[{"count":3,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/posts\/393\/revisions"}],"predecessor-version":[{"id":400,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/posts\/393\/revisions\/400"}],"wp:attachment":[{"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/media?parent=393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/categories?post=393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/tags?post=393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}