Options for audio input into Kivy?
Question: I saw from [here](http://kivy.org/docs/api-kivy.core.audio.html) that
"Recording audio is not supported" in kivy. Some googling told me that [there
is some work being done on this](https://groups.google.com/forum/#!topic/kivy-
users/LsEuwhuKQek), but nothing looked conclusive or settled.

I'm wondering how people work around this, especially for Ubuntu or Android.

If there are other solutions, I'm just plain looking for something that would
let me code in python and produce something like a visualizer that runs on
android and ubuntu, and allows multi-touch input--whatever modifications I
have to make to keep a reasonably centralized codebase across the 2 platforms.
Kivy looked like a solution, but this audio problem seem to be hamstringing.


Answer: `Audiostream` mentioned in link you've found has an
[example](http://audiostream.readthedocs.org/en/latest/) of reading bytes from
microphone. You can find examples of integration with kivy
[here](https://github.com/kivy/audiostream/tree/master/examples). For Ubuntu
you can try [PyAudio](http://people.csail.mit.edu/hubert/pyaudio/). See this
[example](http://stackoverflow.com/questions/4160175/detect-tap-with-pyaudio-
from-live-mic/4160733#4160733). In your kivy application you can detect system
through code like:

    
    
    from kivy.utils import platform
    
    def do_smth(self):
        p = platform()
        if p == 'android':
            # ... 
        elif p == 'ios':
            # ...
        elif p == 'win':
            # ...
        elif p == 'macosx':
            # ...
        else
            # linux
    

It looks like you need to handle sound input separately but you can have rest
of the code common for both platforms.

