Comments (10)
@mushfiq what changes are needed to inform AVS that the device supports templates? I suspect it needs to be alerted to the fact the device has a screen.
from alexa-voice-service-client.
@richtier As of my understanding thats actually independent of the client.
AVS checks whether the display card option is enabled or not (in product settings) and when thats enabled, AVS sends TemplateRuntime as part of response directives.
from alexa-voice-service-client.
Great. If it's that simple then we should be able to simply check `directive.name == 'RenderTemplate'. Can you test that and let me know.
from alexa-voice-service-client.
for directive in alexa_client.send_audio_file(f):
if directive.name in ['Speak', 'Play']:
...
elif directive.name == 'RenderTemplate':
print(directive.directive) # do something with directive template data
from alexa-voice-service-client.
@richtier I will check it and let you know soon.
from alexa-voice-service-client.
@mushfiq ping :)
from alexa-voice-service-client.
Hi @richtier below is my findings:
elif directive.name == 'RenderTemplate':
print(directive.directive) # do something with directive template data
Does not work out of the box.
As the avs_client implementation looks only for octet-stream and it filters out other content type. To overcome that, the current (tested on 1.0.1) implementation needs to be adjusted.
BTW, sorry for late feedback :)
from alexa-voice-service-client.
@mushfiq thanks I will add this feature soon.
How did you test it? I will aim to use your method for testing the new feature
from alexa-voice-service-client.
@richtier as prerequisite the display card options should be enabled from the product settings.
AVS does not provide RenderTemplate out of the box, for some queries it has template data for some it does not. For testing, I had to try out different queries (generally for asking for a place would return a template).
I am also planning to implement it (but not sure when exactly I will be done with that). If I can finish soon, I will submit a PR.
from alexa-voice-service-client.
Hi @richtier I tried the latest version of the client and now RenderTemplate directive is being returned via the client. I am closing this issue. The RenderTemplate payload can be accessed like below:
directive.directive.get("payload")
from alexa-voice-service-client.
Related Issues (20)
- get text from AVS HOT 2
- Client could not install HOT 1
- assert response.status in [http.client.NO_CONTENT, http.client.OK] AssertionError HOT 8
- Hello, I got the authentication code but when i use the authentication code to fetch the access token i get 400 Client Error: Bad Request for url: https://api.amazon.com/auth/o2/token. Is there anything missing. HOT 2
- Host name should be input parameter HOT 3
- Client.send_audio_file returning None HOT 2
- Alexa Voice Service returning new response to Sync Device State HOT 1
- Text response from AVS HOT 1
- Not able to receive data on downchannel stream HOT 2
- Can't get payload when request using file - 'Directive' object is not subscriptable HOT 2
- send_audio_file returnes NoneType. HOT 5
- get alert and notification directives HOT 2
- No user authentication HOT 1
- Multi-step requests triggers fallback from the second step for the customized skill HOT 4
- Stream forcefully closed HOT 2
- sdist or tags
- TypeError: 'NoneType' object is not iterable
- AttributeError: 'NoneType' object has no attribute 'request'
- Change the localization/language Feature
- Simple auto file send not returning? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alexa-voice-service-client.