{"id":948906,"date":"2024-12-27T00:07:56","date_gmt":"2024-12-26T16:07:56","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/948906.html"},"modified":"2024-12-27T00:07:58","modified_gmt":"2024-12-26T16:07:58","slug":"python%e5%a6%82%e4%bd%95%e6%89%92%e8%b0%b1","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/948906.html","title":{"rendered":"python\u5982\u4f55\u6252\u8c31"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25084051\/3c0998e8-29b8-4526-921d-d75425b4c726.webp\" alt=\"python\u5982\u4f55\u6252\u8c31\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u6252\u8c31\u7684\u65b9\u6cd5\u5305\u62ec\u97f3\u9891\u5904\u7406\u5e93\u7684\u5e94\u7528\u3001\u9891\u8c31\u5206\u6790\u3001<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u6280\u672f\u7b49\u3002\u5176\u4e2d\uff0c\u9891\u8c31\u5206\u6790\u662f\u5173\u952e\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u5c06\u97f3\u9891\u4fe1\u53f7\u8f6c\u6362\u4e3a\u53ef\u89c6\u5316\u7684\u9891\u8c31\u56fe\uff0c\u8fdb\u800c\u8bc6\u522b\u97f3\u7b26\u3002<\/strong>\u9891\u8c31\u5206\u6790\u662f\u901a\u8fc7\u5feb\u901f\u5085\u91cc\u53f6\u53d8\u6362\uff08FFT\uff09\u6765\u5b9e\u73b0\u7684\uff0c\u5b83\u5c06\u97f3\u9891\u4fe1\u53f7\u7684\u65f6\u95f4\u57df\u4fe1\u606f\u8f6c\u6362\u4e3a\u9891\u7387\u57df\u4fe1\u606f\uff0c\u4ece\u800c\u53ef\u4ee5\u63d0\u53d6\u51fa\u97f3\u7b26\u7684\u9891\u7387\u6210\u5206\u3002\u901a\u8fc7\u5206\u6790\u8fd9\u4e9b\u9891\u7387\u6210\u5206\uff0c\u6211\u4eec\u53ef\u4ee5\u63a8\u65ad\u51fa\u97f3\u7b26\u7684\u97f3\u9ad8\u548c\u65f6\u957f\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u97f3\u9891\u5904\u7406\u5e93\u7684\u5e94\u7528<\/p>\n<\/p>\n<p><p>Python\u4e2d\u6709\u591a\u79cd\u97f3\u9891\u5904\u7406\u5e93\u53ef\u4ee5\u7528\u6765\u5e2e\u52a9\u6252\u8c31\uff0c\u8fd9\u4e9b\u5e93\u63d0\u4f9b\u4e86\u65b9\u4fbf\u7684\u63a5\u53e3\u6765\u8bfb\u53d6\u548c\u5904\u7406\u97f3\u9891\u6587\u4ef6\u3002<\/p>\n<\/p>\n<ol>\n<li>Librosa<\/li>\n<\/ol>\n<p><p>Librosa\u662f\u4e00\u4e2a\u5f3a\u5927\u7684Python\u97f3\u9891\u5206\u6790\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u591a\u79cd\u5de5\u5177\u6765\u5904\u7406\u97f3\u4e50\u6570\u636e\uff0c\u5982\u97f3\u9891\u52a0\u8f7d\u3001\u9891\u8c31\u56fe\u751f\u6210\u3001\u97f3\u9ad8\u68c0\u6d4b\u7b49\u3002\u4f7f\u7528Librosa\uff0c\u53ef\u4ee5\u5f88\u65b9\u4fbf\u5730\u5c06\u97f3\u9891\u6587\u4ef6\u8f6c\u6362\u4e3a\u9891\u8c31\u56fe\uff0c\u7136\u540e\u8fdb\u884c\u97f3\u7b26\u7684\u8bc6\u522b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import librosa<\/p>\n<p>import numpy as np<\/p>\n<h2><strong>\u52a0\u8f7d\u97f3\u9891\u6587\u4ef6<\/strong><\/h2>\n<p>y, sr = librosa.load(&#39;audio_file.wav&#39;)<\/p>\n<h2><strong>\u751f\u6210\u9891\u8c31\u56fe<\/strong><\/h2>\n<p>spectrogram = librosa.feature.melspectrogram(y, sr=sr)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u9762\u7684\u4ee3\u7801\uff0c\u6211\u4eec\u53ef\u4ee5\u83b7\u5f97\u97f3\u9891\u6587\u4ef6\u7684\u9891\u8c31\u56fe\uff0c\u7136\u540e\u901a\u8fc7\u8fdb\u4e00\u6b65\u7684\u5904\u7406\u6765\u8bc6\u522b\u97f3\u7b26\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>Pydub<\/li>\n<\/ol>\n<p><p>Pydub\u662f\u53e6\u4e00\u4e2a\u5904\u7406\u97f3\u9891\u6587\u4ef6\u7684Python\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u7b80\u5355\u7684\u63a5\u53e3\u6765\u8fdb\u884c\u97f3\u9891\u6587\u4ef6\u7684\u8f6c\u6362\u3001\u5207\u5272\u3001\u62fc\u63a5\u7b49\u64cd\u4f5c\u3002\u867d\u7136Pydub\u672c\u8eab\u4e0d\u76f4\u63a5\u652f\u6301\u9891\u8c31\u5206\u6790\uff0c\u4f46\u5b83\u53ef\u4ee5\u4e0eLibrosa\u7b49\u5e93\u914d\u5408\u4f7f\u7528\uff0c\u5b8c\u6210\u97f3\u9891\u7684\u9884\u5904\u7406\u548c\u540e\u7eed\u7684\u9891\u8c31\u5206\u6790\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pydub import AudioSegment<\/p>\n<h2><strong>\u52a0\u8f7d\u97f3\u9891\u6587\u4ef6<\/strong><\/h2>\n<p>audio = AudioSegment.from_file(&quot;audio_file.wav&quot;)<\/p>\n<h2><strong>\u5207\u5272\u97f3\u9891<\/strong><\/h2>\n<p>first_10_seconds = audio[:10000]  # \u53d6\u524d10\u79d2<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7Pydub\uff0c\u6211\u4eec\u53ef\u4ee5\u5bf9\u97f3\u9891\u8fdb\u884c\u5404\u79cd\u9884\u5904\u7406\u64cd\u4f5c\uff0c\u7136\u540e\u518d\u4f7f\u7528Librosa\u7b49\u5e93\u8fdb\u884c\u9891\u8c31\u5206\u6790\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u9891\u8c31\u5206\u6790<\/p>\n<\/p>\n<p><p>\u9891\u8c31\u5206\u6790\u662f\u6252\u8c31\u7684\u5173\u952e\u6b65\u9aa4\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5c06\u97f3\u9891\u4fe1\u53f7\u8f6c\u6362\u4e3a\u53ef\u89c6\u5316\u7684\u9891\u8c31\u56fe\uff0c\u4ece\u800c\u8bc6\u522b\u97f3\u7b26\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5feb\u901f\u5085\u91cc\u53f6\u53d8\u6362\uff08FFT\uff09<\/li>\n<\/ol>\n<p><p>\u5feb\u901f\u5085\u91cc\u53f6\u53d8\u6362\u662f\u4e00\u79cd\u9ad8\u6548\u7684\u7b97\u6cd5\uff0c\u7528\u4e8e\u8ba1\u7b97\u79bb\u6563\u5085\u91cc\u53f6\u53d8\u6362\uff08DFT\uff09\u3002\u5728\u97f3\u9891\u5904\u7406\u4e2d\uff0cFFT\u53ef\u4ee5\u5c06\u97f3\u9891\u4fe1\u53f7\u7684\u65f6\u95f4\u57df\u4fe1\u606f\u8f6c\u6362\u4e3a\u9891\u7387\u57df\u4fe1\u606f\uff0c\u4ece\u800c\u5206\u6790\u51fa\u4fe1\u53f7\u4e2d\u5404\u4e2a\u9891\u7387\u6210\u5206\u7684\u5e45\u5ea6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u5047\u8bbey\u662f\u97f3\u9891\u4fe1\u53f7<\/strong><\/h2>\n<p>y = np.random.randn(1024)<\/p>\n<h2><strong>\u8ba1\u7b97FFT<\/strong><\/h2>\n<p>fft_result = np.fft.fft(y)<\/p>\n<h2><strong>\u8ba1\u7b97\u9891\u7387<\/strong><\/h2>\n<p>freqs = np.fft.fftfreq(len(fft_result))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7FFT\uff0c\u6211\u4eec\u53ef\u4ee5\u83b7\u5f97\u97f3\u9891\u4fe1\u53f7\u7684\u9891\u7387\u6210\u5206\uff0c\u7136\u540e\u901a\u8fc7\u5206\u6790\u8fd9\u4e9b\u9891\u7387\u6210\u5206\u6765\u8bc6\u522b\u97f3\u7b26\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u9891\u8c31\u56fe<\/li>\n<\/ol>\n<p><p>\u9891\u8c31\u56fe\u662f\u4e00\u79cd\u53ef\u89c6\u5316\u5de5\u5177\uff0c\u5b83\u5c55\u793a\u4e86\u97f3\u9891\u4fe1\u53f7\u5728\u9891\u7387\u548c\u65f6\u95f4\u4e0a\u7684\u53d8\u5316\u3002\u901a\u8fc7\u9891\u8c31\u56fe\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u89c2\u5730\u770b\u5230\u97f3\u9891\u4fe1\u53f7\u4e2d\u5404\u4e2a\u97f3\u7b26\u7684\u9891\u7387\u548c\u65f6\u957f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<p>import librosa.display<\/p>\n<h2><strong>\u7ed8\u5236\u9891\u8c31\u56fe<\/strong><\/h2>\n<p>librosa.display.specshow(librosa.amplitude_to_db(spectrogram, ref=np.max),<\/p>\n<p>                         y_axis=&#39;mel&#39;, x_axis=&#39;time&#39;)<\/p>\n<p>plt.colorbar(format=&#39;%+2.0f dB&#39;)<\/p>\n<p>plt.title(&#39;Mel-frequency spectrogram&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u9891\u8c31\u56fe\uff0c\u6211\u4eec\u53ef\u4ee5\u8bc6\u522b\u51fa\u97f3\u9891\u4fe1\u53f7\u4e2d\u7684\u5404\u4e2a\u97f3\u7b26\uff0c\u5e76\u8fdb\u4e00\u6b65\u8fdb\u884c\u6252\u8c31\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u673a\u5668\u5b66\u4e60\u6280\u672f<\/p>\n<\/p>\n<p><p>\u968f\u7740\u673a\u5668\u5b66\u4e60\u6280\u672f\u7684\u53d1\u5c55\uff0c\u8d8a\u6765\u8d8a\u591a\u7684\u7814\u7a76\u5f00\u59cb\u4f7f\u7528\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u6765\u81ea\u52a8\u8bc6\u522b\u97f3\u9891\u4fe1\u53f7\u4e2d\u7684\u97f3\u7b26\u3002<\/p>\n<\/p>\n<ol>\n<li>\u795e\u7ecf\u7f51\u7edc<\/li>\n<\/ol>\n<p><p>\u795e\u7ecf\u7f51\u7edc\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u673a\u5668\u5b66\u4e60\u6a21\u578b\uff0c\u53ef\u4ee5\u7528\u4e8e\u590d\u6742\u6a21\u5f0f\u7684\u8bc6\u522b\u548c\u5206\u7c7b\u3002\u5728\u97f3\u9891\u5904\u7406\u9886\u57df\uff0c\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\uff08CNN\uff09\u548c\u5faa\u73af\u795e\u7ecf\u7f51\u7edc\uff08RNN\uff09\u5e38\u88ab\u7528\u4e8e\u97f3\u7b26\u7684\u8bc6\u522b\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u8bad\u7ec3\u6570\u636e\u96c6<\/li>\n<\/ol>\n<p><p>\u4e3a\u4e86\u8bad\u7ec3\u795e\u7ecf\u7f51\u7edc\u6a21\u578b\uff0c\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u5305\u542b\u5df2\u77e5\u97f3\u7b26\u7684\u8bad\u7ec3\u6570\u636e\u96c6\u3002\u8fd9\u4e9b\u6570\u636e\u96c6\u901a\u5e38\u7531\u5927\u91cf\u6807\u6ce8\u597d\u7684\u97f3\u9891\u6587\u4ef6\u7ec4\u6210\uff0c\u5176\u4e2d\u6bcf\u4e2a\u97f3\u9891\u6587\u4ef6\u90fd\u6807\u6ce8\u4e86\u5176\u5305\u542b\u7684\u97f3\u7b26\u4fe1\u606f\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li>\u6a21\u578b\u8bad\u7ec3<\/li>\n<\/ol>\n<p><p>\u5728\u83b7\u5f97\u8bad\u7ec3\u6570\u636e\u96c6\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u8bad\u7ec3\u795e\u7ecf\u7f51\u7edc\u6a21\u578b\u3002\u8bad\u7ec3\u8fc7\u7a0b\u4e2d\uff0c\u6a21\u578b\u4f1a\u4e0d\u65ad\u8c03\u6574\u5176\u53c2\u6570\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u8bc6\u522b\u97f3\u9891\u4fe1\u53f7\u4e2d\u7684\u97f3\u7b26\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u4e3a\u4e86\u63d0\u9ad8\u6252\u8c31\u7684\u51c6\u786e\u6027\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u591a\u79cd\u65b9\u6cd5\u7ed3\u5408\u8d77\u6765\u4f7f\u7528\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u5148\u4f7f\u7528Librosa\u8fdb\u884c\u97f3\u9891\u7684\u9884\u5904\u7406\u548c\u9891\u8c31\u5206\u6790\uff0c\u7136\u540e\u4f7f\u7528\u8bad\u7ec3\u597d\u7684\u795e\u7ecf\u7f51\u7edc\u6a21\u578b\u6765\u8bc6\u522b\u9891\u8c31\u56fe\u4e2d\u7684\u97f3\u7b26\u3002\u8fd9\u6837\u53ef\u4ee5\u5145\u5206\u5229\u7528\u5404\u4e2a\u65b9\u6cd5\u7684\u4f18\u52bf\uff0c\u5f97\u5230\u66f4\u51c6\u786e\u7684\u6252\u8c31\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u6311\u6218\u548c\u89e3\u51b3\u65b9\u6848<\/p>\n<\/p>\n<p><p>\u5c3d\u7ba1\u4f7f\u7528Python\u8fdb\u884c\u6252\u8c31\u6709\u5f88\u591a\u4f18\u52bf\uff0c\u4f46\u4ecd\u7136\u5b58\u5728\u4e00\u4e9b\u6311\u6218\uff0c\u5982\u80cc\u666f\u566a\u97f3\u3001\u548c\u5f26\u8bc6\u522b\u3001\u97f3\u7b26\u65f6\u957f\u5224\u65ad\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li>\u80cc\u666f\u566a\u97f3<\/li>\n<\/ol>\n<p><p>\u80cc\u666f\u566a\u97f3\u662f\u97f3\u9891\u5904\u7406\u4e2d\u7684\u5e38\u89c1\u95ee\u9898\uff0c\u5b83\u53ef\u80fd\u4f1a\u5e72\u6270\u97f3\u7b26\u7684\u8bc6\u522b\u3002\u4e3a\u4e86\u51cf\u5c0f\u566a\u97f3\u7684\u5f71\u54cd\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u9891\u8c31\u5206\u6790\u4e4b\u524d\u5bf9\u97f3\u9891\u8fdb\u884c\u964d\u566a\u5904\u7406\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u548c\u5f26\u8bc6\u522b<\/li>\n<\/ol>\n<p><p>\u548c\u5f26\u8bc6\u522b\u662f\u6252\u8c31\u4e2d\u7684\u4e00\u4e2a\u96be\u70b9\uff0c\u56e0\u4e3a\u548c\u5f26\u7531\u591a\u4e2a\u97f3\u7b26\u7ec4\u6210\uff0c\u9891\u8c31\u56fe\u4e2d\u53ef\u80fd\u4f1a\u51fa\u73b0\u9891\u7387\u91cd\u53e0\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u4ee5\u4f7f\u7528\u9ad8\u7ea7\u7684\u9891\u8c31\u5206\u6790\u6280\u672f\u6216\u8bad\u7ec3\u66f4\u590d\u6742\u7684\u795e\u7ecf\u7f51\u7edc\u6a21\u578b\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li>\u97f3\u7b26\u65f6\u957f\u5224\u65ad<\/li>\n<\/ol>\n<p><p>\u97f3\u7b26\u7684\u65f6\u957f\u5224\u65ad\u4e5f\u662f\u4e00\u4e2a\u6311\u6218\uff0c\u56e0\u4e3a\u9891\u8c31\u56fe\u4e2d\u901a\u5e38\u53ea\u663e\u793a\u9891\u7387\u4fe1\u606f\uff0c\u800c\u7f3a\u4e4f\u5bf9\u97f3\u7b26\u65f6\u957f\u7684\u76f4\u63a5\u63cf\u8ff0\u3002\u53ef\u4ee5\u7ed3\u5408\u97f3\u9891\u4fe1\u53f7\u7684\u5e45\u5ea6\u53d8\u5316\u6765\u63a8\u65ad\u97f3\u7b26\u7684\u65f6\u957f\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0d\u65ad\u5730\u5c1d\u8bd5\u548c\u4f18\u5316\uff0c\u6211\u4eec\u53ef\u4ee5\u514b\u670d\u8fd9\u4e9b\u6311\u6218\uff0c\u83b7\u5f97\u66f4\u51c6\u786e\u7684\u6252\u8c31\u7ed3\u679c\u3002\u4f7f\u7528Python\u53ca\u76f8\u5173\u6280\u672f\u8fdb\u884c\u6252\u8c31\uff0c\u662f\u4e00\u4e2a\u4e0d\u65ad\u63a2\u7d22\u548c\u5b66\u4e60\u7684\u8fc7\u7a0b\uff0c\u9700\u8981\u7ed3\u5408\u97f3\u9891\u5904\u7406\u3001\u9891\u8c31\u5206\u6790\u548c\u673a\u5668\u5b66\u4e60\u7b49\u591a\u65b9\u9762\u7684\u77e5\u8bc6\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u8fdb\u884c\u4e50\u8c31\u7684\u89e3\u6790\u548c\u63d0\u53d6\uff1f<\/strong><br \/>Python\u63d0\u4f9b\u4e86\u591a\u79cd\u5e93\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u89e3\u6790\u4e50\u8c31\u6587\u4ef6\u5e76\u63d0\u53d6\u97f3\u4e50\u4fe1\u606f\u3002\u5e38\u7528\u7684\u5e93\u5305\u62ecmusic21\u3001mido\u548cpretty_midi\u3002\u901a\u8fc7\u8fd9\u4e9b\u5e93\uff0c\u7528\u6237\u53ef\u4ee5\u8bfb\u53d6MIDI\u6587\u4ef6\uff0c\u5206\u6790\u97f3\u7b26\u3001\u8282\u62cd\u548c\u548c\u58f0\u7b49\u5143\u7d20\uff0c\u751a\u81f3\u53ef\u4ee5\u5c06\u4e50\u8c31\u8f6c\u6362\u4e3a\u4e0d\u540c\u683c\u5f0f\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u6709\u54ea\u4e9b\u5e93\u53ef\u4ee5\u5e2e\u52a9\u6211\u6252\u8c31\uff1f<\/strong><br \/>\u4e00\u4e9b\u6d41\u884c\u7684\u5e93\u5305\u62ecmusic21\u3001pretty_midi\u548cMido\u3002\u8fd9\u4e9b\u5e93\u5404\u6709\u7279\u70b9\uff0cmusic21\u975e\u5e38\u9002\u5408\u97f3\u4e50\u5b66\u7814\u7a76\uff0c\u63d0\u4f9b\u4e30\u5bcc\u7684\u97f3\u4e50\u5206\u6790\u5de5\u5177\uff1bpretty_midi\u5219\u4e13\u6ce8\u4e8e\u5904\u7406MIDI\u6587\u4ef6\uff0c\u9002\u5408\u5236\u4f5c\u548c\u5206\u6790\u97f3\u4e50\uff1b\u800cMido\u5219\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684MIDI\u5904\u7406\u5e93\uff0c\u9002\u5408\u5feb\u901f\u5f00\u53d1\u548c\u7b80\u5355\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5c06\u6252\u53d6\u7684\u4e50\u8c31\u8f6c\u6362\u4e3a\u53ef\u89c6\u5316\u7684\u683c\u5f0f\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528music21\u5e93\u5c06\u6252\u53d6\u7684\u4e50\u8c31\u8f6c\u6362\u4e3a\u53ef\u89c6\u5316\u683c\u5f0f\u3002\u901a\u8fc7\u8c03\u7528\u5176\u5185\u7f6e\u7684\u53ef\u89c6\u5316\u529f\u80fd\uff0c\u53ef\u4ee5\u751f\u6210\u4e50\u8c31\u7684\u56fe\u50cf\u6216PDF\u6587\u4ef6\u3002\u6b64\u5916\uff0c\u5176\u4ed6\u5de5\u5177\u5982LilyPond\u4e5f\u53ef\u4ee5\u4e0ePython\u7ed3\u5408\uff0c\u5229\u7528Python\u811a\u672c\u751f\u6210\u4e50\u8c31\u6587\u4ef6\uff0c\u4ece\u800c\u5b9e\u73b0\u9ad8\u8d28\u91cf\u7684\u97f3\u4e50\u6253\u5370\u8f93\u51fa\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u6252\u8c31\u7684\u65b9\u6cd5\u5305\u62ec\u97f3\u9891\u5904\u7406\u5e93\u7684\u5e94\u7528\u3001\u9891\u8c31\u5206\u6790\u3001\u673a\u5668\u5b66\u4e60\u6280\u672f\u7b49\u3002\u5176\u4e2d\uff0c\u9891\u8c31\u5206\u6790\u662f\u5173\u952e\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9 [&hellip;]","protected":false},"author":3,"featured_media":948913,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/948906"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=948906"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/948906\/revisions"}],"predecessor-version":[{"id":948914,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/948906\/revisions\/948914"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/948913"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=948906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=948906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=948906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}