[英]waveplay equivalent command in python
我的 MATLAB 代碼是:
x=wavread('C:\Users\dell\Desktop\Rabia Ahmad spring 2016\FYP\1. Matlab Work\record work\Recording.wav',58368);
wavplay(x,58368)
它在 Python 中的等效代碼是:
x= sio.loadmat('C:\\Users\\dell\\Desktop\\Rabia Ahmad spring 2016\\FYP\\1. Matlab Work\\record work\\Recording.mat')['Recording']
我只想知道Python 中的wavplay 等效命令是什么,以便我可以播放我的文件?
有多種工具可以在 Python 中播放聲音。 最直接的等價物是sounddevice包中的play
方法。
加載文件的最簡單方法是使用soundfile包中的read
方法。
另請注意,幾年前從 MATLAB 中刪除了wavread
和wavplay
。 它們在最新版本的 MATLAB 中不再存在。 我掛的功能是比較通用的函數/方法相當於audioread
和audioplayer.play
功能/那替換方法wavread
和wavplay
幾年前在MATLAB。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.