用 Python 處理音訊資料
本練習屬於課程
Python 的口語語言處理
練習說明
- 設定標題,讓它能反映這張圖的內容。
- 將
good_afternoon的時間變數(time_ga)與振幅變數(soundwave_ga)加入圖中。 - 以同樣方式,將
good_morning的時間變數(time_gm)與振幅變數(soundwave_gm)加入圖中。 - 將 alpha 參數設定為
0.5。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Setup the title and axis titles
plt.title('Good Afternoon vs. Good ____')
plt.ylabel('Amplitude')
plt.xlabel('Time (seconds)')
# Add the Good Afternoon data to the plot
plt.plot(____, ____, label='Good Afternoon')
# Add the Good Morning data to the plot
plt.plot(____, ____, label='Good Morning',
# Set the alpha variable to 0.5
alpha=____)
plt.legend()
plt.show()