kivy / kivy-ios

Toolchain for compiling Python / Kivy / other libraries for iOS
https://kivy.org/docs/guide/packaging-ios.html
MIT License
758 stars 237 forks source link

More functionality related to audio/sound #851

Open CoderCoderCoder opened 10 months ago

CoderCoderCoder commented 10 months ago

Is your feature request related to a problem? Please describe. I am trying to achieve a functionality of a sound playback with 50% speed. The best solution, which I found, was to use AudioSegment from the "pydub" package, combined with some "numpy" functions and "pyrubberband" (which uses internally soundfile package). This all works fine on MacOS, but on iOS devices I get multiple issues: 1) import pydub ends with an error related to POpen (which is related to multitasking as I understood), even though I added ffmpeg recipe 2) "soundfile" contains a dynamic library, which violates the Apple policy, so this package currently can't be included, therefore also "pyrubberband" can't be included (and anyway I am not sure if "pyrubberband" would work on iOS devices, because it actually requires the "rubberband" system library, which can be install through "brew" on MacOS)

Describe the solution you'd like A library which would allow for: 1) reading and writing MP3 and WAV files on IOS (including converting between these formats) 2) a library, which would allow to modify sound files in terms of their playback speed (in both ways - slower and faster)

Describe alternatives you've considered I experimented with all possible packages - wave, soundfile, numpy, pydub, pyrubberband, kivy.core.audio. By far the best solution is the one as I described above in terms of sound quality. I could not get "audiostream" (https://audiostream.readthedocs.io) to be built on my MacOS, so I can't say anything in regard to this package. But this library/package seems to be very old and not maintained at all.

Please think about enriching kivy.core.audio with the aforementioned functionality on all platforms or about making the packages/libraries mentioned above iOS-compatible within kivy-ios. Many thanks!