Title: changing the key fails · Issue #4 · realpython/python-speech-recognition · GitHub
Open Graph Title: changing the key fails · Issue #4 · realpython/python-speech-recognition
X Title: changing the key fails · Issue #4 · realpython/python-speech-recognition
Description: I got a new GCP API key, and I tried to use it but I keep getting broken connection: Traceback (most recent call last): File "main.py", line 13, in
Open Graph Description: I got a new GCP API key, and I tried to use it but I keep getting broken connection: Traceback (most recent call last): File "main.py", line 13, in
X Description: I got a new GCP API key, and I tried to use it but I keep getting broken connection: Traceback (most recent call last): File "main.py", line 13, in <module> speech=r.recognize_googl...
Opengraph URL: https://github.com/realpython/python-speech-recognition/issues/4
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"changing the key fails","articleBody":"I got a new GCP API key, and I tried to use it but I keep getting broken connection:\r\n\r\n\r\n`Traceback (most recent call last):\r\n File \"main.py\", line 13, in \u003cmodule\u003e\r\n speech=r.recognize_google(audio,key='A...........8g')\r\n File \"/home/davy/anaconda3/lib/python3.6/site-packages/speech_recognition/__init__.py\", line 845, in recognize_google\r\n raise RequestError(\"recognition connection failed: {}\".format(e.reason))\r\nspeech_recognition.RequestError: recognition connection failed: [Errno 32] Broken pipe\r\n`\r\nI don't really understand why that is. I noticed that in the __init__.py file the key is set as follows:\r\n\r\n`\r\n if key is None: key = \"AIz...bla...bla..bla...gw\"\r\n url = \"http://www.google.com/speech-api/v2/recognize?{}\".format(urlencode({\r\n \"client\": \"chromium\",\r\n \"lang\": language,\r\n \"key\": key,\r\n }))`\r\n\r\nDo i need to change the client? but it is just an API key client shouldn't matter right?","author":{"url":"https://github.com/jzoudavy","@type":"Person","name":"jzoudavy"},"datePublished":"2018-05-15T03:10:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/4/python-speech-recognition/issues/4"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:77bb4618-e92b-7ea9-b58f-c9c859b4ffd0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 83AA:196750:122909B:18F5F77:6969FC63 |
| html-safe-nonce | 197aef5ab221a5ca4205641ac847bd780d13dae56dea3de89200dbff3009e5cf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0FBOjE5Njc1MDoxMjI5MDlCOjE4RjVGNzc6Njk2OUZDNjMiLCJ2aXNpdG9yX2lkIjoiNjA2OTY5MzIyNTIyOTc0NTI1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | abac0f3633c4b7b34c90a0f321d56184f5e84df52df34f3f54b97d2318e02594 |
| hovercard-subject-tag | issue:323051295 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/realpython/python-speech-recognition/4/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b1f10e502cb05e8124f91ebd465922d0b82e5c37c08ab6fc6343c4d18caddf5d/realpython/python-speech-recognition/issues/4 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b1f10e502cb05e8124f91ebd465922d0b82e5c37c08ab6fc6343c4d18caddf5d/realpython/python-speech-recognition/issues/4 |
| og:image:alt | I got a new GCP API key, and I tried to use it but I keep getting broken connection: Traceback (most recent call last): File "main.py", line 13, in |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jzoudavy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| turbo-cache-control | no-preview |
| go-import | github.com/realpython/python-speech-recognition git https://github.com/realpython/python-speech-recognition.git |
| octolytics-dimension-user_id | 5448020 |
| octolytics-dimension-user_login | realpython |
| octolytics-dimension-repository_id | 125435050 |
| octolytics-dimension-repository_nwo | realpython/python-speech-recognition |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 125435050 |
| octolytics-dimension-repository_network_root_nwo | realpython/python-speech-recognition |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width