palmerabollo / bingspeech-api-client

Microsoft Bing Speech API client in node.js
Other
32 stars 17 forks source link

Issue with `import` #12

Closed pietrop closed 7 years ago

pietrop commented 7 years ago

To get the example code working I had to change the first line to:

const { BingSpeechClient, VoiceRecognitionResponse } = require('bingspeech-api-client');

I think at present node does not support import. As mentioned on MDN

Note: This feature[import] is only beginning to be implemented in browsers natively at this time. It is implemented in many transpilers, such as the Traceur Compiler, Babel, Rollup or Webpack.

palmerabollo commented 7 years ago

Yes, you're right. The examples in the README are for typescript code. I'll add a section to the README when I find some time. Feel free to send a pull request to improve the docs. Thanks.

pietrop commented 7 years ago

Ok thanks @palmerabollo sending you a pull request with an updated README now. Let me know if that works for you.

palmerabollo commented 7 years ago

Perfect, thanks Pietro.