简体   繁体   English

使用 python 或 php 处理音频文件

[英]Processing audio file with python or php

I'm trying to find a library for Php or Python that could process audio files.我正在尝试为 Php 或 Python 找到一个可以处理音频文件的库。 I need to loop through recorded phone calls and process them to remove those that have some specific pattern eg beep tone only instead of human voice.我需要遍历录制的电话并对其进行处理以删除那些具有某些特定模式的电话,例如仅发出哔哔声而不是人声。 I think it would be possible by comparing samples of amplitudes in audio file.我认为可以通过比较音频文件中的振幅样本来实现。 Are there any libraries you know of that could help?您知道有哪些图书馆可以提供帮助吗?

Thanks!谢谢!

Python comes with the standard library wave module that can load and parse.wav files; Python自带标准库wave模块,可以加载解析.wav文件; detecting beep tones is probably a little harder than you think, but not prohibitively difficult.检测蜂鸣音可能比您想象的要难一些,但也不是特别困难。

Audiolab is a python library which can load AIFF, AU and WAV files directly into a numpy array. Audiolab是一个 python 库,可以将 AIFF、AU 和 WAV 文件直接加载到numpy数组中。

It is likely that audio containing only beep tones will have a fairly simple power spectrum , which can be obtained from the audio array using numpy.fft .仅包含蜂鸣音的音频很可能具有相当简单的功率谱,可以使用numpy.fft从音频数组中获得。

Someone recommends me the pyaudiere , it can "pass sound buffers as NumPy arrays of float32's".有人向我推荐pyaudiere ,它可以“将声音缓冲区传递为 float32 的 NumPy arrays”。 I never used it before, you may give it a go.我以前没用过,你可以给它一个go。

I used to use pymad , it might be a little old buy very handy.我以前用过pymad ,它可能有点老了买起来很方便。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM