如何在Python中将MP3转换为WAV [英] How to convert MP3 to WAV in Python

查看:1001
本文介绍了如何在Python中将MP3转换为WAV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有MP3文件,如何将其转换为WAV文件? (最好使用纯python方法)

If I have an MP3 file how can I convert it to a WAV file? (preferably, using a pure python approach)

推荐答案

在sbery2A答案的评论中,您说过要在Google App Engine中添加MP3解码功能.

In a comment on sbery2A's answer, you said you want to put an MP3 decoding feature into Google App Engine.

您唯一的希望是使用Python将MP3数据发送到另一台服务器,并在该服务器上进行MP3解码,然后将解码后的数据发送回App Engine服务器. Google不会通过在服务器上实际执行MP3解码来让您在App Engine服务器的CPU上加重负担. Google还禁止您运行任何C代码;请参阅App Engine常见问题解答.甚至不允许您生成子流程或使用Python线程.

Your only possible hope is to use Python to send the MP3 data to another server, and do the MP3 decode on that server, and then send the decoded data back to the App Engine server. Google isn't going to let you put heavy load on the CPUs of the App Engine servers by doing the MP3 decode actually on the server. Google also prevents you from running any C code; see the App Engine FAQ. You aren't even allowed to spawn sub-processes or use Python threading.

App Engine确实具有Java API.我刚刚检查并发现了 Java MP3解码器,它是LGPL,所以您不需要不必担心许可证.

App Engine does have a Java API. I just checked and found a Java MP3 decoder, and it is LGPL so you don't have to worry much about the license.

我不知道是否有任何方法可以从App Engine中的Python代码中调用Java代码,但是您可以尝试研究一下.

I don't know if there is any way to call Java code from Python code in App Engine, but you might try looking into that.

这篇关于如何在Python中将MP3转换为WAV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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