How can I use cortana voice commands in electron?

767 views Asked by At

Is it possible to use cortana voice commands in electron? I'm talking about the actual UWP API not cortana skills. I don't need a bot I want to be able to use my voice commands offline and the type of actions that my app provides doesn't need any third-party API. (something like "hey cortana ask [MY APP] how many movies do I have?")

I have seen cortana voice command sample with winJS and it is possible to use winJS in electron. but how am I actually going to use a VCD file in Electron with winJS? the sample code is for visual studio and winJS only

so I'm hoping for some clarification or a guideline on how to use VCD in electron-

1

There are 1 answers

0
Xie Steven On

Electron enables developers to build Desktop apps using JavaScript and Node modules. Then, if you want to know whether the UWP APIs callable from a classic desktop app, you could check this document: https://msdn.microsoft.com/en-us/library/windows/desktop/mt695951(v=vs.85).aspx

After you know if the specific UWP API is callable from desktop app, then, next step is how to call this API in Electron. There’s an open-source project named as NodeRT.

NodeRT automatically exposes Microsoft’s UWP/WinRT APIs to the Node.js environment by generating Node modules. This enables Node.js developers to write code that consumes native Windows capabilities. The generated modules' APIs are (almost) the same as the UWP/WinRT APIs listed in MSDN.

So, you could use it to call the specific UWP APIs in Electron.