{"action":"closed","number":1,"pull_request":{"url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/pulls/1","id":232840996,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyODQwOTk2","html_url":"https://github.com/expatiating/aws-lex-browser-audio-capture/pull/1","diff_url":"https://github.com/expatiating/aws-lex-browser-audio-capture/pull/1.diff","patch_url":"https://github.com/expatiating/aws-lex-browser-audio-capture/pull/1.patch","issue_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/issues/1","number":1,"state":"closed","locked":false,"title":"Update recordSampleRate after downsampleBuffer","user":{"login":"expatiating","id":3590621,"node_id":"MDQ6VXNlcjM1OTA2MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/3590621?v=4","gravatar_id":"","url":"https://api.github.com/users/expatiating","html_url":"https://github.com/expatiating","followers_url":"https://api.github.com/users/expatiating/followers","following_url":"https://api.github.com/users/expatiating/following{/other_user}","gists_url":"https://api.github.com/users/expatiating/gists{/gist_id}","starred_url":"https://api.github.com/users/expatiating/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expatiating/subscriptions","organizations_url":"https://api.github.com/users/expatiating/orgs","repos_url":"https://api.github.com/users/expatiating/repos","events_url":"https://api.github.com/users/expatiating/events{/privacy}","received_events_url":"https://api.github.com/users/expatiating/received_events","type":"User","site_admin":false},"body":"In testing this, I used `startRecording`, `stopRecording`, and `exportWAV` similar to below.\r\n```JavaScript\r\naudioControl.startRecording(() => {\r\n  audioControl.stopRecording()\r\n  audioControl.exportWAV()\r\n}\r\n```\r\nWhen I call `exportWAV` it appears that `sampleRate` change done in `downsampleBuffer` is not reflected in `encodeWAV`. \r\n\r\nThe browser records in 44.1 kHz, and downsampling to 16 kHz, and exporting the WAV, the file has 44.1 kHz encoding and the audio played by Audacity was at 44.1 kHz rate. In Audacity I changed the file rate to 16 kHz and the audio plays correctly. \r\n\r\nBy setting `recordSampleRate = exportSampleRate;` after downsampling corrected the issue.","created_at":"2018-11-22T02:10:40Z","updated_at":"2018-11-22T02:10:49Z","closed_at":"2018-11-22T02:10:49Z","merged_at":"2018-11-22T02:10:49Z","merge_commit_sha":"b62e3039b2fb8789e435e5f61204f5710b5aac40","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/pulls/1/commits","review_comments_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/pulls/1/comments","review_comment_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/pulls/comments{/number}","comments_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/issues/1/comments","statuses_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/statuses/d53b8d6b4335136aabc96c8ae9dcf26a2dc1fa94","head":{"label":"expatiating:patch-1","ref":"patch-1","sha":"d53b8d6b4335136aabc96c8ae9dcf26a2dc1fa94","user":{"login":"expatiating","id":3590621,"node_id":"MDQ6VXNlcjM1OTA2MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/3590621?v=4","gravatar_id":"","url":"https://api.github.com/users/expatiating","html_url":"https://github.com/expatiating","followers_url":"https://api.github.com/users/expatiating/followers","following_url":"https://api.github.com/users/expatiating/following{/other_user}","gists_url":"https://api.github.com/users/expatiating/gists{/gist_id}","starred_url":"https://api.github.com/users/expatiating/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expatiating/subscriptions","organizations_url":"https://api.github.com/users/expatiating/orgs","repos_url":"https://api.github.com/users/expatiating/repos","events_url":"https://api.github.com/users/expatiating/events{/privacy}","received_events_url":"https://api.github.com/users/expatiating/received_events","type":"User","site_admin":false},"repo":{"id":158625761,"node_id":"MDEwOlJlcG9zaXRvcnkxNTg2MjU3NjE=","name":"aws-lex-browser-audio-capture","full_name":"expatiating/aws-lex-browser-audio-capture","private":false,"owner":{"login":"expatiating","id":3590621,"node_id":"MDQ6VXNlcjM1OTA2MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/3590621?v=4","gravatar_id":"","url":"https://api.github.com/users/expatiating","html_url":"https://github.com/expatiating","followers_url":"https://api.github.com/users/expatiating/followers","following_url":"https://api.github.com/users/expatiating/following{/other_user}","gists_url":"https://api.github.com/users/expatiating/gists{/gist_id}","starred_url":"https://api.github.com/users/expatiating/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expatiating/subscriptions","organizations_url":"https://api.github.com/users/expatiating/orgs","repos_url":"https://api.github.com/users/expatiating/repos","events_url":"https://api.github.com/users/expatiating/events{/privacy}","received_events_url":"https://api.github.com/users/expatiating/received_events","type":"User","site_admin":false},"html_url":"https://github.com/expatiating/aws-lex-browser-audio-capture","description":"An example web application using the Lex JavaScript SDK to send and receive audio from the Lex PostContent API. Demonstrates how to capture an audio device, record audio, and convert the audio into a format that Lex will recognize, and play the response. All from a web browser.","fork":true,"url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture","forks_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/forks","keys_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/keys{/key_id}","collaborators_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/teams","hooks_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/hooks","issue_events_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/issues/events{/number}","events_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/events","assignees_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/assignees{/user}","branches_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/branches{/branch}","tags_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/tags","blobs_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/git/refs{/sha}","trees_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/git/trees{/sha}","statuses_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/statuses/{sha}","languages_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/languages","stargazers_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/stargazers","contributors_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/contributors","subscribers_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/subscribers","subscription_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/subscription","commits_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/commits{/sha}","git_commits_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/git/commits{/sha}","comments_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/comments{/number}","issue_comment_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/issues/comments{/number}","contents_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/contents/{+path}","compare_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/compare/{base}...{head}","merges_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/merges","archive_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/downloads","issues_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/issues{/number}","pulls_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/pulls{/number}","milestones_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/milestones{/number}","notifications_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/labels{/name}","releases_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/releases{/id}","deployments_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/deployments","created_at":"2018-11-22T01:22:28Z","updated_at":"2018-11-22T01:22:30Z","pushed_at":"2018-11-22T02:10:49Z","git_url":"git://github.com/expatiating/aws-lex-browser-audio-capture.git","ssh_url":"git@github.com:expatiating/aws-lex-browser-audio-capture.git","clone_url":"https://github.com/expatiating/aws-lex-browser-audio-capture.git","svn_url":"https://github.com/expatiating/aws-lex-browser-audio-capture","homepage":null,"size":144,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"expatiating:master","ref":"master","sha":"5134d32b845c2373f67ec7df4db849dd4f2a973d","user":{"login":"expatiating","id":3590621,"node_id":"MDQ6VXNlcjM1OTA2MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/3590621?v=4","gravatar_id":"","url":"https://api.github.com/users/expatiating","html_url":"https://github.com/expatiating","followers_url":"https://api.github.com/users/expatiating/followers","following_url":"https://api.github.com/users/expatiating/following{/other_user}","gists_url":"https://api.github.com/users/expatiating/gists{/gist_id}","starred_url":"https://api.github.com/users/expatiating/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expatiating/subscriptions","organizations_url":"https://api.github.com/users/expatiating/orgs","repos_url":"https://api.github.com/users/expatiating/repos","events_url":"https://api.github.com/users/expatiating/events{/privacy}","received_events_url":"https://api.github.com/users/expatiating/received_events","type":"User","site_admin":false},"repo":{"id":158625761,"node_id":"MDEwOlJlcG9zaXRvcnkxNTg2MjU3NjE=","name":"aws-lex-browser-audio-capture","full_name":"expatiating/aws-lex-browser-audio-capture","private":false,"owner":{"login":"expatiating","id":3590621,"node_id":"MDQ6VXNlcjM1OTA2MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/3590621?v=4","gravatar_id":"","url":"https://api.github.com/users/expatiating","html_url":"https://github.com/expatiating","followers_url":"https://api.github.com/users/expatiating/followers","following_url":"https://api.github.com/users/expatiating/following{/other_user}","gists_url":"https://api.github.com/users/expatiating/gists{/gist_id}","starred_url":"https://api.github.com/users/expatiating/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expatiating/subscriptions","organizations_url":"https://api.github.com/users/expatiating/orgs","repos_url":"https://api.github.com/users/expatiating/repos","events_url":"https://api.github.com/users/expatiating/events{/privacy}","received_events_url":"https://api.github.com/users/expatiating/received_events","type":"User","site_admin":false},"html_url":"https://github.com/expatiating/aws-lex-browser-audio-capture","description":"An example web application using the Lex JavaScript SDK to send and receive audio from the Lex PostContent API. Demonstrates how to capture an audio device, record audio, and convert the audio into a format that Lex will recognize, and play the response. All from a web browser.","fork":true,"url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture","forks_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/forks","keys_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/keys{/key_id}","collaborators_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/teams","hooks_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/hooks","issue_events_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/issues/events{/number}","events_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/events","assignees_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/assignees{/user}","branches_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/branches{/branch}","tags_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/tags","blobs_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/git/refs{/sha}","trees_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/git/trees{/sha}","statuses_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/statuses/{sha}","languages_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/languages","stargazers_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/stargazers","contributors_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/contributors","subscribers_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/subscribers","subscription_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/subscription","commits_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/commits{/sha}","git_commits_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/git/commits{/sha}","comments_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/comments{/number}","issue_comment_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/issues/comments{/number}","contents_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/contents/{+path}","compare_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/compare/{base}...{head}","merges_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/merges","archive_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/downloads","issues_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/issues{/number}","pulls_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/pulls{/number}","milestones_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/milestones{/number}","notifications_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/labels{/name}","releases_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/releases{/id}","deployments_url":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/deployments","created_at":"2018-11-22T01:22:28Z","updated_at":"2018-11-22T01:22:30Z","pushed_at":"2018-11-22T02:10:49Z","git_url":"git://github.com/expatiating/aws-lex-browser-audio-capture.git","ssh_url":"git@github.com:expatiating/aws-lex-browser-audio-capture.git","clone_url":"https://github.com/expatiating/aws-lex-browser-audio-capture.git","svn_url":"https://github.com/expatiating/aws-lex-browser-audio-capture","homepage":null,"size":144,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/pulls/1"},"html":{"href":"https://github.com/expatiating/aws-lex-browser-audio-capture/pull/1"},"issue":{"href":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/issues/1"},"comments":{"href":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/expatiating/aws-lex-browser-audio-capture/statuses/d53b8d6b4335136aabc96c8ae9dcf26a2dc1fa94"}},"author_association":"OWNER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"expatiating","id":3590621,"node_id":"MDQ6VXNlcjM1OTA2MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/3590621?v=4","gravatar_id":"","url":"https://api.github.com/users/expatiating","html_url":"https://github.com/expatiating","followers_url":"https://api.github.com/users/expatiating/followers","following_url":"https://api.github.com/users/expatiating/following{/other_user}","gists_url":"https://api.github.com/users/expatiating/gists{/gist_id}","starred_url":"https://api.github.com/users/expatiating/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expatiating/subscriptions","organizations_url":"https://api.github.com/users/expatiating/orgs","repos_url":"https://api.github.com/users/expatiating/repos","events_url":"https://api.github.com/users/expatiating/events{/privacy}","received_events_url":"https://api.github.com/users/expatiating/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":1,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"expatiating"}}