{"action":"created","issue":{"url":"https://api.github.com/repos/Uberi/speech_recognition/issues/94","repository_url":"https://api.github.com/repos/Uberi/speech_recognition","labels_url":"https://api.github.com/repos/Uberi/speech_recognition/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/Uberi/speech_recognition/issues/94/comments","events_url":"https://api.github.com/repos/Uberi/speech_recognition/issues/94/events","html_url":"https://github.com/Uberi/speech_recognition/issues/94","id":138836408,"number":94,"title":"IOError: [Errno -9997] Invalid sample rate","user":{"login":"eragon898","id":17678441,"avatar_url":"https://avatars.githubusercontent.com/u/17678441?v=3","gravatar_id":"","url":"https://api.github.com/users/eragon898","html_url":"https://github.com/eragon898","followers_url":"https://api.github.com/users/eragon898/followers","following_url":"https://api.github.com/users/eragon898/following{/other_user}","gists_url":"https://api.github.com/users/eragon898/gists{/gist_id}","starred_url":"https://api.github.com/users/eragon898/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eragon898/subscriptions","organizations_url":"https://api.github.com/users/eragon898/orgs","repos_url":"https://api.github.com/users/eragon898/repos","events_url":"https://api.github.com/users/eragon898/events{/privacy}","received_events_url":"https://api.github.com/users/eragon898/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-03-06T20:51:59Z","updated_at":"2016-10-10T17:10:55Z","closed_at":null,"body":"I get this error when i run this command **python -m speech_recognition**  in the raspberry pi 2 terminal.  IOError: [Errno -9997] Invalid sample rate. Here is the full log:\r\n\r\nA moment of silence, please...\r\nALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'\r\nALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory\r\nALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side\r\nALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'\r\nALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory\r\nALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21\r\nALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'\r\nALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory\r\nALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21\r\nALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'\r\nALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory\r\nALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40\r\nALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'\r\nALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory\r\nALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41\r\nALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'\r\nALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory\r\nALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50\r\nALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'\r\nALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory\r\nALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51\r\nALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'\r\nALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory\r\nALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71\r\nALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'\r\nALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory\r\nALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958\r\nALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'\r\nALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory\r\nALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif\r\nALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'\r\nALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory\r\nALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline\r\nALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline\r\nALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave\r\nCannot connect to server socket err = No such file or directory\r\nCannot connect to server request channel\r\njack server is not running or cannot be started\r\nExpression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2048\r\nExpression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2719\r\nExpression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2843\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/runpy.py\", line 162, in _run_module_as_main\r\n    \"__main__\", fname, loader, pkg_name)\r\n  File \"/usr/lib/python2.7/runpy.py\", line 72, in _run_code\r\n    exec code in run_globals\r\n  File \"/usr/local/lib/python2.7/dist-packages/speech_recognition/__main__.py\", line 8, in <module>\r\n    with m as source: r.adjust_for_ambient_noise(source)\r\n  File \"/usr/local/lib/python2.7/dist-packages/speech_recognition/__init__.py\", line 114, in __enter__\r\n    input = True, # stream is an input stream\r\n  File \"/usr/local/lib/python2.7/dist-packages/pyaudio.py\", line 750, in open\r\n    stream = Stream(self, *args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/pyaudio.py\", line 441, in __init__\r\n    self._stream = pa.open(**arguments)\r\nIOError: [Errno -9997] Invalid sample rate"},"comment":{"url":"https://api.github.com/repos/Uberi/speech_recognition/issues/comments/252681741","html_url":"https://github.com/Uberi/speech_recognition/issues/94#issuecomment-252681741","issue_url":"https://api.github.com/repos/Uberi/speech_recognition/issues/94","id":252681741,"user":{"login":"Gusbenz","id":12821230,"avatar_url":"https://avatars.githubusercontent.com/u/12821230?v=3","gravatar_id":"","url":"https://api.github.com/users/Gusbenz","html_url":"https://github.com/Gusbenz","followers_url":"https://api.github.com/users/Gusbenz/followers","following_url":"https://api.github.com/users/Gusbenz/following{/other_user}","gists_url":"https://api.github.com/users/Gusbenz/gists{/gist_id}","starred_url":"https://api.github.com/users/Gusbenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gusbenz/subscriptions","organizations_url":"https://api.github.com/users/Gusbenz/orgs","repos_url":"https://api.github.com/users/Gusbenz/repos","events_url":"https://api.github.com/users/Gusbenz/events{/privacy}","received_events_url":"https://api.github.com/users/Gusbenz/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T17:10:55Z","updated_at":"2016-10-10T17:10:55Z","body":"@Uberi the above worked for me. Thank you!"}}
{"actor":{"display_login":"Gusbenz"}}