python - 在 Cygwin 中使用 Python 播放 .wav 文件

标签 python cygwin

我需要使用 Cygwin 中的 Python 脚本播放存储在我的 PC 上的 .wav 文件。

请问这是否可行?如果是这样,请提供可从 Cygwin 使用的 Python 脚本代码的指针等。我正在 64 位 Windows 7 计算机上工作。

这就是我到目前为止所做的。

  • 从 cygwin 网站下载并安装 setup-x86_64.exe。
  • 作为 Cygwin 的一部分安装的软件包:make、gcc、g++、git、ssh、sox、python ver >= 2.7、curl、wget

请提供有关如何使用 Cygwin 中的 Python(版本 >= 2.7)播放 .wav 文件的建议。

最佳答案

尝试 os.system("cat/path/foo.wav >/dev/dsp")

您需要先安装 Cygwin 的音频包。

关于python - 在 Cygwin 中使用 Python 播放 .wav 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20948650/

相关文章:

python - INFO : Crawled 0 pages (at 0 pages/min), 抓取了 0 件元素(0 件/分钟)

c++ - Cygwin 与 Linux 下 g++ 创建的可执行文件的默认文件扩展名

cygwin 上使用 FD_SET() 和消息队列进行核心转储

c - 为什么我的 calloc 无法将所有内容清零?

python - 如何使用 boto 以编程方式检查 Amazon S3 权限?

python - NumPy 不会在 Win7 的 Python 3.4.0 中安装

Cygwin错误: "-bash: fork: retry: Resource temporarily unavailable"

windows - 通过 Cygwin 运行 Windows .EXE 本质上比通过 BAT 运行更慢吗?

python - 为什么只打印横幅,并在结果上挂起/超时? --Python3(套接字,sys)

python - python 错误的 cython 包装器中的 AttributeError