GSM编码的WAV文件在浏览器中 [英] GSM encoded WAV files in browser
问题描述
美好的一天!
我使用Ruby-on-Rails和Jquery开发网站。该站点具有在浏览器窗口中播放来自IVR系统的文件的功能,无需下载。这些文件采用非PCM WAV格式,完全是GSM格式。所以我不能使用标准的音频标签解决方案。我试图使用一些额外的JS库,比如audio.js和howler.js,但没有运气。
I develop a website using Ruby-on-Rails and Jquery. This site has a feature to play files from an IVR system right in browser window, without downloading it. These files are in non-PCM WAV format, exactly GSM format. So I can't use standard audio tag solution. I tried to use some additional JS libraries, like audio.js and howler.js, but no luck.
在现代浏览器中,我应该使用什么来播放这些文件?我想,有这个问题的解决方案,但我找不到它。
感谢您的帮助!
What should I use to play these files in modern browsers? I think, that there are solutions of this problem, but I can't find it.
Thanks for your help!
推荐答案
由于任何浏览器都不支持GSM( 查看此表)您需要先转换它。
Since GSM is not supported on any browser ( see this table) you will need to convert it before.
现在您有两个选项,您可以即时转换或转换您已有的任何文件,并在创建时转换新文件。
Now you have two options, you can convert on-the-fly or convert any files you already have and will converting the new ones as they are created.
您可以使用ffmpeg来完成这项工作,使用 streamio-ffmpeg宝石或者您也可以找到适合该工作的SaaS解决方案。
You can use ffmpeg to do the job, with streamio-ffmpeg gem or you can also find a SaaS solution for the job.
这篇关于GSM编码的WAV文件在浏览器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!