lmalave / aframe-speech-command-component Goto Github PK
View Code? Open in Web Editor NEWA speech recognition component for the A-Frame WebVR library
Home Page: https://lmalave.github.io/aframe-speech-command-component/
License: MIT License
A speech recognition component for the A-Frame WebVR library
Home Page: https://lmalave.github.io/aframe-speech-command-component/
License: MIT License
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.
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!
I don't think you need to escape
https://github.com/lmalave/aframe-speech-command-component/blob/master/package.json#L29
Can use angle brackets.
Great component..
Using annyang-voice-recognition
and voice-command
works for me.
Your documentation references annyang-speech-recognition
and speech-command
@lmalave Hello!
Good idea and I am start do this component too, but found yours
And it is does not worked
You should
I did it all but fail
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.