Giter Site home page Giter Site logo

jovo-templates's Introduction

Jovo v3 Templates

This repository only contains templates for Jovo v3. You can find the Jovo v4 templates here: TypeScript, JavaScript.

The examples in this repository are a great starting point to learn about specific features of the Jovo Framework.

To access the templates, you first need to install the Jovo CLI with $ npm install -g jovo-cli. Then, you can create a new project from your command line with the following command:

# Standard version
$ jovo3 new <directory> --template <name>

# Short version
$ jovo3 new <directory> -t <name>

The following templates are currently available:

Name Description
helloworld Default. Jovo Sample Voice App with a simple "Hello World!" + asking for the user's name
trivia-game Trivia game voice app that makes use of states, helper functions, and i18n
alexa/audioplayer Sample Alexa Audioplayer Skill that plays a longform audio file with the Audioplayer directive
alexa/dialoginterface Sample implementation of the Alexa Dialog Interface
alexa/skillevents Sample implementation of the Alexa Skill Events.
google/mediaresponse Sample Google Action media response app that plays longform audio file

jovo-templates's People

Contributors

allanmelo avatar aswetlow avatar florianhollandt avatar frivas avatar kaankc avatar m-ripper avatar pialuna avatar rubenaeg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jovo-templates's Issues

Cannot find module 'alexa/apl/javascript/src/apl/main'

Thank you for the Jovo template, I believe that there is a problem in the template path. After the first run, I received this error: "Cannot find module 'alexa/apl/javascript/src/apl/main'"

The problem I believe is in the path of in the LAUNCH Intent:

"document: require(alexa/apl/javascript/src/apl/main), // Plain "Hello World" template"

This path removest the problem:

"document: require(./apl/main.json), // Plain "Hello World" template"

Debugger not working with Google Conversational template

Hi. I'm not sure what's wrong here, but the debugger does not seem to be working with the Google conversational template.
I created the project like this:

jovo new --template google-conversational-actions-helloworld

And didn't make any modifications.

I've tried a number of times with different locales, switching back to v1, and both with speaker and phone. It just doesn't answer.

image

The logs show there is a response. But it just doesn't come up in the debugger.

How to use two or more templates?

Hi, doing a couple of tutorials I've found you have a template for Actions on Google, and another for Alexa Dialog, and another for unit testing and so on. Say I want to start a project by combining two or more of these templates. How would I go about this?

Suggestion for typescript/podcast-player

Suggested change, since what's there (commented out here) wasn't being accepted for me:

// const episodesJSON = require('./episodes.json');
import * as episodesJSON from './episodes.json'

The alternative seems to be to turn esModuleInterop on in tsconfig.json, and I'd worry about that having other effects.

Deployment problem

Alexa Audio Player
jovo version 1.1.11

After running :
$ jovo init alexaSkill
$ jovo build
$ jovo deploy

I get the following error:
Updating Alexa Skill project for ASK profile default

Cannot find module " /home/ ... /platforms/alexaSkill/models/en-US.json"

There is a skill.json file and an en-US.json file it's just in a different folder than the one it's looking for.

When I run jovo run it also says it cannot find then index.js file even though one exists.

Cannot find module './apl/undefined/document.json'

hi
i just launch invocation getting below error

apl/undefined/document.json

Error -----------------------------------------------------------------

Code:
MODULE_NOT_FOUND

Message:
Cannot find module './apl/undefined/document.json'
Require stack:

  • C:\Users\hp 1\AppData\Roaming\npm\alexa-apl\src\app.js
  • C:\Users\hp 1\AppData\Roaming\npm\alexa-apl\src\index.js

Stack:
Error: Cannot find module './apl/undefined/document.json'
Require stack:

  • C:\Users\hp 1\AppData\Roaming\npm\alexa-apl\src\app.js
  • C:\Users\hp 1\AppData\Roaming\npm\alexa-apl\src\index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at AlexaSkill.ShowTemplateIntent (C:\Users\hp 1\AppData\Roaming\npm\alexa-apl\src\app.js:39:22)
    at Function.applyHandle (C:\Users\hp 1\AppData\Roaming\npm\alexa-apl\node_modules\jovo-core\src\plugins\Handler.ts:177:35)
    at handle (C:\Users\hp 1\AppData\Roaming\npm\alexa-apl\node_modules\jovo-core\src\plugins\Handler.ts:239:19)
    at Middleware.run (C:\Users\hp 1\AppData\Roaming\npm\alexa-apl\node_modules\jovo-core\src\core\Middleware.ts:85:11)
    at App.handle (C:\Users\hp 1\AppData\Roaming\npm\alexa-apl\node_modules\jovo-core\src\core\BaseApp.ts:274:7)
    at App.handle (C:\Users\hp 1\AppData\Roaming\npm\alexa-apl\node_modules\jovo-framework\src\App.ts:333:5)

issue on request any template

hi
i just launch invocation and first template is ok, but other is ko

apl/undefined/document.json'


  Code:
  MODULE_NOT_FOUND
  
  Message:
  Cannot find module './apl/undefined/document.json'
  Require stack:
  - /Users/sylvain/alexa/testAlexaPresentationLanguage/testApl/src/app.js
  - /Users/sylvain/alexa/testAlexaPresentationLanguage/testApl/src/index.js

Capture d’écran 2019-08-25 à 20 00 02

AudioPlayer.PlaybackNearlyFinished triggers too early

I need to play a list of mp3 urls.

Right now, when using your template then:
PlaybackNearlyFinished triggers too early, I need to play a list of mp3 files. But It only plays them for 1 sec and then plays next one for 1 sec etc...

Code

"use strict";

// =================================================================================
// App Configuration
// =================================================================================

const { App } = require("jovo-framework");

const config = {
  logging: true,
  intentMap: {
    "AMAZON.PauseIntent": "PauseIntent",
    "AMAZON.ResumeIntent": "ResumeIntent"
  }
};

const app = new App(config);
let mp3Arr;

let currentMp3Count = 0;
app.setHandler({
  LAUNCH: function() {
    this.toIntent("PlayIntent");
  },

  PlayIntent: function() {
    mp3Arr = [
      "https://s3.amazonaws.com/jovo-songs/song1.mp3",
      "https://s3.amazonaws.com/jovo-songs/song1.mp3"
    ];
    this.alexaSkill()
      .audioPlayer()
      .setOffsetInMilliseconds(0)
      .play(mp3Arr[currentMp3Count], "token")
      .tell("Playing news");
  },

  PauseIntent: function() {
    this.alexaSkill()
      .audioPlayer()
      .stop();
    this.tell("Paused!");
  },

  ResumeIntent: function() {
    this.alexaSkill()
      .audioPlayer()
      .setOffsetInMilliseconds(0)
      .play(news[currentNews].url, "token")
      .tell("Resuming!");
  },

  StopIntent: function() {
    console.log("StopIntent");
    this.endSession();
  },

  AUDIOPLAYER: {
    "AudioPlayer.PlaybackStarted": function() {
      console.log("AudioPlayer.PlaybackStarted");
      this.endSession();
    },

    "AudioPlayer.PlaybackNearlyFinished": function() {
      console.log("AudioPlayer.PlaybackNearlyFinished");
      currentMp3Count++;

      if (currentMp3Count < mp3Arr.length) {
        this.alexaSkill()
          .audioPlayer()
          .setOffsetInMilliseconds(0)
          .play(mp3Arr[currentMp3Count], "token");
      } else {
        currentMp3Count = 0;
        this.toIntent("StopIntent");
      }
    },

    "AudioPlayer.PlaybackFinished": function() {
      console.log("AudioPlayer.PlaybackFinished");
      this.endSession();
    },

    "AudioPlayer.PlaybackStopped": function() {
      console.log("AudioPlayer.PlaybackStopped");
      this.endSession();
    }
  }
});

module.exports.app = app;

TS-Jest version is breaking "jovo new" for Typescript

Error:
When trying to create a new project with the New CLI in Typescript, the dependency libs conflict. Jovo-sample-voice-app uses version 26.6.3 of Jest. However, TS-Jest supports only up to version 25.5.1.

Evidence:
Captura de Tela 2021-02-22 às 16 15 44

To reproduce error:

jovo new test --language typescript

Solution:
Update TS-Jest to a newer version: 26.5.1

Dialog is completed on the 1st run

Hi!

This is regarding the alexa/dialoginterface example.

I'm trying to make this example work after a couple failed tries with getting the elicitation to work in my project. Unfortunately I'm running into the same issue in this unmodified example as well, which is that as soon as the logic moves to SearchFlightIntent the $dialog.isCompleted() returns true and no slot is ever getting filled (besides maybe the 1st one that was the parameter for the intent invocation).

Am I missing something or is there some issue with this logic currently?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.