tom-s / speak-tts

80 stars 20 forks source link

Fix/onend #2

Closed tom-s closed 7 years ago

tom-s commented 7 years ago

Cleaned dependancies + fixed onEnd issue

webmagnets commented 7 years ago

When I run this:

 Speech.speak({
        text: 'Hello, how are you today?',
        onError: (e) => {
            console.log('sorry an error occured.', e)
        }, // optional error callback
        onEnd: () => {
            console.log('your text has successfully been spoken.')
        } // optional onEnd callback
    })

I'm getting this in the console:

sorry an error occured. undefined

tom-s commented 7 years ago

I've forgotten to pass the exception on the onError callback. It's fixed and published. It won't solve your issue but the log should indicate you what's going wrong.