Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a way to get the SpeechKITT as require('speechKITT')? #33

Open
ghost opened this issue Feb 22, 2017 · 7 comments
Open

There is a way to get the SpeechKITT as require('speechKITT')? #33

ghost opened this issue Feb 22, 2017 · 7 comments

Comments

@ghost
Copy link

ghost commented Feb 22, 2017

There is a way to get the SpeechKITT as require('speechKITT')?

Expected Behavior

const SpeechKITT = require('speechKITT');

@MxMGirou
Copy link

MxMGirou commented Aug 21, 2017

@sayeko have you finded a way to the issue ?

@ghost
Copy link
Author

ghost commented Aug 21, 2017

I didn't try to find a solution, but I think the best way you can handle it is to load the script and listen when it fully loaded then fire event to your application and create a service that will wrap speechKITT.
And of course the service will use the commonjs module so you will not have any problem to share the facade service for speechKITT across your application via simple require.

@MxMGirou

@MxMGirou
Copy link

@sayeko , I've heard that Speech reconiztion have beed removed form tools likes electron/chromnium... :(

@ghost
Copy link
Author

ghost commented Aug 22, 2017

@MxMGirou I did not hear about removing voice recognition api from chrome..
If you want I created a small api facade that wrap voice recognition for webapps and hybrid application.
Moreover if pepole will ask I may recreate it in ES6/ES7 class implementation.

Github.com/sayeko/carolina

@MxMGirou
Copy link

@sayeko Yes, i saw that. I will look at it thank you ;)

@maximusmars
Copy link

For fixing the issue you have to add the right path in your package.json:
"main" property should be "src/speechkitt.js" and not just "speechkitt.js".

A work around is to import the package with the full path, something like
import speechKitt from './node_modules/speechkitt/src/speechkitt';
or
var speechKitt = require('./node_modules/speechkitt/src/speechkitt');

@amirgro
Copy link

amirgro commented Dec 20, 2017

@maximusmars thanks. Though import speechKitt from './node_modules/speechkitt/src/speechkitt';
did not work for me. Instead I used:
import { SpeechKITT } from './node_modules/speechkitt/src/speechkitt'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants