{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/DeepSpeech/pulls/comments/165744045","pull_request_review_id":93738040,"id":165744045,"diff_hunk":"@@ -35,6 +38,13 @@\n # Size of the context window used for producing timesteps in the input vector\n N_CONTEXT = 9\n \n+def convert_samplerate(audio_path):\n+    temp_dir = tempfile.mkdtemp()\n+    output_path = os.path.join(temp_dir, 'output.wav')","path":"native_client/python/client.py","position":17,"original_position":17,"commit_id":"cd20caa9e752ed33bc2eaf65287db2d82de321ee","original_commit_id":"cd20caa9e752ed33bc2eaf65287db2d82de321ee","user":{"login":"lissyx","id":1645737,"avatar_url":"https://avatars0.githubusercontent.com/u/1645737?v=4","gravatar_id":"","url":"https://api.github.com/users/lissyx","html_url":"https://github.com/lissyx","followers_url":"https://api.github.com/users/lissyx/followers","following_url":"https://api.github.com/users/lissyx/following{/other_user}","gists_url":"https://api.github.com/users/lissyx/gists{/gist_id}","starred_url":"https://api.github.com/users/lissyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lissyx/subscriptions","organizations_url":"https://api.github.com/users/lissyx/orgs","repos_url":"https://api.github.com/users/lissyx/repos","events_url":"https://api.github.com/users/lissyx/events{/privacy}","received_events_url":"https://api.github.com/users/lissyx/received_events","type":"User","site_admin":false},"body":"Checking the manpage of `sox` shows that it can deal with `-` as a special filename for `stdin` / `stdout`. It would be perfect if you can change that :)","created_at":"2018-02-02T19:55:20Z","updated_at":"2018-02-02T19:58:45Z","html_url":"https://github.com/mozilla/DeepSpeech/pull/1203#discussion_r165744045","pull_request_url":"https://api.github.com/repos/mozilla/DeepSpeech/pulls/1203","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mozilla/DeepSpeech/pulls/comments/165744045"},"html":{"href":"https://github.com/mozilla/DeepSpeech/pull/1203#discussion_r165744045"},"pull_request":{"href":"https://api.github.com/repos/mozilla/DeepSpeech/pulls/1203"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/DeepSpeech/pulls/1203","id":166874615,"html_url":"https://github.com/mozilla/DeepSpeech/pull/1203","diff_url":"https://github.com/mozilla/DeepSpeech/pull/1203.diff","patch_url":"https://github.com/mozilla/DeepSpeech/pull/1203.patch","issue_url":"https://api.github.com/repos/mozilla/DeepSpeech/issues/1203","number":1203,"state":"open","locked":false,"title":"Transcode input audio to 16 kHz #1022","user":{"login":"gnardari","id":5693195,"avatar_url":"https://avatars2.githubusercontent.com/u/5693195?v=4","gravatar_id":"","url":"https://api.github.com/users/gnardari","html_url":"https://github.com/gnardari","followers_url":"https://api.github.com/users/gnardari/followers","following_url":"https://api.github.com/users/gnardari/following{/other_user}","gists_url":"https://api.github.com/users/gnardari/gists{/gist_id}","starred_url":"https://api.github.com/users/gnardari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnardari/subscriptions","organizations_url":"https://api.github.com/users/gnardari/orgs","repos_url":"https://api.github.com/users/gnardari/repos","events_url":"https://api.github.com/users/gnardari/events{/privacy}","received_events_url":"https://api.github.com/users/gnardari/received_events","type":"User","site_admin":false},"body":"If the wav file is not 16 kHz, conversion is done using SoX via a subprocess. The converted file is saved in a temporary folder and deleted after execution. #1022 Tested on Ubuntu 16.04","created_at":"2018-02-02T18:41:30Z","updated_at":"2018-02-02T19:58:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96407a2c0e80ccc8f3f64455a1928d63ec3bcdc3","assignee":{"login":"gnardari","id":5693195,"avatar_url":"https://avatars2.githubusercontent.com/u/5693195?v=4","gravatar_id":"","url":"https://api.github.com/users/gnardari","html_url":"https://github.com/gnardari","followers_url":"https://api.github.com/users/gnardari/followers","following_url":"https://api.github.com/users/gnardari/following{/other_user}","gists_url":"https://api.github.com/users/gnardari/gists{/gist_id}","starred_url":"https://api.github.com/users/gnardari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnardari/subscriptions","organizations_url":"https://api.github.com/users/gnardari/orgs","repos_url":"https://api.github.com/users/gnardari/repos","events_url":"https://api.github.com/users/gnardari/events{/privacy}","received_events_url":"https://api.github.com/users/gnardari/received_events","type":"User","site_admin":false},"assignees":[{"login":"gnardari","id":5693195,"avatar_url":"https://avatars2.githubusercontent.com/u/5693195?v=4","gravatar_id":"","url":"https://api.github.com/users/gnardari","html_url":"https://github.com/gnardari","followers_url":"https://api.github.com/users/gnardari/followers","following_url":"https://api.github.com/users/gnardari/following{/other_user}","gists_url":"https://api.github.com/users/gnardari/gists{/gist_id}","starred_url":"https://api.github.com/users/gnardari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnardari/subscriptions","organizations_url":"https://api.github.com/users/gnardari/orgs","repos_url":"https://api.github.com/users/gnardari/repos","events_url":"https://api.github.com/users/gnardari/events{/privacy}","received_events_url":"https://api.github.com/users/gnardari/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/DeepSpeech/pulls/1203/commits","review_comments_url":"https://api.github.com/repos/mozilla/DeepSpeech/pulls/1203/comments","review_comment_url":"https://api.github.com/repos/mozilla/DeepSpeech/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/DeepSpeech/issues/1203/comments","statuses_url":"https://api.github.com/repos/mozilla/DeepSpeech/statuses/cd20caa9e752ed33bc2eaf65287db2d82de321ee","head":{"label":"gnardari:master","ref":"master","sha":"cd20caa9e752ed33bc2eaf65287db2d82de321ee","user":{"login":"gnardari","id":5693195,"avatar_url":"https://avatars2.githubusercontent.com/u/5693195?v=4","gravatar_id":"","url":"https://api.github.com/users/gnardari","html_url":"https://github.com/gnardari","followers_url":"https://api.github.com/users/gnardari/followers","following_url":"https://api.github.com/users/gnardari/following{/other_user}","gists_url":"https://api.github.com/users/gnardari/gists{/gist_id}","starred_url":"https://api.github.com/users/gnardari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnardari/subscriptions","organizations_url":"https://api.github.com/users/gnardari/orgs","repos_url":"https://api.github.com/users/gnardari/repos","events_url":"https://api.github.com/users/gnardari/events{/privacy}","received_events_url":"https://api.github.com/users/gnardari/received_events","type":"User","site_admin":false},"repo":{"id":120016188,"name":"DeepSpeech","full_name":"gnardari/DeepSpeech","owner":{"login":"gnardari","id":5693195,"avatar_url":"https://avatars2.githubusercontent.com/u/5693195?v=4","gravatar_id":"","url":"https://api.github.com/users/gnardari","html_url":"https://github.com/gnardari","followers_url":"https://api.github.com/users/gnardari/followers","following_url":"https://api.github.com/users/gnardari/following{/other_user}","gists_url":"https://api.github.com/users/gnardari/gists{/gist_id}","starred_url":"https://api.github.com/users/gnardari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnardari/subscriptions","organizations_url":"https://api.github.com/users/gnardari/orgs","repos_url":"https://api.github.com/users/gnardari/repos","events_url":"https://api.github.com/users/gnardari/events{/privacy}","received_events_url":"https://api.github.com/users/gnardari/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gnardari/DeepSpeech","description":"A TensorFlow implementation of Baidu's DeepSpeech architecture","fork":true,"url":"https://api.github.com/repos/gnardari/DeepSpeech","forks_url":"https://api.github.com/repos/gnardari/DeepSpeech/forks","keys_url":"https://api.github.com/repos/gnardari/DeepSpeech/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gnardari/DeepSpeech/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gnardari/DeepSpeech/teams","hooks_url":"https://api.github.com/repos/gnardari/DeepSpeech/hooks","issue_events_url":"https://api.github.com/repos/gnardari/DeepSpeech/issues/events{/number}","events_url":"https://api.github.com/repos/gnardari/DeepSpeech/events","assignees_url":"https://api.github.com/repos/gnardari/DeepSpeech/assignees{/user}","branches_url":"https://api.github.com/repos/gnardari/DeepSpeech/branches{/branch}","tags_url":"https://api.github.com/repos/gnardari/DeepSpeech/tags","blobs_url":"https://api.github.com/repos/gnardari/DeepSpeech/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gnardari/DeepSpeech/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gnardari/DeepSpeech/git/refs{/sha}","trees_url":"https://api.github.com/repos/gnardari/DeepSpeech/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gnardari/DeepSpeech/statuses/{sha}","languages_url":"https://api.github.com/repos/gnardari/DeepSpeech/languages","stargazers_url":"https://api.github.com/repos/gnardari/DeepSpeech/stargazers","contributors_url":"https://api.github.com/repos/gnardari/DeepSpeech/contributors","subscribers_url":"https://api.github.com/repos/gnardari/DeepSpeech/subscribers","subscription_url":"https://api.github.com/repos/gnardari/DeepSpeech/subscription","commits_url":"https://api.github.com/repos/gnardari/DeepSpeech/commits{/sha}","git_commits_url":"https://api.github.com/repos/gnardari/DeepSpeech/git/commits{/sha}","comments_url":"https://api.github.com/repos/gnardari/DeepSpeech/comments{/number}","issue_comment_url":"https://api.github.com/repos/gnardari/DeepSpeech/issues/comments{/number}","contents_url":"https://api.github.com/repos/gnardari/DeepSpeech/contents/{+path}","compare_url":"https://api.github.com/repos/gnardari/DeepSpeech/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gnardari/DeepSpeech/merges","archive_url":"https://api.github.com/repos/gnardari/DeepSpeech/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gnardari/DeepSpeech/downloads","issues_url":"https://api.github.com/repos/gnardari/DeepSpeech/issues{/number}","pulls_url":"https://api.github.com/repos/gnardari/DeepSpeech/pulls{/number}","milestones_url":"https://api.github.com/repos/gnardari/DeepSpeech/milestones{/number}","notifications_url":"https://api.github.com/repos/gnardari/DeepSpeech/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gnardari/DeepSpeech/labels{/name}","releases_url":"https://api.github.com/repos/gnardari/DeepSpeech/releases{/id}","deployments_url":"https://api.github.com/repos/gnardari/DeepSpeech/deployments","created_at":"2018-02-02T18:26:26Z","updated_at":"2018-02-02T18:26:29Z","pushed_at":"2018-02-02T18:33:08Z","git_url":"git://github.com/gnardari/DeepSpeech.git","ssh_url":"git@github.com:gnardari/DeepSpeech.git","clone_url":"https://github.com/gnardari/DeepSpeech.git","svn_url":"https://github.com/gnardari/DeepSpeech","homepage":"","size":19495,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"1aca3a32d93f28bc74f1189a474dc2e9d35f17f5","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":60273704,"name":"DeepSpeech","full_name":"mozilla/DeepSpeech","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/DeepSpeech","description":"A TensorFlow implementation of Baidu's DeepSpeech architecture","fork":false,"url":"https://api.github.com/repos/mozilla/DeepSpeech","forks_url":"https://api.github.com/repos/mozilla/DeepSpeech/forks","keys_url":"https://api.github.com/repos/mozilla/DeepSpeech/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/DeepSpeech/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/DeepSpeech/teams","hooks_url":"https://api.github.com/repos/mozilla/DeepSpeech/hooks","issue_events_url":"https://api.github.com/repos/mozilla/DeepSpeech/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/DeepSpeech/events","assignees_url":"https://api.github.com/repos/mozilla/DeepSpeech/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/DeepSpeech/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/DeepSpeech/tags","blobs_url":"https://api.github.com/repos/mozilla/DeepSpeech/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/DeepSpeech/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/DeepSpeech/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/DeepSpeech/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/DeepSpeech/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/DeepSpeech/languages","stargazers_url":"https://api.github.com/repos/mozilla/DeepSpeech/stargazers","contributors_url":"https://api.github.com/repos/mozilla/DeepSpeech/contributors","subscribers_url":"https://api.github.com/repos/mozilla/DeepSpeech/subscribers","subscription_url":"https://api.github.com/repos/mozilla/DeepSpeech/subscription","commits_url":"https://api.github.com/repos/mozilla/DeepSpeech/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/DeepSpeech/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/DeepSpeech/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/DeepSpeech/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/DeepSpeech/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/DeepSpeech/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/DeepSpeech/merges","archive_url":"https://api.github.com/repos/mozilla/DeepSpeech/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/DeepSpeech/downloads","issues_url":"https://api.github.com/repos/mozilla/DeepSpeech/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/DeepSpeech/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/DeepSpeech/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/DeepSpeech/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/DeepSpeech/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/DeepSpeech/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/DeepSpeech/deployments","created_at":"2016-06-02T15:04:53Z","updated_at":"2018-02-02T18:32:50Z","pushed_at":"2018-02-02T18:41:30Z","git_url":"git://github.com/mozilla/DeepSpeech.git","ssh_url":"git@github.com:mozilla/DeepSpeech.git","clone_url":"https://github.com/mozilla/DeepSpeech.git","svn_url":"https://github.com/mozilla/DeepSpeech","homepage":"","size":19493,"stargazers_count":5586,"watchers_count":5586,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":839,"mirror_url":null,"archived":false,"open_issues_count":119,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":839,"open_issues":119,"watchers":5586,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/DeepSpeech/pulls/1203"},"html":{"href":"https://github.com/mozilla/DeepSpeech/pull/1203"},"issue":{"href":"https://api.github.com/repos/mozilla/DeepSpeech/issues/1203"},"comments":{"href":"https://api.github.com/repos/mozilla/DeepSpeech/issues/1203/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/DeepSpeech/pulls/1203/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/DeepSpeech/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/DeepSpeech/pulls/1203/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/DeepSpeech/statuses/cd20caa9e752ed33bc2eaf65287db2d82de321ee"}},"author_association":"NONE"}}
{"actor":{"display_login":"lissyx"}}