[英]waveplay equivalent command in python
My MATLAB code is:我的 MATLAB 代码是:
x=wavread('C:\Users\dell\Desktop\Rabia Ahmad spring 2016\FYP\1. Matlab Work\record work\Recording.wav',58368);
wavplay(x,58368)
Its equivalent code in Python is:它在 Python 中的等效代码是:
x= sio.loadmat('C:\\Users\\dell\\Desktop\\Rabia Ahmad spring 2016\\FYP\\1. Matlab Work\\record work\\Recording.mat')['Recording']
all I want to know is what is the wavplay equivalent command in Python so that I can play my file?我只想知道Python 中的wavplay 等效命令是什么,以便我可以播放我的文件?
There are various tools for playing sound in Python.有多种工具可以在 Python 中播放声音。 The most direct equivalent is the
play
method in the sounddevice package.最直接的等价物是sounddevice包中的
play
方法。
The easiest way to load the file is with read
method in the soundfile package.加载文件的最简单方法是使用soundfile包中的
read
方法。
Also note that wavread
and wavplay
were removed from MATLAB several years ago.另请注意,几年前从 MATLAB 中删除了
wavread
和wavplay
。 They no longer exist in recent version of MATLAB.它们在最新版本的 MATLAB 中不再存在。 The functions I linked to are more generic functions/methods equivalent to the
audioread
and audioplayer.play
functions/methods that replaced wavread
and wavplay
in MATLAB several years ago.我挂的功能是比较通用的函数/方法相当于
audioread
和audioplayer.play
功能/那替换方法wavread
和wavplay
几年前在MATLAB。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.