Code Monkey home page Code Monkey logo

aframe-speech-command-component's People

Contributors

lmalave 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  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

aframe-speech-command-component's Issues

Break upon npm start

I am encountering an issue when running "npm start"

See attached for error log, as for terminal error, see here

sh: budo: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] dev: budo examples/main.js:build.js --dir examples --port 8000 --live --open
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jono/.npm/_logs/2017-08-31T13_48_46_916Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: npm run dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jono/.npm/_logs/2017-08-31T13_48_46_941Z-debug.log

2017-08-31T13_48_46_916Z-debug.txt

All the same, looking forwards to getting the demos working!

Call a function

Any clues how to call a function?

I'm trying something like this

const commandFunction = () => {console.log('command')}

    const command={
      command:text,
      type: 'function',
      function : commandFunction,
    }

        <Entity
          voice-command={command}
          position-curved-images={positionCurvedImage}
          primitive='a-curvedimage'
          {...geometry}
          className='clickable'
          {...{events}}
        >
        </Entity>

But get this error: Cannot read property 'executeCommand' of undefined

Uncaught TypeError: Cannot read property 'executeCommand' of undefined
at Object. (index.js:94)
at annyang.min.js:8
at Array.forEach ()
at u (annyang.min.js:8)
at z (annyang.min.js:8)
at SpeechRecognition.e.onresult

Documentation out of date

Great component..

Using annyang-voice-recognition and voice-command works for me.

Your documentation references annyang-speech-recognition and speech-command

How to set the speech-command attribute dynamically?

Hello,

The name chosen for the attribute of the component is 'speech-command' but the character '-' seems blocking the setAttribute method. When you try something like the code below, Firefox and Chrome set the attribute with an empty value because of the '-'.

tag.setAttribute('speech-command__open', 'custom command');

Replacing '-' by '_' corrects the problem (I don't know why), but I'm not sure that is the best solution. The component works very well when the attribute is set directly in the HTML, but is there any solution to add the attribute dynamically in JS?

Thank you for reading this.

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.