{"action":"created","comment":{"url":"https://api.github.com/repos/fossasia/susi_android/pulls/comments/93780120","pull_request_review_id":14316160,"id":93780120,"diff_hunk":"@@ -1116,5 +1138,107 @@ public void run() {\n             computeOtherMessage();\n         }\n     }\n+    private class hotwordRecognizer implements Runnable,RecognitionListener {\n+\n+        @Override\n+        public void run() {\n+            new AsyncTask<Void, Void, Exception>() {\n+                @Override\n+                protected Exception doInBackground(Void... params) {\n+                    try {\n+                        Assets assets = new Assets(MainActivity.this);\n+                        File assetDir = assets.syncAssets();\n+                        setupRecognizer(assetDir);\n+                    } catch (IOException e) {\n+                        return e;\n+                    }\n+                    return null;\n+                }\n+\n+                @Override\n+                protected void onPostExecute(Exception result) {\n+                    if (result != null) {\n+                        Toast.makeText(getApplicationContext(), \"failed\", LENGTH_SHORT).show();\n+                    } else {\n+                        switchSearch(KWS_SEARCH);\n+                    }\n+                }\n+            }.execute();\n+        }\n+\n+        @Override\n+        public void onPartialResult(Hypothesis hypothesis) {\n+            if (hypothesis == null)\n+                return;\n+            String text = hypothesis.getHypstr();\n+            if (text.equals(KEYPHRASE))\n+                promptSpeechInput();\n+        }\n+\n+        /**\n+         * This callback is called when we stop the recognize.\n+         */\n+        @Override\n+        public void onResult(Hypothesis hypothesis) {\n+        }\n+\n+        @Override\n+        public void onError(Exception e) {\n+\n+        }\n+\n+        @Override\n+        public void onTimeout() {\n+            switchSearch(KWS_SEARCH);\n+\n+        }\n+\n+        @Override\n+        public void onBeginningOfSpeech() {","path":"app/src/main/java/org/fossasia/susi/ai/activities/MainActivity.java","position":135,"original_position":135,"commit_id":"e98ab717c3102b4d941eb77e552259abeac52516","original_commit_id":"e98ab717c3102b4d941eb77e552259abeac52516","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Document empty method body](https://www.codacy.com/app/harshithdwivedi/susi_android/file/4809352906/issues/source?bid=3787326&fileBranchId=4029027#l1197)","created_at":"2016-12-23T16:04:59Z","updated_at":"2016-12-23T16:04:59Z","html_url":"https://github.com/fossasia/susi_android/pull/432#discussion_r93780120","pull_request_url":"https://api.github.com/repos/fossasia/susi_android/pulls/432","_links":{"self":{"href":"https://api.github.com/repos/fossasia/susi_android/pulls/comments/93780120"},"html":{"href":"https://github.com/fossasia/susi_android/pull/432#discussion_r93780120"},"pull_request":{"href":"https://api.github.com/repos/fossasia/susi_android/pulls/432"}}},"pull_request":{"url":"https://api.github.com/repos/fossasia/susi_android/pulls/432","id":99257776,"html_url":"https://github.com/fossasia/susi_android/pull/432","diff_url":"https://github.com/fossasia/susi_android/pull/432.diff","patch_url":"https://github.com/fossasia/susi_android/pull/432.patch","issue_url":"https://api.github.com/repos/fossasia/susi_android/issues/432","number":432,"state":"open","locked":false,"title":"Fixes issue #278 Implement hotword wake up command","user":{"login":"anantprsd5","id":20367966,"avatar_url":"https://avatars.githubusercontent.com/u/20367966?v=3","gravatar_id":"","url":"https://api.github.com/users/anantprsd5","html_url":"https://github.com/anantprsd5","followers_url":"https://api.github.com/users/anantprsd5/followers","following_url":"https://api.github.com/users/anantprsd5/following{/other_user}","gists_url":"https://api.github.com/users/anantprsd5/gists{/gist_id}","starred_url":"https://api.github.com/users/anantprsd5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anantprsd5/subscriptions","organizations_url":"https://api.github.com/users/anantprsd5/orgs","repos_url":"https://api.github.com/users/anantprsd5/repos","events_url":"https://api.github.com/users/anantprsd5/events{/privacy}","received_events_url":"https://api.github.com/users/anantprsd5/received_events","type":"User","site_admin":false},"body":"Fixes issue #278 \r\n\r\nChanges: Added \"Hi Susi\" as hotword wake up command which will trigger the Google speech input on hotword detection. \r\n","created_at":"2016-12-23T16:01:40Z","updated_at":"2016-12-23T16:04:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cca357390826145fdb1277814ac222e9a24225c4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fossasia/susi_android/pulls/432/commits","review_comments_url":"https://api.github.com/repos/fossasia/susi_android/pulls/432/comments","review_comment_url":"https://api.github.com/repos/fossasia/susi_android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fossasia/susi_android/issues/432/comments","statuses_url":"https://api.github.com/repos/fossasia/susi_android/statuses/e98ab717c3102b4d941eb77e552259abeac52516","head":{"label":"anantprsd5:master","ref":"master","sha":"e98ab717c3102b4d941eb77e552259abeac52516","user":{"login":"anantprsd5","id":20367966,"avatar_url":"https://avatars.githubusercontent.com/u/20367966?v=3","gravatar_id":"","url":"https://api.github.com/users/anantprsd5","html_url":"https://github.com/anantprsd5","followers_url":"https://api.github.com/users/anantprsd5/followers","following_url":"https://api.github.com/users/anantprsd5/following{/other_user}","gists_url":"https://api.github.com/users/anantprsd5/gists{/gist_id}","starred_url":"https://api.github.com/users/anantprsd5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anantprsd5/subscriptions","organizations_url":"https://api.github.com/users/anantprsd5/orgs","repos_url":"https://api.github.com/users/anantprsd5/repos","events_url":"https://api.github.com/users/anantprsd5/events{/privacy}","received_events_url":"https://api.github.com/users/anantprsd5/received_events","type":"User","site_admin":false},"repo":{"id":76055431,"name":"susi_android","full_name":"anantprsd5/susi_android","owner":{"login":"anantprsd5","id":20367966,"avatar_url":"https://avatars.githubusercontent.com/u/20367966?v=3","gravatar_id":"","url":"https://api.github.com/users/anantprsd5","html_url":"https://github.com/anantprsd5","followers_url":"https://api.github.com/users/anantprsd5/followers","following_url":"https://api.github.com/users/anantprsd5/following{/other_user}","gists_url":"https://api.github.com/users/anantprsd5/gists{/gist_id}","starred_url":"https://api.github.com/users/anantprsd5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anantprsd5/subscriptions","organizations_url":"https://api.github.com/users/anantprsd5/orgs","repos_url":"https://api.github.com/users/anantprsd5/repos","events_url":"https://api.github.com/users/anantprsd5/events{/privacy}","received_events_url":"https://api.github.com/users/anantprsd5/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anantprsd5/susi_android","description":"Susi Android App","fork":true,"url":"https://api.github.com/repos/anantprsd5/susi_android","forks_url":"https://api.github.com/repos/anantprsd5/susi_android/forks","keys_url":"https://api.github.com/repos/anantprsd5/susi_android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anantprsd5/susi_android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anantprsd5/susi_android/teams","hooks_url":"https://api.github.com/repos/anantprsd5/susi_android/hooks","issue_events_url":"https://api.github.com/repos/anantprsd5/susi_android/issues/events{/number}","events_url":"https://api.github.com/repos/anantprsd5/susi_android/events","assignees_url":"https://api.github.com/repos/anantprsd5/susi_android/assignees{/user}","branches_url":"https://api.github.com/repos/anantprsd5/susi_android/branches{/branch}","tags_url":"https://api.github.com/repos/anantprsd5/susi_android/tags","blobs_url":"https://api.github.com/repos/anantprsd5/susi_android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anantprsd5/susi_android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anantprsd5/susi_android/git/refs{/sha}","trees_url":"https://api.github.com/repos/anantprsd5/susi_android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anantprsd5/susi_android/statuses/{sha}","languages_url":"https://api.github.com/repos/anantprsd5/susi_android/languages","stargazers_url":"https://api.github.com/repos/anantprsd5/susi_android/stargazers","contributors_url":"https://api.github.com/repos/anantprsd5/susi_android/contributors","subscribers_url":"https://api.github.com/repos/anantprsd5/susi_android/subscribers","subscription_url":"https://api.github.com/repos/anantprsd5/susi_android/subscription","commits_url":"https://api.github.com/repos/anantprsd5/susi_android/commits{/sha}","git_commits_url":"https://api.github.com/repos/anantprsd5/susi_android/git/commits{/sha}","comments_url":"https://api.github.com/repos/anantprsd5/susi_android/comments{/number}","issue_comment_url":"https://api.github.com/repos/anantprsd5/susi_android/issues/comments{/number}","contents_url":"https://api.github.com/repos/anantprsd5/susi_android/contents/{+path}","compare_url":"https://api.github.com/repos/anantprsd5/susi_android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anantprsd5/susi_android/merges","archive_url":"https://api.github.com/repos/anantprsd5/susi_android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anantprsd5/susi_android/downloads","issues_url":"https://api.github.com/repos/anantprsd5/susi_android/issues{/number}","pulls_url":"https://api.github.com/repos/anantprsd5/susi_android/pulls{/number}","milestones_url":"https://api.github.com/repos/anantprsd5/susi_android/milestones{/number}","notifications_url":"https://api.github.com/repos/anantprsd5/susi_android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anantprsd5/susi_android/labels{/name}","releases_url":"https://api.github.com/repos/anantprsd5/susi_android/releases{/id}","deployments_url":"https://api.github.com/repos/anantprsd5/susi_android/deployments","created_at":"2016-12-09T17:18:53Z","updated_at":"2016-12-09T17:18:55Z","pushed_at":"2016-12-23T15:37:28Z","git_url":"git://github.com/anantprsd5/susi_android.git","ssh_url":"git@github.com:anantprsd5/susi_android.git","clone_url":"https://github.com/anantprsd5/susi_android.git","svn_url":"https://github.com/anantprsd5/susi_android","homepage":"https://github.com/fossasia/susi_android/raw/apk/susi-debug.apk","size":637716,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fossasia:master","ref":"master","sha":"04406ef8040165c639e08a518b0225480b74fda3","user":{"login":"fossasia","id":6295529,"avatar_url":"https://avatars.githubusercontent.com/u/6295529?v=3","gravatar_id":"","url":"https://api.github.com/users/fossasia","html_url":"https://github.com/fossasia","followers_url":"https://api.github.com/users/fossasia/followers","following_url":"https://api.github.com/users/fossasia/following{/other_user}","gists_url":"https://api.github.com/users/fossasia/gists{/gist_id}","starred_url":"https://api.github.com/users/fossasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossasia/subscriptions","organizations_url":"https://api.github.com/users/fossasia/orgs","repos_url":"https://api.github.com/users/fossasia/repos","events_url":"https://api.github.com/users/fossasia/events{/privacy}","received_events_url":"https://api.github.com/users/fossasia/received_events","type":"Organization","site_admin":false},"repo":{"id":68798776,"name":"susi_android","full_name":"fossasia/susi_android","owner":{"login":"fossasia","id":6295529,"avatar_url":"https://avatars.githubusercontent.com/u/6295529?v=3","gravatar_id":"","url":"https://api.github.com/users/fossasia","html_url":"https://github.com/fossasia","followers_url":"https://api.github.com/users/fossasia/followers","following_url":"https://api.github.com/users/fossasia/following{/other_user}","gists_url":"https://api.github.com/users/fossasia/gists{/gist_id}","starred_url":"https://api.github.com/users/fossasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossasia/subscriptions","organizations_url":"https://api.github.com/users/fossasia/orgs","repos_url":"https://api.github.com/users/fossasia/repos","events_url":"https://api.github.com/users/fossasia/events{/privacy}","received_events_url":"https://api.github.com/users/fossasia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fossasia/susi_android","description":"Susi Android App https://github.com/fossasia/susi_android/raw/apk/susi-debug.apk","fork":false,"url":"https://api.github.com/repos/fossasia/susi_android","forks_url":"https://api.github.com/repos/fossasia/susi_android/forks","keys_url":"https://api.github.com/repos/fossasia/susi_android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fossasia/susi_android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fossasia/susi_android/teams","hooks_url":"https://api.github.com/repos/fossasia/susi_android/hooks","issue_events_url":"https://api.github.com/repos/fossasia/susi_android/issues/events{/number}","events_url":"https://api.github.com/repos/fossasia/susi_android/events","assignees_url":"https://api.github.com/repos/fossasia/susi_android/assignees{/user}","branches_url":"https://api.github.com/repos/fossasia/susi_android/branches{/branch}","tags_url":"https://api.github.com/repos/fossasia/susi_android/tags","blobs_url":"https://api.github.com/repos/fossasia/susi_android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fossasia/susi_android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fossasia/susi_android/git/refs{/sha}","trees_url":"https://api.github.com/repos/fossasia/susi_android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fossasia/susi_android/statuses/{sha}","languages_url":"https://api.github.com/repos/fossasia/susi_android/languages","stargazers_url":"https://api.github.com/repos/fossasia/susi_android/stargazers","contributors_url":"https://api.github.com/repos/fossasia/susi_android/contributors","subscribers_url":"https://api.github.com/repos/fossasia/susi_android/subscribers","subscription_url":"https://api.github.com/repos/fossasia/susi_android/subscription","commits_url":"https://api.github.com/repos/fossasia/susi_android/commits{/sha}","git_commits_url":"https://api.github.com/repos/fossasia/susi_android/git/commits{/sha}","comments_url":"https://api.github.com/repos/fossasia/susi_android/comments{/number}","issue_comment_url":"https://api.github.com/repos/fossasia/susi_android/issues/comments{/number}","contents_url":"https://api.github.com/repos/fossasia/susi_android/contents/{+path}","compare_url":"https://api.github.com/repos/fossasia/susi_android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fossasia/susi_android/merges","archive_url":"https://api.github.com/repos/fossasia/susi_android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fossasia/susi_android/downloads","issues_url":"https://api.github.com/repos/fossasia/susi_android/issues{/number}","pulls_url":"https://api.github.com/repos/fossasia/susi_android/pulls{/number}","milestones_url":"https://api.github.com/repos/fossasia/susi_android/milestones{/number}","notifications_url":"https://api.github.com/repos/fossasia/susi_android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fossasia/susi_android/labels{/name}","releases_url":"https://api.github.com/repos/fossasia/susi_android/releases{/id}","deployments_url":"https://api.github.com/repos/fossasia/susi_android/deployments","created_at":"2016-09-21T08:56:16Z","updated_at":"2016-12-23T02:32:01Z","pushed_at":"2016-12-23T16:01:41Z","git_url":"git://github.com/fossasia/susi_android.git","ssh_url":"git@github.com:fossasia/susi_android.git","clone_url":"https://github.com/fossasia/susi_android.git","svn_url":"https://github.com/fossasia/susi_android","homepage":"","size":680346,"stargazers_count":96,"watchers_count":96,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":147,"mirror_url":null,"open_issues_count":17,"forks":147,"open_issues":17,"watchers":96,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fossasia/susi_android/pulls/432"},"html":{"href":"https://github.com/fossasia/susi_android/pull/432"},"issue":{"href":"https://api.github.com/repos/fossasia/susi_android/issues/432"},"comments":{"href":"https://api.github.com/repos/fossasia/susi_android/issues/432/comments"},"review_comments":{"href":"https://api.github.com/repos/fossasia/susi_android/pulls/432/comments"},"review_comment":{"href":"https://api.github.com/repos/fossasia/susi_android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fossasia/susi_android/pulls/432/commits"},"statuses":{"href":"https://api.github.com/repos/fossasia/susi_android/statuses/e98ab717c3102b4d941eb77e552259abeac52516"}}}}
{"actor":{"display_login":"codacy-bot"}}