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

Artyom.newDictation is not a function #37

Closed
danieluyo opened this issue Aug 11, 2017 · 1 comment
Closed

Artyom.newDictation is not a function #37

danieluyo opened this issue Aug 11, 2017 · 1 comment

Comments

@danieluyo
Copy link

when i do

var UserDictation = Artyom.newDictation({
        continuous: true, // Don't stop never because i have https connection
        onResult: function (text) {
            /**
             * Set the recognized text as value of the text input
            **/
        },
        onStart: function () {
            console.log("Dictation started by the user");
        },
        onEnd: function () {
            alert("Dictation stopped by the user");
        }
    });

I get :/

Uncaught TypeError: Artyom.newDictation is not a function
@sdkcarlos
Copy link
Owner

Since Artyom 1.0.6 you need to create a new instance of artyom:

var MyAssistant = new Artyom();

var UserDictation = MyAssistant.newDictation({
        continuous: true, // Don't stop never because i have https connection
        onResult: function (text) {
            /**
             * Set the recognized text as value of the text input
            **/
        },
        onStart: function () {
            console.log("Dictation started by the user");
        },
        onEnd: function () {
            alert("Dictation stopped by the user");
        }
    });

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

2 participants