{"action":"opened","number":349,"pull_request":{"url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/349","id":176362669,"html_url":"https://github.com/mit-teaching-systems-lab/threeflows/pull/349","diff_url":"https://github.com/mit-teaching-systems-lab/threeflows/pull/349.diff","patch_url":"https://github.com/mit-teaching-systems-lab/threeflows/pull/349.patch","issue_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/349","number":349,"state":"open","locked":false,"title":"Feature/transcription","user":{"login":"keving17","id":11862658,"avatar_url":"https://avatars0.githubusercontent.com/u/11862658?v=4","gravatar_id":"","url":"https://api.github.com/users/keving17","html_url":"https://github.com/keving17","followers_url":"https://api.github.com/users/keving17/followers","following_url":"https://api.github.com/users/keving17/following{/other_user}","gists_url":"https://api.github.com/users/keving17/gists{/gist_id}","starred_url":"https://api.github.com/users/keving17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keving17/subscriptions","organizations_url":"https://api.github.com/users/keving17/orgs","repos_url":"https://api.github.com/users/keving17/repos","events_url":"https://api.github.com/users/keving17/events{/privacy}","received_events_url":"https://api.github.com/users/keving17/received_events","type":"User","site_admin":false},"body":"Takes a wav file and transcribes it using IBM Watson. This is mostly a proof of concept.\r\n\r\nI changed the Get Link button on the login page to try out the new HTTP server call.\r\n\r\nBasically, I check the database for the transcript of a certain wav file. Rows in the evidence table have a `downloadUrl` field with a link to get the wav file in s3 - in this case, the `downloadUrl` was:\r\n```\r\n  audioFile = \"blob:http://localhost:3000/a510a130-f17d-4331-90fe-1f2c8c0a2083\";\r\n```\r\nI'm not entirely sure why the downloadUrl looks like that on my local database but that's fine.\r\n\r\nIf the transcript exists, I send a server response with a transcript field in the json body. Simply grabbing the transcript from the database takes about 30ms.\r\n<img width=\"1079\" alt=\"screen shot 2018-03-20 at 8 44 59 pm\" src=\"https://user-images.githubusercontent.com/11862658/37690149-b149a984-2c7f-11e8-8e98-8d46ee1a24bc.png\">\r\n\r\nIf the transcript does not exist, I send an actual wav file\r\n```\r\n  audioFile = '/Users/keving17/Documents/Github/TSL/teacher-moments/server/20180213-185953-485_8d44f67e-d783-4597-aec2-d417325cce06.wav';\r\n```\r\nto IBM Watson's Speech to Text API and extract the full transcript from the response. I store this transcript and return it in a server response with the transcript in the body. This takes 15s.\r\n<img width=\"1076\" alt=\"screen shot 2018-03-20 at 8 51 58 pm\" src=\"https://user-images.githubusercontent.com/11862658/37690399-008b25a8-2c81-11e8-86e6-6bda8dd23a9a.png\">\r\n\r\n(The idea is for both images to look identical. One HTTP call took 500x longer to process though)\r\n\r\nTo get this fully working, I need to make sure I can get live data from our psql  database and wav files from our s3 locker. That way I can stop overwriting the `audioFile` variable and just send the `downloadUrl` in the request header.\r\n\r\nFor now, I'm using a hobby IBM account to transcribe things but the subscription plan looks pretty reasonable. I've run the actual service by YJ and she is fine having WWA pay for it if I use it. If this looks good so far, I'll spend the time to merge this into the researcher portal after the live data bit is finished!\r\n<img width=\"720\" alt=\"screen shot 2018-03-20 at 9 01 05 pm\" src=\"https://user-images.githubusercontent.com/11862658/37690539-e3f10a9c-2c81-11e8-99b3-0690ae76bc5e.png\">\r\n","created_at":"2018-03-21T01:10:13Z","updated_at":"2018-03-21T01:10:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/349/commits","review_comments_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/349/comments","review_comment_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/349/comments","statuses_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/statuses/d711177615843ab89eb2a8bf078f89eb61fc996f","head":{"label":"mit-teaching-systems-lab:feature/transcription","ref":"feature/transcription","sha":"d711177615843ab89eb2a8bf078f89eb61fc996f","user":{"login":"mit-teaching-systems-lab","id":19670919,"avatar_url":"https://avatars3.githubusercontent.com/u/19670919?v=4","gravatar_id":"","url":"https://api.github.com/users/mit-teaching-systems-lab","html_url":"https://github.com/mit-teaching-systems-lab","followers_url":"https://api.github.com/users/mit-teaching-systems-lab/followers","following_url":"https://api.github.com/users/mit-teaching-systems-lab/following{/other_user}","gists_url":"https://api.github.com/users/mit-teaching-systems-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/mit-teaching-systems-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mit-teaching-systems-lab/subscriptions","organizations_url":"https://api.github.com/users/mit-teaching-systems-lab/orgs","repos_url":"https://api.github.com/users/mit-teaching-systems-lab/repos","events_url":"https://api.github.com/users/mit-teaching-systems-lab/events{/privacy}","received_events_url":"https://api.github.com/users/mit-teaching-systems-lab/received_events","type":"Organization","site_admin":false},"repo":{"id":61143637,"name":"threeflows","full_name":"mit-teaching-systems-lab/threeflows","owner":{"login":"mit-teaching-systems-lab","id":19670919,"avatar_url":"https://avatars3.githubusercontent.com/u/19670919?v=4","gravatar_id":"","url":"https://api.github.com/users/mit-teaching-systems-lab","html_url":"https://github.com/mit-teaching-systems-lab","followers_url":"https://api.github.com/users/mit-teaching-systems-lab/followers","following_url":"https://api.github.com/users/mit-teaching-systems-lab/following{/other_user}","gists_url":"https://api.github.com/users/mit-teaching-systems-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/mit-teaching-systems-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mit-teaching-systems-lab/subscriptions","organizations_url":"https://api.github.com/users/mit-teaching-systems-lab/orgs","repos_url":"https://api.github.com/users/mit-teaching-systems-lab/repos","events_url":"https://api.github.com/users/mit-teaching-systems-lab/events{/privacy}","received_events_url":"https://api.github.com/users/mit-teaching-systems-lab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mit-teaching-systems-lab/threeflows","description":"Practice spaces for teacher preparation programs","fork":false,"url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows","forks_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/forks","keys_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/teams","hooks_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/hooks","issue_events_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/events{/number}","events_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/events","assignees_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/assignees{/user}","branches_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/branches{/branch}","tags_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/tags","blobs_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/refs{/sha}","trees_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/statuses/{sha}","languages_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/languages","stargazers_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/stargazers","contributors_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/contributors","subscribers_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/subscribers","subscription_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/subscription","commits_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/commits{/sha}","git_commits_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/commits{/sha}","comments_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/comments{/number}","issue_comment_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/comments{/number}","contents_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/contents/{+path}","compare_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/merges","archive_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/downloads","issues_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues{/number}","pulls_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls{/number}","milestones_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/milestones{/number}","notifications_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/labels{/name}","releases_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/releases{/id}","deployments_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/deployments","created_at":"2016-06-14T17:49:59Z","updated_at":"2018-03-14T01:31:23Z","pushed_at":"2018-03-21T00:34:43Z","git_url":"git://github.com/mit-teaching-systems-lab/threeflows.git","ssh_url":"git@github.com:mit-teaching-systems-lab/threeflows.git","clone_url":"https://github.com/mit-teaching-systems-lab/threeflows.git","svn_url":"https://github.com/mit-teaching-systems-lab/threeflows","homepage":"http://tsl.mit.edu/practice-spaces-for-teacher-preparation/","size":2529,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"mit-teaching-systems-lab:master","ref":"master","sha":"89e53bbcda55cf4c0c184fc7176b6c21a23f03bd","user":{"login":"mit-teaching-systems-lab","id":19670919,"avatar_url":"https://avatars3.githubusercontent.com/u/19670919?v=4","gravatar_id":"","url":"https://api.github.com/users/mit-teaching-systems-lab","html_url":"https://github.com/mit-teaching-systems-lab","followers_url":"https://api.github.com/users/mit-teaching-systems-lab/followers","following_url":"https://api.github.com/users/mit-teaching-systems-lab/following{/other_user}","gists_url":"https://api.github.com/users/mit-teaching-systems-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/mit-teaching-systems-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mit-teaching-systems-lab/subscriptions","organizations_url":"https://api.github.com/users/mit-teaching-systems-lab/orgs","repos_url":"https://api.github.com/users/mit-teaching-systems-lab/repos","events_url":"https://api.github.com/users/mit-teaching-systems-lab/events{/privacy}","received_events_url":"https://api.github.com/users/mit-teaching-systems-lab/received_events","type":"Organization","site_admin":false},"repo":{"id":61143637,"name":"threeflows","full_name":"mit-teaching-systems-lab/threeflows","owner":{"login":"mit-teaching-systems-lab","id":19670919,"avatar_url":"https://avatars3.githubusercontent.com/u/19670919?v=4","gravatar_id":"","url":"https://api.github.com/users/mit-teaching-systems-lab","html_url":"https://github.com/mit-teaching-systems-lab","followers_url":"https://api.github.com/users/mit-teaching-systems-lab/followers","following_url":"https://api.github.com/users/mit-teaching-systems-lab/following{/other_user}","gists_url":"https://api.github.com/users/mit-teaching-systems-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/mit-teaching-systems-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mit-teaching-systems-lab/subscriptions","organizations_url":"https://api.github.com/users/mit-teaching-systems-lab/orgs","repos_url":"https://api.github.com/users/mit-teaching-systems-lab/repos","events_url":"https://api.github.com/users/mit-teaching-systems-lab/events{/privacy}","received_events_url":"https://api.github.com/users/mit-teaching-systems-lab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mit-teaching-systems-lab/threeflows","description":"Practice spaces for teacher preparation programs","fork":false,"url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows","forks_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/forks","keys_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/teams","hooks_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/hooks","issue_events_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/events{/number}","events_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/events","assignees_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/assignees{/user}","branches_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/branches{/branch}","tags_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/tags","blobs_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/refs{/sha}","trees_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/statuses/{sha}","languages_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/languages","stargazers_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/stargazers","contributors_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/contributors","subscribers_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/subscribers","subscription_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/subscription","commits_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/commits{/sha}","git_commits_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/git/commits{/sha}","comments_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/comments{/number}","issue_comment_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/comments{/number}","contents_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/contents/{+path}","compare_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/merges","archive_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/downloads","issues_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues{/number}","pulls_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls{/number}","milestones_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/milestones{/number}","notifications_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/labels{/name}","releases_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/releases{/id}","deployments_url":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/deployments","created_at":"2016-06-14T17:49:59Z","updated_at":"2018-03-14T01:31:23Z","pushed_at":"2018-03-21T00:34:43Z","git_url":"git://github.com/mit-teaching-systems-lab/threeflows.git","ssh_url":"git@github.com:mit-teaching-systems-lab/threeflows.git","clone_url":"https://github.com/mit-teaching-systems-lab/threeflows.git","svn_url":"https://github.com/mit-teaching-systems-lab/threeflows","homepage":"http://tsl.mit.edu/practice-spaces-for-teacher-preparation/","size":2529,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/349"},"html":{"href":"https://github.com/mit-teaching-systems-lab/threeflows/pull/349"},"issue":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/349"},"comments":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/issues/349/comments"},"review_comments":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/349/comments"},"review_comment":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/pulls/349/commits"},"statuses":{"href":"https://api.github.com/repos/mit-teaching-systems-lab/threeflows/statuses/d711177615843ab89eb2a8bf078f89eb61fc996f"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":15,"additions":1462,"deletions":458,"changed_files":16}}
{"actor":{"display_login":"keving17"}}