Open f3ndot opened 10 months ago
This is something that has been on the back of my mind since the announcement. I hadn't had a chance to look for an alternative as of yet, but pydub is likely a very good choice. I'll look into it a bit further.
Looking at that thread @aerilox mentioned that lin2alaw and lin2ulaw (and back again) are not supported in pydub's alternative to audioop. I'll have to do some more looking to see if pydub itself supports these functions, but this is unfortunate.
I know it's not going to happen at this point, but I wish CPython would cancel this depreciation. It seems to me they did not get a large enough sample from the entire community when making these deprecation decisions. I remember reading that the PSF found that very few people use audioop
and so they decided to deprecate it. They also intended to deprecate wave
but many teachers stated this library was useful for teaching students about programming. If I recall, the article stated that there were alternatives around the ecosystem, yet they never linked to any of them, and I've yet to find a suitable replacement.
I understand the PSF's intention is to make stdlib smaller for the maintainers of CPython, and with that in mind, I wish they would make an official audioop
package under the @psf organization that we can install after 3.13 and allow the open source community to maintain it.
Thanks tayler6000 for stepping in again. audioop and wave are very useful even for professional applications. We make a lot of use of them, even for low rate real time voice processing they are more than enough. I am sure there are more than a few users that appreciate their straight forward approach. Education is one of them, too. It would be a pity to lose them.
pip install audioop-lts It works for me, python 3.13
Per the Python docs on the
audioop
module, the module is deprecated and will be removed in Python 3.13. Seeing that pyVoIP makes liberal use of the audio manipulation functions, there should be a proactive move to some sort of library that does what is needed.This issue represents both finding a suitable replacement and then implementing it.
The pydub project seemingly wrote a pure Python equivalent/replacement in their codebase: https://github.com/jiaaro/pydub/issues/725#issuecomment-1681998838