spatialaudio / python-sounddevice

:sound: Play and Record Sound with Python :snake:
https://python-sounddevice.readthedocs.io/
MIT License
982 stars 145 forks source link

Is it possible to use it for android? #381

Open inheekwak opened 2 years ago

inheekwak commented 2 years ago

I'm making an android app that detects car sounds and classifies them.

For the ML part, I'm using PyTorch and I'm planning to use it to get input from outside. But, in documents, it is working in Windows, Mac, and Linux. there were not any talks about mobile devices.

Thus, I wonder I can use it for mobile devices too. because I couldn't use pyaudio for android. Thus, I worry about that I face same problems again:(

mgeier commented 2 years ago

Thus, I worry about that I face same problems again:(

Yes, sadly, you will have the same problems.

The sounddevice module is a wrapper aound the PortAudio library, just like PyAudio is. As long as Android isn't supported in PortAudio, it won't be supported in any of its wrappers.

https://github.com/PortAudio/portaudio/issues/154 https://github.com/PortAudio/portaudio/pull/638

ignamendi21 commented 1 year ago

How record audio then?