How can I use cortana voice commands in electron? - node.js

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-

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.

Related

Building Gmail add-ons with Angular framework?

We are finishing up an Outlook add-in which was written using Angular 8 with typescript. I am doing my investigation into what it will take to write a gmail add-on. I've gone through the quickstart tutorial using Apps Script. I've also looked at the clasp tool.
Is it possible to create a Google add-on with the angular framework?
Thank you.
Unfortunately, it is not possible to build Gmail add-ons with Angular framework.
Gmail add-ons are distinct from "Editor Add-ons"(ie. add-ons built for Google Sheets, Google Docs or Google Forms) and are developed strictly with App Script using a widget-based model.
Furthermore, Gmail Add-on development does not grant developer's direct access to the DOM.
See restrictions of Gmail addons.
The short and simple answer is no.
Google Workspace Add-ons UI are created using the Cards framework. Besides Google Apps Script, nowadays it's possible to use programming languages like Java hosted in Google Cloud Run or other hosting infrastructures as long as they deliver JSON to build the add-on UI using the Cards framework.
Reference
https://developers.google.com/workspace/add-ons/guides/alternate-runtimes
You could try using the InboxSDK.
Typically you end up having to manipluate the DOM. This tool caters for most the key functions in an easy to use library.
Not so sure how you will use Angular but it is possible to build rich experiences based on this library.

Linking DialogFlow to a Desktop Application

i just started on a project in DialogFlow and i was wondering is it possible to link my dialogflow to a specific desktop application? And if possible, what is the solution?
For example:
By saying "launch app", it will open up the desktop application "app"
While this is certainly something that Dialogflow's APIs can help with - this isn't a feature provided by Dialogflow itself. Dialogflow's NLP runs in the cloud - there is nothing local that it can "do".
However, you can create a launcher app that does this sort of thing by opening the microphone and sending either the stream or a speech-to-text version to Dialogflow through the Detect Intent API. Dialogflow can determine an Intent that would handle this and pass that information back to your launcher, and your launcher can then locate the app and start it.
I'm not sure how practical this would be, however. Microsoft already has this feature built-in with Cortana, and Google is building the Assistant into ChromeOS which will do this as well. While I'm not aware of Apple doing this, I may just have missed an announcement that Siri does this as well. And if there isn't someone who is doing this for Linux using some local speech-to-text libraries, it sounds like the perfect opportunity to do so.
You may try and use different Dialogflow clients available on their GitHub page. Java Client 2 may be helpful to start your work. However, you will be required to write your own UI code and have to consume Dialogflow API.

Which are the popular bot frameworks for developing chatbot for website or web application?

I am looking to create a chatbot for my web application, I have tried the Microsoft Bot Framework but I am unable to customise chat screen and copy text for the chat screen using both Direct Line and WebChat. So I am looking for options which can provide me more options for customisation.
The webchat control is an open source project you can download and customize. You should be able to edit the scss. The repo can be found here. This is your best option unless you would like to write your own control from scratch. I'm not aware of another framework that has an embeddable control such as webchat.

Mobile app with Node.js backend - What framework to pick for client-side dev?

I'm planning to build a hybrid mobile app,
I have already progressed pretty well with the server-side using Express 3, and PAssport for authentication.
Now I need to make a decision on what framework or library to use for the clinet-side.
I was wondering if I could get some recommendations and perhaps pros and cons of going with frameworks like
Sencha Touch, JQuery Mobile, Phonegap....
and if there is anyother ones that you think it's worth considering please mention them here,
Thanks for any pointers or advice
JQuery Mobile and Sencha Touch are JavaScript libraries that will let you create an HTML5 application that looks like a native application. Cordova/Phonegap lets you wrap your HTML5 app in native code and provides a common JavaScript API that gives you access to native functionality, like taking a picture with the camera or getting the users Contacts. Another benefit of using Cordova is that it creates native applications for you using the same HTML5 app, so you can publish these files to App stores and increase your distribution. With a JQuery/Sencha Touch only app, you can't distribute on app stores because your hybrid app is simply a website (so, I guess it'd only be a mobile app.)
There are hundreds of blog posts comparing different JavaScript frameworks like Sencha vs jQuery vs Dojo, so you should just go off and do some of that reading. Personally I would suggest Dojo as I think it is the most powerful and enterprise ready framework, but it can have a steep learning curve. One thing I like about Dojo though is the build system, you can pick and choose the modules you want so that you don't have to end up including an enormous .js file like JQuery. I have no idea if jQuery can do this, but a lot of user apps I have seen that use Cordova and JQuery end up including all of jQuery and then jQuery mobile.
If you want to access native device features and/or package the web app as a native app and distribute it on the stores, you should use one of those JavaScript frameworks in combinations with Cordova. (Cordova is the new name for PhoneGap.) Phonegap/Cordova is not really used to build mobile web apps, it's used to extend the capabilities of mobile web apps and allow them to access native device functionality in a completely cross platform way.
Ionic is a new framework available for making hybrid apps that I am liking a lot so far. The framework is built with Sass and AngularJS on top of PhoneGap. Ionic just handles the front end so you still build your app with PhoneGap. I found that since it uses AngularJS your javascript code ends up being a lot cleaner and you will save development time making your app slick compared to what you would have to write with jQuery. It also has some beautiful UI elements. The ionic team has done a lot of speed optimizations with the framework so your app will feel more native than your typical hybrid app built purely with PhoneGap. The framework is still in alpha but I have been impressed with it.

Remote control API for Spotify?

Is there such a thing as a Spotify remote control API? I want to write an app which lets the user control the Spotify desktop client (play, pause, volume, playlists, etc.) but I can't seem to find any documentation anywhere.
There are iOS and Android remote control apps out there so I'm just wondering how they do it if there isn't an API.
On Mac OS X, Spotify can be controlled 'remotely' (i.e. from other apps) using AppleScript, either using the bundled API or the System Events service.
Here's an example of using the bundled API: https://github.com/activars/spotify-applescript/blob/master/spotify_control.applescript
And another one using System Events (it isn't quite as elegant): http://www.jacktams.net/2010/04/28/spotify-applescripts-version-0-4-3/
Official documentation is a bit thin, although you should be able to use the AppleScript editor's library feature to find out more about the methods offered.

Resources