{ "info": { "author": "Google Assistant SDK team", "author_email": "proppy+assistant-sdk@google.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP" ], "description": "Google Assistant Service Bindings for Python\n=============================================\n\nThis package contains the generated Python_ bindings for the `Google Assistant Service`_.\nIt is part of the `Google Assistant SDK`_.\n\nThis package should be compatible with POSIX platforms supporting gRPC_ and Python_.\n\n.. _Python: https://www.python.org/\n.. _gRPC: https://www.grpc.io\n.. _Google Assistant Service: https://developers.google.com/assistant/sdk/guides/service/python/\n.. _Google Assistant SDK: https://developers.google.com/assistant/sdk\n\nInstalling\n----------\n\n- You can install using `pip `_.::\n\n pip install --upgrade google-assistant-grpc\n\nAuthorization\n-------------\n\n- Follow the steps to `configure the Actions Console project and the Google account `_.\n- Follow the steps to `register a new device model and download the client secrets file `_.\n- Generate device credentials using ``google-oauthlib-tool``:\n\n pip install --upgrade google-auth-oauthlib[tool]\n google-oauthlib-tool --client-secrets path/to/client_secret_.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless\n\n- Load the device credentials using `google.oauth2.credentials `_.::\n\n import io\n import google.oauth2.credentials\n\n with io.open('/path/to/credentials.json', 'r') as f:\n credentials = google.oauth2.credentials.Credentials(token=None,\n **json.load(f))\n\n- Initialize the gRPC channel using `google.auth.transport.grpc `_.\n\nUsage\n-----\n\n- Initialize the gRPC stubs using ``google.assistant.embedded.v1alpha1.embedded_assistant_pb2_grpc``.::\n\n import google.assistant.embedded.v1alpha1.embedded_assistant_pb2_grpc\n assistant = embedded_assistant_pb2.EmbeddedAssistantStub(channel)\n\n- Call the `Assist`_ streaming method. It takes a generator of `AssistRequest`_ and returns a generator of `AssistResponse`_.::\n\n assist_responses_generator = assistant.Assist(assist_requests_generator)\n start_acquiring_audio()\n\n- Send a `AssistRequest`_ message with audio configuration parameters followed by multiple outgoing `AssistRequest`_ messages containing the audio data of the Assistant request.::\n\n import google.assistant.embedded.v1alpha1.embedded_assistant_pb2\n\n def generate_assist_requests():\n yield embedded_assistant_pb2.AssistConfig(\n audio_in_config=embedded_assistant_pb2.AudioInConfig(\n encoding='LINEAR16',\n sample_rate_hertz=16000,\n ),\n audio_out_config=embedded_assistant_pb2.AudioOutConfig(\n encoding='LINEAR16',\n sample_rate_hertz=16000,\n ),\n device_config=embedded_assistant_pb2.DeviceConfig(\n device_id=device_id,\n device_model_id=device_model_id,\n )\n )\n for data in acquire_audio_data():\n yield embedded_assistant_pb2.AssistRequest(audio_in=data)\n\n- Handle the incoming stream of `AssistResponse`_ messages:\n\n - Stop recording when receiving a `AssistResponse`_ with the `EventType`_ message set to ``END_OF_UTTERANCE``.\n - Get transcription of the user query from the `SpeechRecognitionResult`_ field.\n - Get conversation metadata like supplemental display text from the Assistant from the `DialogStateOut`_ field.\n - Extract the audio data of the Assistant response from the `AudioOut`_ field.\n\n::\n\n for assist_response in assist_response_generator:\n if resp.event_type == END_OF_UTTERANCE:\n stop_acquiring_audio()\n if resp.speech_results:\n print(' '.join(r.transcript for r in resp.speech_results)\n\tif resp.dialog_state_out.supplemental_display_text:\n print(resp.dialog_state_out.supplemental_display_text)\n if len(resp.audio_out.audio_data) > 0:\n playback_audio_data(resp.audio_out.audio_data)\n\n\n.. _Assist: https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha2#embeddedassistant\n.. _AssistRequest: https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha2#google.assistant.embedded.v1alpha2.AssistRequest\n.. _AssistResponse: https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha2#google.assistant.embedded.v1alpha2.AssistResponse\n.. _EventType: https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha2#eventtype\n.. _AudioOut: https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha2#google.assistant.embedded.v1alpha2.AudioOut\n.. _SpeechRecognitionResult: https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha2#speechrecognitionresult\n.. _DialogStateOut: https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha2#dialogstateout\n\nReference\n---------\n\n- `gRPC reference sample `_.\n- `Google Assistant Service reference `_.\n\nFor Maintainers\n---------------\n\nSee `MAINTAINER.md `_ for more documentation on the\ndevelopment, maintainance and release of the Python package itself.\n\nLicense\n-------\n\nCopyright (C) 2017 Google Inc.\n\nLicensed to the Apache Software Foundation (ASF) under one or more contributor\nlicense agreements. See the NOTICE file distributed with this work for\nadditional information regarding copyright ownership. The ASF licenses this\nfile to you under the Apache License, Version 2.0 (the \"License\"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/googlesamples/assistant-sdk-python", "keywords": "google assistant api grpc", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "google-assistant-grpc", "package_url": "https://pypi.org/project/google-assistant-grpc/", "platform": "", "project_url": "https://pypi.org/project/google-assistant-grpc/", "project_urls": { "Homepage": "https://github.com/googlesamples/assistant-sdk-python" }, "release_url": "https://pypi.org/project/google-assistant-grpc/0.2.1/", "requires_dist": [ "googleapis-common-protos (>=1.5.2)", "grpcio (>=1.3.5)" ], "requires_python": "", "summary": "Google Assistant API gRPC bindings", "version": "0.2.1" }, "last_serial": 4619057, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "a88242b3b8a25c0cf0594fbc84f98208", "sha256": "7d4c4683e9c1e3eadf987bb42d928bc2441c93e886b5f8f92b6b54ad4f7dca1f" }, "downloads": -1, "filename": "google_assistant_grpc-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a88242b3b8a25c0cf0594fbc84f98208", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14220, "upload_time": "2017-05-17T17:05:59", "url": "https://files.pythonhosted.org/packages/c0/85/8fce6bb74d78a499a2909706944c462e6970e61ca43e534b4e3dd144c5cf/google_assistant_grpc-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "43829ae3343eac75cf16f9d317a0de2c", "sha256": "0a77a1bb227f01c5bc5f09b0b7d1622906c948aed33acd2e02fdc2e1fafebe14" }, "downloads": -1, "filename": "google-assistant-grpc-0.0.1.tar.gz", "has_sig": false, "md5_digest": "43829ae3343eac75cf16f9d317a0de2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12872, "upload_time": "2017-05-17T17:06:00", "url": "https://files.pythonhosted.org/packages/9f/44/cba2c429bf56943c4d1b05f87e52d1623555f0412bc9972aa5ece48abbc4/google-assistant-grpc-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "63f80f03e0393c1dcd874c3062d63cbb", "sha256": "2ff3380e8fa61775bfe050eb5d4fed6e1c300cb26d0fb29dcd5a4f41a748f40c" }, "downloads": -1, "filename": "google_assistant_grpc-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "63f80f03e0393c1dcd874c3062d63cbb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14230, "upload_time": "2017-05-26T22:13:28", "url": "https://files.pythonhosted.org/packages/b8/a2/66439fd88eb402514869d595e483237e937df2ff6f77ba99f77f8a65fc66/google_assistant_grpc-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0b6b86982c789cada60047d3fee966ef", "sha256": "a89ac019b54fed694263e815e2cd11199544df505f2b2897f8a94191b9ee661e" }, "downloads": -1, "filename": "google-assistant-grpc-0.0.2.tar.gz", "has_sig": false, "md5_digest": "0b6b86982c789cada60047d3fee966ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12858, "upload_time": "2017-05-26T22:13:29", "url": "https://files.pythonhosted.org/packages/bd/99/86548a9ade68c38b6cf052704ac99ced6fa817237f3846f947b4c866ffda/google-assistant-grpc-0.0.2.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "2977e824251dd51ef6bcef6fdc27333d", "sha256": "955d12d637cb16bedc3ee7d3d318f1e9d3143a24e863b7c8db599065ce527571" }, "downloads": -1, "filename": "google_assistant_grpc-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2977e824251dd51ef6bcef6fdc27333d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19227, "upload_time": "2017-12-20T17:23:30", "url": "https://files.pythonhosted.org/packages/0c/87/dd76876d4312881a93f8827a8d7d81ed9a13daadf1f53a5fd4eca96d8412/google_assistant_grpc-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "21153ffa702fa965c07a249df10fbe76", "sha256": "4303606da6ac896df4efc46a0efab29f20fa5d82ae239002fee44cf1d746df2e" }, "downloads": -1, "filename": "google-assistant-grpc-0.1.0.tar.gz", "has_sig": false, "md5_digest": "21153ffa702fa965c07a249df10fbe76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18550, "upload_time": "2017-12-20T17:23:32", "url": "https://files.pythonhosted.org/packages/28/77/f35ed8365c8e43913e428a7de406c9e53495873e929b46bf6064470908c6/google-assistant-grpc-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "06972f0f5dc8fbe24ec1a1c585dd36f1", "sha256": "3e9ca3b8662713222501da7f3665b49ff73d4607e4245cab13bcbe9969582c19" }, "downloads": -1, "filename": "google_assistant_grpc-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "06972f0f5dc8fbe24ec1a1c585dd36f1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16988, "upload_time": "2018-05-08T17:30:54", "url": "https://files.pythonhosted.org/packages/d3/3c/4a44b54b196fb7f23335f17fdfd3ce477cbff2404324df2ef9ef1f3e4bd3/google_assistant_grpc-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "41af16b224edfeaceb53c210e181b806", "sha256": "a58e0bc335eefd7c1435358d828cf92d469439ceacc302e2d96e2a8020338dbd" }, "downloads": -1, "filename": "google-assistant-grpc-0.2.0.tar.gz", "has_sig": false, "md5_digest": "41af16b224edfeaceb53c210e181b806", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19974, "upload_time": "2018-05-08T17:30:55", "url": "https://files.pythonhosted.org/packages/da/75/94d7e8805139f3d8a62665073bc4cc36c56601553cbf739abf55609933d5/google-assistant-grpc-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "2416f1b2db75386cfcf8fa979ee90db3", "sha256": "18a41f1d31a268e24c7b2e179b4c1374e2b1ba88f7069542850148408b52a454" }, "downloads": -1, "filename": "google_assistant_grpc-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2416f1b2db75386cfcf8fa979ee90db3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21154, "upload_time": "2018-12-20T01:55:37", "url": "https://files.pythonhosted.org/packages/4b/5d/50dbb8197961acf8a4339e8950e0110159456c4ef48234751d1b5f2e919b/google_assistant_grpc-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cfd6ec9918fb0fa8dd5380e11e7061d0", "sha256": "23676343ee18cb84187cc4ff90e7702ccaa0114393bd2497fe84150702907578" }, "downloads": -1, "filename": "google-assistant-grpc-0.2.1.tar.gz", "has_sig": false, "md5_digest": "cfd6ec9918fb0fa8dd5380e11e7061d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18651, "upload_time": "2018-12-20T01:55:47", "url": "https://files.pythonhosted.org/packages/35/8b/479fb760a7da74392a16a37aa119652a130370e60e4c09b7189956259f97/google-assistant-grpc-0.2.1.tar.gz" } ], "0.2.1.dev1": [ { "comment_text": "", "digests": { "md5": "30c75569ed2dc44b0539957539549e39", "sha256": "b61e88ae476b5af6ece6b422ccd132ca9be2a2bf98867b016bfb823008a3b420" }, "downloads": -1, "filename": "google_assistant_grpc-0.2.1.dev1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "30c75569ed2dc44b0539957539549e39", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17058, "upload_time": "2018-06-12T08:14:01", "url": "https://files.pythonhosted.org/packages/b2/5c/51226f560d54dd621bf7050114f7aa2a7757459acd46d0dc711578840f59/google_assistant_grpc-0.2.1.dev1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "84f478cfb0226099dad56b70d4c017dd", "sha256": "a1b2d3b715dc829cbd0ee48883ceb4d0ba6b9a73c0e6ad5e451928fdc60b71a7" }, "downloads": -1, "filename": "google-assistant-grpc-0.2.1.dev1.tar.gz", "has_sig": false, "md5_digest": "84f478cfb0226099dad56b70d4c017dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20422, "upload_time": "2018-06-12T08:14:02", "url": "https://files.pythonhosted.org/packages/65/62/b2e96736fc7231576b65efe0c04d7795391fc48f5e0a0e252d77f551ccd6/google-assistant-grpc-0.2.1.dev1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2416f1b2db75386cfcf8fa979ee90db3", "sha256": "18a41f1d31a268e24c7b2e179b4c1374e2b1ba88f7069542850148408b52a454" }, "downloads": -1, "filename": "google_assistant_grpc-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2416f1b2db75386cfcf8fa979ee90db3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21154, "upload_time": "2018-12-20T01:55:37", "url": "https://files.pythonhosted.org/packages/4b/5d/50dbb8197961acf8a4339e8950e0110159456c4ef48234751d1b5f2e919b/google_assistant_grpc-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cfd6ec9918fb0fa8dd5380e11e7061d0", "sha256": "23676343ee18cb84187cc4ff90e7702ccaa0114393bd2497fe84150702907578" }, "downloads": -1, "filename": "google-assistant-grpc-0.2.1.tar.gz", "has_sig": false, "md5_digest": "cfd6ec9918fb0fa8dd5380e11e7061d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18651, "upload_time": "2018-12-20T01:55:47", "url": "https://files.pythonhosted.org/packages/35/8b/479fb760a7da74392a16a37aa119652a130370e60e4c09b7189956259f97/google-assistant-grpc-0.2.1.tar.gz" } ] }