如何用茱莉亚语言播放任何波形的音频? [英] How to play any waveform's audio in julia language?

查看:66
本文介绍了如何用茱莉亚语言播放任何波形的音频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个长度为5秒的正弦曲线,如下所示:

I have a sinusoid with length 5 seconds as below:

x=sin(0:.01:2*pi*500*5);

现在,我想通过发出类似以下的命令来听到此波形的音频:

Now I would like to hear the audio of this waveform by giving a command similar as below:

playsound(x,samplingfrequency);

如果我可以将此音频数据写入wav或mp3文件,这对我很有用.此功能需要什么库以及julia中的等效命令?

It will be useful for me if I could write this audio data to a wav or mp3 file. What is the library needed and the equivalent command in julia for this functionality?

推荐答案

您可以使用 https:/播放音频/github.com/ssfrr/AudioIO.jl

要进行读写,请 https://github. com/JuliaLang/Sound.jl/blob/master/src/Sound.jl

但是,这两个模块目前都处于早期阶段.

However at this time both modules are in early stage.

这篇关于如何用茱莉亚语言播放任何波形的音频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆