{"action":"created","comment":{"url":"https://api.github.com/repos/fxbox/calendar/pulls/comments/70802835","id":70802835,"diff_hunk":"@@ -0,0 +1,86 @@\n+'use strict';\n+\n+const p = Object.freeze({\n+  // Properties\n+  synthesis: Symbol('synthesis'),\n+  supportsSynthesis: Symbol('supportsSynthesis'),\n+  voice: Symbol('voice'),\n+  initialised: Symbol('initialised'),\n+\n+  // Methods\n+  populateVoice: Symbol('populateVoice'),\n+});\n+\n+export default class SpeechSynthesis {\n+  constructor() {\n+    const synthesis = window.speechSynthesis;\n+\n+    this[p.initialised] = false;\n+    this[p.supportsSynthesis] = !!synthesis;\n+\n+    if (this[p.supportsSynthesis]) {\n+      this[p.synthesis] = synthesis;\n+      this[p.populateVoice]();\n+      this[p.synthesis].onvoiceschanged = this[p.populateVoice].bind(this);\n+    } else {\n+      this[p.synthesis] = null;\n+    }\n+\n+    this[p.voice] = null;\n+\n+    Object.seal(this);\n+  }\n+\n+  /**\n+   * Speak a text aloud.\n+   *\n+   * @param {string} text\n+   */\n+  speak(text = '') {\n+    if (!text) {\n+      return;\n+    }\n+\n+    const utterance = new SpeechSynthesisUtterance(text);\n+\n+    if (this[p.voice]) {\n+      utterance.voice = this[p.voice];\n+    }\n+    utterance.lang = 'en';\n+    utterance.pitch = 0.8;\n+    utterance.rate = 0.9;","path":"app/js/lib/speech/synthesis.js","position":51,"original_position":51,"commit_id":"d8703e9ff43c40fe75a2b244519d8db3170f2b25","original_commit_id":"d8703e9ff43c40fe75a2b244519d8db3170f2b25","user":{"login":"samgiles","id":840334,"avatar_url":"https://avatars.githubusercontent.com/u/840334?v=3","gravatar_id":"","url":"https://api.github.com/users/samgiles","html_url":"https://github.com/samgiles","followers_url":"https://api.github.com/users/samgiles/followers","following_url":"https://api.github.com/users/samgiles/following{/other_user}","gists_url":"https://api.github.com/users/samgiles/gists{/gist_id}","starred_url":"https://api.github.com/users/samgiles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samgiles/subscriptions","organizations_url":"https://api.github.com/users/samgiles/orgs","repos_url":"https://api.github.com/users/samgiles/repos","events_url":"https://api.github.com/users/samgiles/events{/privacy}","received_events_url":"https://api.github.com/users/samgiles/received_events","type":"User","site_admin":false},"body":"nit: Maybe make all of these `consts` up top?","created_at":"2016-07-14T13:19:02Z","updated_at":"2016-07-14T13:19:02Z","html_url":"https://github.com/fxbox/calendar/pull/35#discussion_r70802835","pull_request_url":"https://api.github.com/repos/fxbox/calendar/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/fxbox/calendar/pulls/comments/70802835"},"html":{"href":"https://github.com/fxbox/calendar/pull/35#discussion_r70802835"},"pull_request":{"href":"https://api.github.com/repos/fxbox/calendar/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/fxbox/calendar/pulls/35","id":77319579,"html_url":"https://github.com/fxbox/calendar/pull/35","diff_url":"https://github.com/fxbox/calendar/pull/35.diff","patch_url":"https://github.com/fxbox/calendar/pull/35.patch","issue_url":"https://api.github.com/repos/fxbox/calendar/issues/35","number":35,"state":"open","locked":false,"title":"Add a voice feedback when a new reminder is created. r=julienw","user":{"login":"gmarty","id":333865,"avatar_url":"https://avatars.githubusercontent.com/u/333865?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarty","html_url":"https://github.com/gmarty","followers_url":"https://api.github.com/users/gmarty/followers","following_url":"https://api.github.com/users/gmarty/following{/other_user}","gists_url":"https://api.github.com/users/gmarty/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarty/subscriptions","organizations_url":"https://api.github.com/users/gmarty/orgs","repos_url":"https://api.github.com/users/gmarty/repos","events_url":"https://api.github.com/users/gmarty/events{/privacy}","received_events_url":"https://api.github.com/users/gmarty/received_events","type":"User","site_admin":false},"body":"This is a review for @julienw as he already started working on this but that'd be cool if @samgiles could take a look too.","created_at":"2016-07-13T16:25:19Z","updated_at":"2016-07-14T13:19:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0456f23558aebc1db1004fb9c11040c1dd604b44","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fxbox/calendar/pulls/35/commits","review_comments_url":"https://api.github.com/repos/fxbox/calendar/pulls/35/comments","review_comment_url":"https://api.github.com/repos/fxbox/calendar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fxbox/calendar/issues/35/comments","statuses_url":"https://api.github.com/repos/fxbox/calendar/statuses/d8703e9ff43c40fe75a2b244519d8db3170f2b25","head":{"label":"gmarty:voice","ref":"voice","sha":"d8703e9ff43c40fe75a2b244519d8db3170f2b25","user":{"login":"gmarty","id":333865,"avatar_url":"https://avatars.githubusercontent.com/u/333865?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarty","html_url":"https://github.com/gmarty","followers_url":"https://api.github.com/users/gmarty/followers","following_url":"https://api.github.com/users/gmarty/following{/other_user}","gists_url":"https://api.github.com/users/gmarty/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarty/subscriptions","organizations_url":"https://api.github.com/users/gmarty/orgs","repos_url":"https://api.github.com/users/gmarty/repos","events_url":"https://api.github.com/users/gmarty/events{/privacy}","received_events_url":"https://api.github.com/users/gmarty/received_events","type":"User","site_admin":false},"repo":{"id":61630644,"name":"calendar","full_name":"gmarty/calendar","owner":{"login":"gmarty","id":333865,"avatar_url":"https://avatars.githubusercontent.com/u/333865?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarty","html_url":"https://github.com/gmarty","followers_url":"https://api.github.com/users/gmarty/followers","following_url":"https://api.github.com/users/gmarty/following{/other_user}","gists_url":"https://api.github.com/users/gmarty/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarty/subscriptions","organizations_url":"https://api.github.com/users/gmarty/orgs","repos_url":"https://api.github.com/users/gmarty/repos","events_url":"https://api.github.com/users/gmarty/events{/privacy}","received_events_url":"https://api.github.com/users/gmarty/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gmarty/calendar","description":"","fork":true,"url":"https://api.github.com/repos/gmarty/calendar","forks_url":"https://api.github.com/repos/gmarty/calendar/forks","keys_url":"https://api.github.com/repos/gmarty/calendar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gmarty/calendar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gmarty/calendar/teams","hooks_url":"https://api.github.com/repos/gmarty/calendar/hooks","issue_events_url":"https://api.github.com/repos/gmarty/calendar/issues/events{/number}","events_url":"https://api.github.com/repos/gmarty/calendar/events","assignees_url":"https://api.github.com/repos/gmarty/calendar/assignees{/user}","branches_url":"https://api.github.com/repos/gmarty/calendar/branches{/branch}","tags_url":"https://api.github.com/repos/gmarty/calendar/tags","blobs_url":"https://api.github.com/repos/gmarty/calendar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gmarty/calendar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gmarty/calendar/git/refs{/sha}","trees_url":"https://api.github.com/repos/gmarty/calendar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gmarty/calendar/statuses/{sha}","languages_url":"https://api.github.com/repos/gmarty/calendar/languages","stargazers_url":"https://api.github.com/repos/gmarty/calendar/stargazers","contributors_url":"https://api.github.com/repos/gmarty/calendar/contributors","subscribers_url":"https://api.github.com/repos/gmarty/calendar/subscribers","subscription_url":"https://api.github.com/repos/gmarty/calendar/subscription","commits_url":"https://api.github.com/repos/gmarty/calendar/commits{/sha}","git_commits_url":"https://api.github.com/repos/gmarty/calendar/git/commits{/sha}","comments_url":"https://api.github.com/repos/gmarty/calendar/comments{/number}","issue_comment_url":"https://api.github.com/repos/gmarty/calendar/issues/comments{/number}","contents_url":"https://api.github.com/repos/gmarty/calendar/contents/{+path}","compare_url":"https://api.github.com/repos/gmarty/calendar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gmarty/calendar/merges","archive_url":"https://api.github.com/repos/gmarty/calendar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gmarty/calendar/downloads","issues_url":"https://api.github.com/repos/gmarty/calendar/issues{/number}","pulls_url":"https://api.github.com/repos/gmarty/calendar/pulls{/number}","milestones_url":"https://api.github.com/repos/gmarty/calendar/milestones{/number}","notifications_url":"https://api.github.com/repos/gmarty/calendar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gmarty/calendar/labels{/name}","releases_url":"https://api.github.com/repos/gmarty/calendar/releases{/id}","deployments_url":"https://api.github.com/repos/gmarty/calendar/deployments","created_at":"2016-06-21T12:04:00Z","updated_at":"2016-06-21T12:04:02Z","pushed_at":"2016-07-14T10:46:18Z","git_url":"git://github.com/gmarty/calendar.git","ssh_url":"git@github.com:gmarty/calendar.git","clone_url":"https://github.com/gmarty/calendar.git","svn_url":"https://github.com/gmarty/calendar","homepage":null,"size":2805,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fxbox:master","ref":"master","sha":"cb9111997c931928becda3663c1aa7eab94317f5","user":{"login":"fxbox","id":17052474,"avatar_url":"https://avatars.githubusercontent.com/u/17052474?v=3","gravatar_id":"","url":"https://api.github.com/users/fxbox","html_url":"https://github.com/fxbox","followers_url":"https://api.github.com/users/fxbox/followers","following_url":"https://api.github.com/users/fxbox/following{/other_user}","gists_url":"https://api.github.com/users/fxbox/gists{/gist_id}","starred_url":"https://api.github.com/users/fxbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxbox/subscriptions","organizations_url":"https://api.github.com/users/fxbox/orgs","repos_url":"https://api.github.com/users/fxbox/repos","events_url":"https://api.github.com/users/fxbox/events{/privacy}","received_events_url":"https://api.github.com/users/fxbox/received_events","type":"Organization","site_admin":false},"repo":{"id":61548154,"name":"calendar","full_name":"fxbox/calendar","owner":{"login":"fxbox","id":17052474,"avatar_url":"https://avatars.githubusercontent.com/u/17052474?v=3","gravatar_id":"","url":"https://api.github.com/users/fxbox","html_url":"https://github.com/fxbox","followers_url":"https://api.github.com/users/fxbox/followers","following_url":"https://api.github.com/users/fxbox/following{/other_user}","gists_url":"https://api.github.com/users/fxbox/gists{/gist_id}","starred_url":"https://api.github.com/users/fxbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxbox/subscriptions","organizations_url":"https://api.github.com/users/fxbox/orgs","repos_url":"https://api.github.com/users/fxbox/repos","events_url":"https://api.github.com/users/fxbox/events{/privacy}","received_events_url":"https://api.github.com/users/fxbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fxbox/calendar","description":":calendar: A calendar/reminder thing I guess.","fork":false,"url":"https://api.github.com/repos/fxbox/calendar","forks_url":"https://api.github.com/repos/fxbox/calendar/forks","keys_url":"https://api.github.com/repos/fxbox/calendar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fxbox/calendar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fxbox/calendar/teams","hooks_url":"https://api.github.com/repos/fxbox/calendar/hooks","issue_events_url":"https://api.github.com/repos/fxbox/calendar/issues/events{/number}","events_url":"https://api.github.com/repos/fxbox/calendar/events","assignees_url":"https://api.github.com/repos/fxbox/calendar/assignees{/user}","branches_url":"https://api.github.com/repos/fxbox/calendar/branches{/branch}","tags_url":"https://api.github.com/repos/fxbox/calendar/tags","blobs_url":"https://api.github.com/repos/fxbox/calendar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fxbox/calendar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fxbox/calendar/git/refs{/sha}","trees_url":"https://api.github.com/repos/fxbox/calendar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fxbox/calendar/statuses/{sha}","languages_url":"https://api.github.com/repos/fxbox/calendar/languages","stargazers_url":"https://api.github.com/repos/fxbox/calendar/stargazers","contributors_url":"https://api.github.com/repos/fxbox/calendar/contributors","subscribers_url":"https://api.github.com/repos/fxbox/calendar/subscribers","subscription_url":"https://api.github.com/repos/fxbox/calendar/subscription","commits_url":"https://api.github.com/repos/fxbox/calendar/commits{/sha}","git_commits_url":"https://api.github.com/repos/fxbox/calendar/git/commits{/sha}","comments_url":"https://api.github.com/repos/fxbox/calendar/comments{/number}","issue_comment_url":"https://api.github.com/repos/fxbox/calendar/issues/comments{/number}","contents_url":"https://api.github.com/repos/fxbox/calendar/contents/{+path}","compare_url":"https://api.github.com/repos/fxbox/calendar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fxbox/calendar/merges","archive_url":"https://api.github.com/repos/fxbox/calendar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fxbox/calendar/downloads","issues_url":"https://api.github.com/repos/fxbox/calendar/issues{/number}","pulls_url":"https://api.github.com/repos/fxbox/calendar/pulls{/number}","milestones_url":"https://api.github.com/repos/fxbox/calendar/milestones{/number}","notifications_url":"https://api.github.com/repos/fxbox/calendar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fxbox/calendar/labels{/name}","releases_url":"https://api.github.com/repos/fxbox/calendar/releases{/id}","deployments_url":"https://api.github.com/repos/fxbox/calendar/deployments","created_at":"2016-06-20T13:03:37Z","updated_at":"2016-07-01T16:45:48Z","pushed_at":"2016-07-14T13:12:52Z","git_url":"git://github.com/fxbox/calendar.git","ssh_url":"git@github.com:fxbox/calendar.git","clone_url":"https://github.com/fxbox/calendar.git","svn_url":"https://github.com/fxbox/calendar","homepage":"https://fxbox.github.io/calendar/","size":2544,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":9,"forks":3,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fxbox/calendar/pulls/35"},"html":{"href":"https://github.com/fxbox/calendar/pull/35"},"issue":{"href":"https://api.github.com/repos/fxbox/calendar/issues/35"},"comments":{"href":"https://api.github.com/repos/fxbox/calendar/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/fxbox/calendar/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/fxbox/calendar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fxbox/calendar/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/fxbox/calendar/statuses/d8703e9ff43c40fe75a2b244519d8db3170f2b25"}}}}
{"actor":{"display_login":"samgiles"}}