用 PyDub 匯入音訊檔
本練習屬於課程
Python 的口語語言處理
練習說明
- 從
pydub匯入AudioSegment。 - 呼叫
from_file方法,並傳入音訊檔的路徑名稱。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Import AudioSegment from Pydub
from pydub import ____
# Create an AudioSegment instance
wav_file = AudioSegment.____(file=____,
format="wav")
# Check the type
print(type(wav_file))