There is no python-for-android recipe available for Pyaudio

Viewed 418

I have just lost hope on the speech recognition in Kivy for creating an APK with Buildozer. But when we use speech recognition in a Kivy code and build the APK with Buildozer. During building it gives error for PyAudio and port audio, So i have browsed the issue over the forums, in the conclusion i found out that their is no recipe available for PyAudio so I made it with dependencies i.e Portaudio and then I tried running the building process again. And I got error, I tried modifying the recipe in different ways but I didn't got any kind of progress. I don't know what to do further.

Here is the code for recipe:

from pythonforandroid.toolchain import PythonRecipe
from os.path import exists, join



class PyAudio(PythonRecipe):

    site_packages_name = 'Pyaudio'
    version = '0.2.11'
    url = 'http://example.com/example-{version}.tar.gz'


    depends = ['python3', 'portaudio']  




recipe = PyAudio()

I also tried applying patch as i founded it on the forums that patch should be applied but it didn't worked for me.

setup.patch:

diff --git setup.py setup.py
index b55c6ac..b6d6d62 100644
--- setup.py
+++ setup.py
@@ -52,7 +52,7 @@ if "--static-link" in sys.argv:
     STATIC_LINKING = True
     sys.argv.remove("--static-link")

-portaudio_path = os.environ.get("PORTAUDIO_PATH", "./portaudio-v19")
+portaudio_path = os.environ.get("PORTAUDIO_PATH")
 mac_sysroot_path = os.environ.get("SYSROOT_PATH", None)

 pyaudio_module_sources = ['src/_portaudiomodule.c']
@@ -66,7 +66,7 @@ defines = []

 if STATIC_LINKING:
     extra_link_args = [
-        os.path.join(portaudio_path, 'lib/.libs/libportaudio.a')
+        os.path.join(portaudio_path, 'lib/libportaudio.a')
     ]
     include_dirs = [os.path.join(portaudio_path, 'include/')]
 else:

This code I got from this link https://github.com/ContinuumIO/anaconda-recipes/tree/master/pyaudio

And I am totally new in working with Buildozer, but still I think this one is the big issue. After running this it gives me error:

This image file contains the screen shot of the error occurrence:

This image file contains the screen shot of the error occurrence

0 Answers
Related