Since Library is deprecated, how should I go about embedding my Assistant with hotword capabilities? - google-assistant-sdk

Until recently, I used Google Assistant Library’s hotword Assistant to embed it into a raspberry Pi, mostly due to it’s hotword capabilities. I've done quite a few tweaks to make it work in a bigger project and add some functionalities to it.
Since now deprecated, I checked through the Service part of the actions SDK to make something similar, but ended up not finding what I wanted : the hotword part. I tried with the pushtotalk.py code but it seems way more complicated than the hotword.py, and of course does not have hotword capabilities on its own.
I tried snowboy, but for other reasons not related this is not a possibility.
Also, I tried to contact the support concerning the deprecation (how long will they support it/is there an alternative), but they sent me here.
So here is my question : is there a way to trigger the pushtotalk.py with a hotword/programmatically with an event ? (Ideally I would like to trigger it via a WebSocket event)
Also, is there any information concerning the deprecation of the Google Assistant Library part that I did not find on the Internet ?

Related

Blocking all connections to a specific domain only

I've been struggling to find how I could potentially implement a simple (iOS) app that would be able to block all connections to a specific domain (to prevent the user from accessing a specific social media platform for example, even from another app).
The information that I have found so far is that I should probably create a Packet Tunnel Provider within a Network Extension and ask the user to add VPN configurations, but I haven't found any example code that would show exactly how to implement this.
Do you have any idea how I could do that in a simple way (block all connections to a specific domain)? Is there a framework/library that I could use to do it easily?
Thank you!
Well, it would not be easy, but you can do it.
Sample code from Apple could be found here and here. This project is for iOS, but it may be on deprecated Swift version, so you will need to do some work to launch it now.
The part you are interested in the SimpleTunnel sample is FilterDataProvider and FilterControlProvider, other things you can omit, because the purpose of this sample is to demonstrate a lot of abilities.
There is also a sample for macOS that is more focused on your needs, and macOS SDK is alike to iOS, but less powerful.
You may want to see this video to sort things up in mind.
There are a lot of firewalls solutions for ios and mac, and some of them are opensource
The part you are interested in the SimpleTunnel sample is FilterDataProvider and FilterControlProvider, other things you can omit, because the purpose of this sample is to demonstrate a lot of abilities.
You will need a developer account, a network extension capability assigned to an application identity, and proper network extension entitlement file a to run things up.
There is a way to sign it manually for development without account&capability, but to distribute you will need it anyway.
For some restrictions you may be needed to install MDM profile on the device.

Embed Unreal Engine 4 project into another app

I've been trying to work on a proof of concept (POC) where I can embed a UE4 project into an existing application (in my case NativeScript) but this could just as easily apply to Kotlin or ReactNative.
In the proof of concept I've been able to run the projects on my iPhone launching from UE4 pretty easily by following the Blueprint and C++ tutorials for the FPS. However the next stage of my POC requires that I embed the FPS into an existing NativeScript application, this application will manage the root menu, chat, and store aspects of the platform in the POC.
The struggle I'm running into is that I cannot find how to interact with the xcode project generated from the blueprint tutorial and the C++ tutorial generates a xcode project that i'm unsure where the actual root is that I need to wrap.
Has anyone seen a project doing this before and if so are there any blogs or guidance that you can point me to? I've been Googling and looking around for a couple weeks and have hit a dead end. I found a feedback post here from April of 2020, that was referring to a post in January 2020 that talked about how Unity has a way to embed into other applications additionally a question from 2014 here. But other than that it's a dead end.
A slightly different approach
Disclaimer: I'm not an UE4 developer. Guilty as charged for seeing an unanswered bounty too big to ignore. So I started thinking and looking - and I've found something that could be bent to your needs. Enters pixelstreaming.
Pixelstreaming is a beta feature that is primarily designed to allow for embedding the game into a browser. This opens a two way communication between a server where the GPU heavy computations happen and a browser where the player can interact with the content - the mouseclick & other events are sent back to the server. Apparently it allows some additional neat stuff, however that is not relevant for the question at hand.
Since you want to embedd the Unreal application into your NativeScript tool(menu of some kind if I understood correctly), you could make your application a from two separate parts:
One part would run the server.
The second part would handle the overlay via the pixelstreaming.
This reduces the issue of embedding the UE4 into an application to the(possibly easier) issue of embedding a browser into your application. (Or if your application is browser based - voila, problem solved.)
If you don't want to handle the remote communication, just have the server-side run on the localhost.(With the nice sideeffect of saving bandwidth.)
Alternatively, if you are feeling adventurous, you could go and write your own WebRTC support on the application side to bypass the need for the browser alltogether. It might not be worth the effort though.
Side note: The first of the links you provided is a feature request which hints at the unfortunate fact that UE4 doesn't support embedding. This is further enforced by the fact that one of the people there says somethig along the lines "Unity can to this, it would be nice if UE4 could as well."
Yet a different approach:
You could embedd and use a virtual display to insert the UE4 part into your controller - you would be basically tricking UE4 into thinking that the desired display device is a canvas inside your application.
This thread suggests a similar approach:
In general, the way to connect two libraries like this would be through a platform dependent window handle, e.g. a HWND under Windows. Check the UE api if you find any way to bind the render target to a HWND. Then you could create a wxWindow in wxWidgets and tell UE to render into that window. That would be a first step.
I'm not sure if anything I've listed will be of much help but hey, at least I tried :-). Good luck with your game.
At the same time, the author suggests to:
Reverse the problem:
Using the UE4 slate framework and online subsystem. You would use the former to create the menus you need directly in the UE4 and then use the latter to link to the logic you want to have outside of the UE4. However that is not what you asked for so I'm listing it only for the completeness sake.

How to design a multi platform video conference/chat app?

I am a developer who is still learning . I want to design an app which can allow multiple people to have a video conference/chats simultaneously something like zoom . I know i can design native apps like specific for Android as well as iOS but I am still learning Android development and have no idea about iOS code .I searched and found that we can have hybrid apps having React,Node.js or with Angular.js and they work on different platforms .But as I'm a newbie I need suggestions as well as guidance .what I'm expecting in my app are following things :
Should support all video resolutions and audio quality, should
work in low and high network scenarios
Should be low on usage of power/ processor
Should not have any external hardware dependency
Should work on any device
Should have chat option during conference, even the multi
people conference
Should have sign-in and non-sign-in options to join a
conference
Can be browser and/or app based interface
Should have encrypted network communication
Should have audio/ video recording feature
Should have screen/file sharing capabilities
Should allow audio to close captioning during chat
(multilingual)
Should have capabilities to host multiple concurrent
conferences having multiple participants in each conference
I know its a tedious task to involve everything I discussed but I need guidance how to do this .
I have already told my expectation so now I want to know what steps I need to do so ,How to start as well as where to start ,what language/library I should choose ,whether having a hybrid app be a good idea or should I go for native apps .As I have earlier said I am a learner so I am going to learn each and everything to get my project done ,so whether its react or node or angular or whatever experienced developer are going to suggest/guide here .I know my question may look broad or even vague but still I am asking only because I see stack-overflow as a group of supportive accomplished coders .Hope you guys will help me in getting my project done .Thank you !
OK then you have got much work to do. I will point you to some references which should give you a good start. I will try to keep this as short as possible.
As you mentioned, WebRTC is the way to go.
With WebRTC, you can add real-time communication capabilities to your
application that works on top of an open standard. It supports video,
voice, and generic data to be sent between peers, allowing developers
to build powerful voice- and video communication solutions. The
technology is available on all modern browsers as well as on native
clients for all major platforms.
This blog explains how WebRTC functions in details - https://medium.com/#anto.christo.20/understanding-web-real-time-communication-webrtc-d4cec5a43f2f
This blog explains how to build peer2peer video calling in android -
https://medium.com/#anto.christo.20/understanding-web-real-time-communication-webrtc-d4cec5a43f2f
https://webrtc.org/ also contains lot of headstart material including sample code.
Once you have done this you can add other features on top of it.
Now, this will take care of peer2peer but if you want o build a multi-user functionality from scratch there is some extra work required as mentioned in the answer - how to build multi-user video chatting web app using webRTC, node.js and socket.io

Network extension framework versus kernel extension

I am looking to implement firewall/network filtering functionalities for macOS.
I am looking at the most secure way to do this, i.e. trying to make sure no network traffic is missed, and that my filtering cannot easily be by-passed.
After searching around, I can see that Apple has deprecated Network Kernel Extension. They recommend now to use the Network Extension framework.
However, I can see that firewalls for mac, for example Lulu and Little Snitch have moved to using Kernel Extension, and not the Network Extension framework.
Is there a good reason to do so? Do Kernel Extension allow a deeper, more secure filtering?
for example Lulu and Little Snitch have moved to using Kernel Extension
I can't speak for Lulu, but Little Snitch at least was developed long before the "Network Extension" API was introduced, it certainly didn't "move to" the NKE API. According to an article on their own blog it looks like they're actively investigating moving to Network Extensions. I suspect that as long as NKEs work without restrictions on all macOS versions they support, they'll keep using those, in order not to have to ship different back-ends simultaneously. But they probably have some kind of internal prototype using the newer APIs already to make sure they're prepared for when NKE APIs are finally removed from the OS.
If Network Extensions support your use case, you should probably go with them. If they don't, you should file Enhancement Requests with Apple, or you will be out of options when NKEs stop working.
Edit: To deploy NKEs, you will essentially need a kext signing certificate (Developer ID Application + Kext) if you don't already have one. The alternative is forcing your users to disable SIP's kext signing requirement, which is neither sensible nor reasonable in most cases. I hear Apple has made it much harder to obtain such a certificate in recent years.

Rest Server on iOS device using Swift

I need a way to have an iOS application that can accept a message on a device connected via USB, query a bunch of data about the device and return a response with this data.
I am brand new to iOS and swift development so I need something that is;
Simple
Uses CocoaPods (due to lack of ios support in Swift Package Manager)
NOT require distribution via the App Store (which I believe rules out using APN)
I have tried the following:
BlueSocket: https://github.com/IBM-Swift/BlueSocket
This can probably do the job but is very low level and require lots of work around handling buffer sizes, etc. So a REST solution might be a better
Kitura: https://www.kitura.io/
This seems ideal. However, it only appears to support Swift Package Manager which makes it a big PITA to implement currently (reminder; swift/ios newb here)
CoacoaHttpServer: https://github.com/robbiehanson/CocoaHTTPServer
This looks ok, however I can only find Objective-C examples. Would prefer to have something that includes solid Swift examples (also, the repo doesn't look like it's been updated since 2015)
Are there any other approaches I should consider that I haven't listed here?
You may want to check https://github.com/IBM-Swift/Kitura-HelloWorld-iOS.
I wrote a couple of blog posts about it https://developer.ibm.com/swift/2017/03/13/kitura-ios/, https://developer.ibm.com/swift/2017/12/08/kitura-ios-part2/.
Note that it is a demo repository, I do not know if IBM will support Kitura on iOS (it is supported on Linux).

Resources