{"action":"created","issue":{"url":"https://api.github.com/repos/Uberi/speech_recognition/issues/235","repository_url":"https://api.github.com/repos/Uberi/speech_recognition","labels_url":"https://api.github.com/repos/Uberi/speech_recognition/issues/235/labels{/name}","comments_url":"https://api.github.com/repos/Uberi/speech_recognition/issues/235/comments","events_url":"https://api.github.com/repos/Uberi/speech_recognition/issues/235/events","html_url":"https://github.com/Uberi/speech_recognition/issues/235","id":233343075,"number":235,"title":"AttributeError: Could not find PyAudio; check installation","user":{"login":"sanster9292","id":11487696,"avatar_url":"https://avatars2.githubusercontent.com/u/11487696?v=4","gravatar_id":"","url":"https://api.github.com/users/sanster9292","html_url":"https://github.com/sanster9292","followers_url":"https://api.github.com/users/sanster9292/followers","following_url":"https://api.github.com/users/sanster9292/following{/other_user}","gists_url":"https://api.github.com/users/sanster9292/gists{/gist_id}","starred_url":"https://api.github.com/users/sanster9292/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanster9292/subscriptions","organizations_url":"https://api.github.com/users/sanster9292/orgs","repos_url":"https://api.github.com/users/sanster9292/repos","events_url":"https://api.github.com/users/sanster9292/events{/privacy}","received_events_url":"https://api.github.com/users/sanster9292/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-06-03T04:07:50Z","updated_at":"2017-09-12T06:00:08Z","closed_at":null,"author_association":"NONE","body":"Steps to reproduce\r\n------------------\r\n\r\nHey I am just getting started with speech recignition and i was just checking some basic examples that i had found \r\n It was nothing too complicated, very simple things  \r\nThe code i am using is below : \r\n\r\n```python\r\nimport speech_recognition as sr\r\n\r\n# Record Audio\r\nr = sr.Recognizer()\r\nwith sr.Microphone() as source:\r\n    print(\"Say something!\")\r\n    audio = r.listen(source)\r\n \r\n# Speech recognition using Google Speech Recognition\r\ntry:\r\n    # for testing purposes, we're just using the default API key\r\n    # to use another API key, use `r.recognize_google(audio, key=\"GOOGLE_SPEECH_RECOGNITION_API_KEY\")`\r\n    # instead of `r.recognize_google(audio)`\r\n    print(\"You said: \" + r.recognize_google(audio))\r\nexcept sr.UnknownValueError:\r\n    print(\"Google Speech Recognition could not understand audio\")\r\nexcept sr.RequestError as e:\r\n    print(\"Could not request results from Google Speech Recognition service; {0}\".format(e))\r\n```\r\nExpected behaviour\r\n\r\nI expect it to just use my microphone and let me record something. \r\n------------------\r\n\r\n(What did you expect to happen?)\r\n\r\nActual behaviour\r\n\r\nThis is the error i get, \r\n```Could not import the PyAudio C module '_portaudio'.\r\nTraceback (most recent call last):\r\n\r\n  File \"<ipython-input-9-2b39d94ceb5b>\", line 1, in <module>\r\n    runfile('/home/sanwal092/Desktop/Python/SR/dummy.py', wdir='/home/sanwal092/Desktop/Python/SR')\r\n\r\n  File \"/home/sanwal092/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py\", line 866, in runfile\r\n    execfile(filename, namespace)\r\n\r\n  File \"/home/sanwal092/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py\", line 102, in execfile\r\n    exec(compile(f.read(), filename, 'exec'), namespace)\r\n\r\n  File \"/home/sanwal092/Desktop/Python/SR/dummy.py\", line 14, in <module>\r\n    with sr.Microphone() as source:\r\n\r\n  File \"/home/sanwal092/anaconda3/lib/python3.6/site-packages/speech_recognition/__init__.py\", line 78, in __init__\r\n    self.pyaudio_module = self.get_pyaudio()\r\n\r\n  File \"/home/sanwal092/anaconda3/lib/python3.6/site-packages/speech_recognition/__init__.py\", line 109, in get_pyaudio\r\n    raise AttributeError(\"Could not find PyAudio; check installation\")\r\n\r\nAttributeError: Could not find PyAudio; check installation\r\n```\r\n\r\nWhen i run import pyauaudio as p;print(p.__version__)\"`.) to  check the version of pyaudio installed, i get the following error instead of the library working. \r\n```\r\nCould not import the PyAudio C module '_portaudio'.\r\nTraceback (most recent call last):\r\n\r\n  File \"<ipython-input-11-b37da17f237b>\", line 1, in <module>\r\n    import pyaudio\r\n\r\n  File \"/home/sanwal092/pyaudio/build/lib.linux-x86_64-2.7/pyaudio.py\", line 116, in <module>\r\n    import _portaudio as pa\r\n\r\n  ImportError: /home/sanwal092/pyaudio/build/lib.linux-x86_64-2.7/_portaudio.so: undefined symbol: _Py_ZeroStruct\r\n```\r\n----------------\r\n\r\n(What happened instead? How is it different from what you expected?)\r\nI am not sure  where the error is coming from. It must have something to do with my compilation of the libray maybe and i am not sure what to do from here on. Anyhelp would be appreciated\r\n```\r\n(If the library threw an exception, paste the full stack trace here)\r\n```\r\n\r\nSystem information\r\n------------------\r\n\r\n(Delete all the statements that don't apply.)\r\n\r\nMy **system** is Ubuntu 16.04 LTS x64\r\n\r\nMy **Python version** is Python 3.6.0 :: Anaconda 4.3.1 (64-bit)\r\n\r\nMy **Pip version** is pip 9.0.1 \r\n\r\nMy **SpeechRecognition library version** is 3.6.5\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Uberi/speech_recognition/issues/comments/328746063","html_url":"https://github.com/Uberi/speech_recognition/issues/235#issuecomment-328746063","issue_url":"https://api.github.com/repos/Uberi/speech_recognition/issues/235","id":328746063,"user":{"login":"esterrrg","id":31872882,"avatar_url":"https://avatars2.githubusercontent.com/u/31872882?v=4","gravatar_id":"","url":"https://api.github.com/users/esterrrg","html_url":"https://github.com/esterrrg","followers_url":"https://api.github.com/users/esterrrg/followers","following_url":"https://api.github.com/users/esterrrg/following{/other_user}","gists_url":"https://api.github.com/users/esterrrg/gists{/gist_id}","starred_url":"https://api.github.com/users/esterrrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esterrrg/subscriptions","organizations_url":"https://api.github.com/users/esterrrg/orgs","repos_url":"https://api.github.com/users/esterrrg/repos","events_url":"https://api.github.com/users/esterrrg/events{/privacy}","received_events_url":"https://api.github.com/users/esterrrg/received_events","type":"User","site_admin":false},"created_at":"2017-09-12T06:00:08Z","updated_at":"2017-09-12T06:00:08Z","author_association":"NONE","body":"Hi I have installed Pyaudio already, but found it under python 3.4 package library, but the one i am using is anaconda3, python 3.5. How can I install it in a way that it will be inside the python3.5 interpreter?"}}
{"actor":{"display_login":"esterrrg"}}