VoiceInsights Python SDK for Google Assistant
Project description
--------------------
--------------------
# Install the package
you can install the package locally in the current folder by using the following command:
#from test PIP repo
pip install -t ./ -i https://testpypi.python.org/pypi voicelabs-assistant
#from main public PIP repo
pip install -t ./ voicelabs-assistant
--------------------
--------------------
## SDK usage:
#import sdk
from voicelabs import VoiceInsights
#instantiate SDK object globally. You only need one object.
appToken = '<YOUR APP TOKEN>'
vi = VoiceInsights(appToken)
#track your events. Example Flask implementation
@app.route('/intent', methods = ['POST'])
def api_intent_handler():
req_json = request.get_json()
data = req_json['originalRequest']['data']
intentName = req_json['result']['metadata']['intentName']
...
#tts string could be plain text or a valid SSML
tts = "Here is my response to the user"
...
resp = vi.track( intentName, data, tts )
--------------------
--------------------
--------------------
# Install the package
you can install the package locally in the current folder by using the following command:
#from test PIP repo
pip install -t ./ -i https://testpypi.python.org/pypi voicelabs-assistant
#from main public PIP repo
pip install -t ./ voicelabs-assistant
--------------------
--------------------
## SDK usage:
#import sdk
from voicelabs import VoiceInsights
#instantiate SDK object globally. You only need one object.
appToken = '<YOUR APP TOKEN>'
vi = VoiceInsights(appToken)
#track your events. Example Flask implementation
@app.route('/intent', methods = ['POST'])
def api_intent_handler():
req_json = request.get_json()
data = req_json['originalRequest']['data']
intentName = req_json['result']['metadata']['intentName']
...
#tts string could be plain text or a valid SSML
tts = "Here is my response to the user"
...
resp = vi.track( intentName, data, tts )
--------------------
--------------------
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for voicelabs-assistant-1.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ffc083a87817055ab1573042d8c3f083fb9424399402556d71ced0091ecb4be |
|
MD5 | 36ae2c9019a2ee5c2f72d2a948c2b80d |
|
BLAKE2b-256 | eea40fc6725dfc0e4d827c66be1edd7dfbb1a76d7007f4f7c6fdbb29e909ea84 |
Close
Hashes for voicelabs_assistant-1.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9890e4d8a3505970c21cefb36e1d8c2f9d3c16216a620bfd38d4b0fca09733c6 |
|
MD5 | 0f342ba2fa6ccb7a50aa2f1136d5dcd6 |
|
BLAKE2b-256 | 904913678cefb53fd8e5746f01b20f2b9e9982fecdfaa59b6a623b70b386ef3d |