{"action":"created","issue":{"url":"https://api.github.com/repos/Picovoice/Porcupine/issues/27","repository_url":"https://api.github.com/repos/Picovoice/Porcupine","labels_url":"https://api.github.com/repos/Picovoice/Porcupine/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/Picovoice/Porcupine/issues/27/comments","events_url":"https://api.github.com/repos/Picovoice/Porcupine/issues/27/events","html_url":"https://github.com/Picovoice/Porcupine/issues/27","id":327885178,"node_id":"MDU6SXNzdWUzMjc4ODUxNzg=","number":27,"title":"python demo crashed","user":{"login":"fquirin","id":18550513,"node_id":"MDQ6VXNlcjE4NTUwNTEz","avatar_url":"https://avatars3.githubusercontent.com/u/18550513?v=4","gravatar_id":"","url":"https://api.github.com/users/fquirin","html_url":"https://github.com/fquirin","followers_url":"https://api.github.com/users/fquirin/followers","following_url":"https://api.github.com/users/fquirin/following{/other_user}","gists_url":"https://api.github.com/users/fquirin/gists{/gist_id}","starred_url":"https://api.github.com/users/fquirin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fquirin/subscriptions","organizations_url":"https://api.github.com/users/fquirin/orgs","repos_url":"https://api.github.com/users/fquirin/repos","events_url":"https://api.github.com/users/fquirin/events{/privacy}","received_events_url":"https://api.github.com/users/fquirin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-05-30T20:23:38Z","updated_at":"2018-06-01T17:28:55Z","closed_at":null,"author_association":"NONE","body":"### Expected behavior\r\nThe python demo keeps running until I quit it.\r\n### Actual behavior\r\nThe demo crashed with following error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"demo/python/porcupine_demo.py\", line 207, in <module>\r\n    input_device_index=args.input_audio_device_index).run()\r\n  File \"demo/python/porcupine_demo.py\", line 104, in run\r\n    pcm = audio_stream.read(porcupine.frame_length)\r\n  File \"/usr/lib/python2.7/dist-packages/pyaudio.py\", line 608, in read\r\n    return pa.read_stream(self._stream, num_frames, exception_on_overflow)\r\nIOError: [Errno -9981] Input overflowed\r\n\r\n```\r\n### Steps to reproduce the behavior\r\nStart the demo on a Rasperry PI Zero with ReSpeaker 2-Mic-HAT with following settings:\r\n\r\n`python demo/python/porcupine_demo.py --keyword_file_paths ./resources/keyword_files/grasshopper_raspberrypi.ppn --library_path ./lib/raspberry-pi/arm11/libpv_porcupine.so --input_audio_device_index 2\r\n`\r\n\r\nOS is Raspbian Stretch Lite.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Picovoice/Porcupine/issues/comments/393951377","html_url":"https://github.com/Picovoice/Porcupine/issues/27#issuecomment-393951377","issue_url":"https://api.github.com/repos/Picovoice/Porcupine/issues/27","id":393951377,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Mzk1MTM3Nw==","user":{"login":"fquirin","id":18550513,"node_id":"MDQ6VXNlcjE4NTUwNTEz","avatar_url":"https://avatars3.githubusercontent.com/u/18550513?v=4","gravatar_id":"","url":"https://api.github.com/users/fquirin","html_url":"https://github.com/fquirin","followers_url":"https://api.github.com/users/fquirin/followers","following_url":"https://api.github.com/users/fquirin/following{/other_user}","gists_url":"https://api.github.com/users/fquirin/gists{/gist_id}","starred_url":"https://api.github.com/users/fquirin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fquirin/subscriptions","organizations_url":"https://api.github.com/users/fquirin/orgs","repos_url":"https://api.github.com/users/fquirin/repos","events_url":"https://api.github.com/users/fquirin/events{/privacy}","received_events_url":"https://api.github.com/users/fquirin/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T17:28:55Z","updated_at":"2018-06-01T17:28:55Z","author_association":"NONE","body":"I'm still having some crashes from time to time but they appear in a much more irregular pattern :-( It was running for 5h fine then crashed then crashed after 10min again then ran fine again until I quit manually.\r\n\r\nJust a quick question, when we replace `frames_per_buffer=...` what do we do with the lines:\r\n```\r\n while True:\r\n                pcm = audio_stream.read(porcupine.frame_length)\r\n                pcm = struct.unpack_from(\"h\" * porcupine.frame_length, pcm)\r\n```\r\nLeave them or change them too? \r\nI've tried to change them too on my Raspberry Pi Zero which seems to lead to no detection anymore."}}
{"actor":{"display_login":"fquirin"}}