Skip to content

Instantly share code, notes, and snippets.

View germanviscuso's full-sized avatar
🏠
Working from home

German Viscuso germanviscuso

🏠
Working from home
View GitHub Profile
@germanviscuso
germanviscuso / es-ES.json
Created April 3, 2019 22:20
Alexa Skills Basic: Intent Chaining
{
"interactionModel": {
"languageModel": {
"invocationName": "feliz cumple",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
@germanviscuso
germanviscuso / README.md
Last active November 25, 2023 21:21
DynamoDB connection from an Alexa skill

Alexa Skill Persistence with DynamoDB

This document covers how to use Dynamo DB persistence in your Alexa skill using a direct connection the AWS SDK rather than using the ASK SDK persistence adapter (you can see how to use the adapter here).

Setup w/ ASK CLI

About

This readme assumes you have your developer environment ready to go and that you have some familiarity with CLI (Command Line Interface) Tools, AWS, and the ASK Developer Portal.

@germanviscuso
germanviscuso / es-ES.json
Last active October 15, 2023 21:32
Technovation Workshop (Advanced Fact - es-ES)
{
"interactionModel": {
"languageModel": {
"invocationName": "curiosidades espaciales",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
@germanviscuso
germanviscuso / audioconv.sh
Last active December 29, 2024 07:13
Audio file conversion for Alexa skills
# Convert audio to SSML compatible mp3
ffmpeg -i <input-file> -ac 2 -codec:a libmp3lame -b:a 48k -ar 16000 <output-file.mp3>
# Normalize audio
ffmpeg -i <input-file.mp3> -af loudnorm=I=-14:TP=-3:LRA=11:print_format=json -b:a 48k -ar 16000 <output-file.mp3>
# Do both at the same time
ffmpeg -i <input-file.mp3> -ac 2 -codec:a libmp3lame -af loudnorm=I=-16:TP=-3:LRA=11:print_format=json -b:a 48k -ar 16000 <output-file.mp3>
function supportsDisplay(handlerInput) {
// returns true if the skill is running on a device with a display (Echo Show, Echo Spot, etc.)
// Enable your skill for display as shown here: https://alexa.design/enabledisplay
return handlerInput.requestEnvelope.context &&
handlerInput.requestEnvelope.context.System &&
handlerInput.requestEnvelope.context.System.device &&
handlerInput.requestEnvelope.context.System.device.supportedInterfaces &&
handlerInput.requestEnvelope.context.System.device.supportedInterfaces.Display &&
handlerInput.requestEnvelope.context.System.device.supportedInterfaces.hasOwnProperty('Alexa.Presentation.APL');
}
@germanviscuso
germanviscuso / en-US.json
Created January 2, 2019 10:14
Alexa Skill Basics: Reminders API using the Request library
{
"interactionModel": {
"languageModel": {
"invocationName": "demo of reminders",
"types": [
],
"intents": [
{
"name": "AMAZON.CancelIntent",
@germanviscuso
germanviscuso / en-US.json
Last active January 31, 2023 15:40
Alexa Skill Basics: Global Persistence with the DynamoDB persistence adapter or the S3 Persistence adapter
{
"interactionModel": {
"languageModel": {
"invocationName": "global persistence demo",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
@germanviscuso
germanviscuso / README.MD
Created December 31, 2018 00:12
Enable type checking on Visual Studio Code
@germanviscuso
germanviscuso / script.sh
Created December 30, 2018 16:49
Manage multiple versions of Python (Mac OSX)
brew install pyenv
cd
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
pyenv install -l | grep -ow [0-9].[0-9].[0-9]
pyenv install 3.7.1
pyenv versions
pyenv local 3.7.1
pyenv global 3.7.1
python -V
@germanviscuso
germanviscuso / script.sh
Created December 30, 2018 16:46
List the packages installed globally by npm
npm list -g --depth 0