Intercept voice commands on Google Assistant or Alexa - alexa

I'm planning on doing an experiment, where we will setup a Google Assistant or Alexa device and see how people would interact with voice assistants in a certain environment. It's basically a Wizard of Oz experiment (https://en.wikipedia.org/wiki/Wizard_of_Oz_experiment). Is it possible to intercept the voice commands before they get passed to the Assistant or Alexa? This could help me decide/manage if I want to handle the user input or let Google/Alexa handle it.

Will you be using a purchased "original" device or will you use, e.g. an Raspberry PI and build it yourself?
For the former this won't be possible out of the bow. However, I recently stumbled upon an article. It describes a new device which would achieve something that might help you: It allows you to "reprogram" the activation word for Alexa and Google Assistant. The article mentions that the device's hardware is a Raspberry PI. So, I guess you could build something similar yourself. That was also the first idea that came into my mind.
I would imagine something like this:
On your raspberry you have a script (I guess written in python would be easiest) that listens for the wake-word, e.g. "Alexa" and also records the following voice. However, you have Alexa itself not running for now, so it doesn't get triggered. Your script also includes a logic for when to pass the command on to Alexa or what to do with it instead. When it decides that the command is to be passed on, the script starts Alexa and replays the recording. Thus, triggering it the same way the users would have triggered it, in the first place.
Another idea would be to use two microphones. One for your script and one for Alexa. Your script having the ability to mute/unmute those.
Pleas take into account that those are just spontaneous ideas. It's completely possible that I've missed something and this wouldn't work. But until somebody who has done this before comes up, I'd give it a try!

Related

windows automation and voice control using wake word

I want to use a "wake word" with my windows 10 computer, instead of a hotkey, to run a custom windows automation command.
How can I setup windows to use a "wake word" and then run a custom command?
(Also how can I easily make a windows automation script to launch a program, or find the launched program, and send some keyboard keys and maybe mouse clicks?)
welcome! so it sounds like you want to do 3 things, so it should be 3 questions. If you edit these into 3 separate posts, then you might already find the answers, also. without needing to post. I guess the secret is to break down your complex problem into smaller problems first and try for yourself first. Then share what you tried.
OK, I break it down for you here:
Use voice control on windows (using cortana) with a "wake word" instead of hardware input device
https://www.laptopmag.com/articles/enable-hey-cortana-windows-10
Make a voice command run a custom Command (using cortana)
https://www.windowscentral.com/how-run-custom-commands-using-cortana-windows-10
you want to easily send keyboard and mouse commands by executing one custom command, check out these options as a sample
https://windowsreport.com/automate-pc-tasks/
Have a nice day, and you are not too far off from really getting the true benefits out of this site. Also if you break your questions down correctly, you will get upvotes and good reputation instead of a downvote from the people who check your question to see if its ok for use with this site. If you fix your question the downvote will be fixed by whoever did it, too.

How to send waypoints programmatically to drone?

I am very new at this and trying to get an understanding of this. I have read a lot on the DroneKit-Python site trying to figure out how exactly am I able to communicate with it.
Drone I am currently using is Iris+
I have looked more and there are software that already provide this, but I want to be able to control it plus more.
I want to set waypoints, tell it to then fly give the way points and keep going to them. Also, to be able to arm itself, which is in the example, and override the safety mechanism.
Here is the basic of what I am trying to use it for. Have it fly up at a certain time. Go to the waypoints 1,2,3,1,etc.. Then after X amount of time or on low battery go back to launch point and land.
I have found plenty of code that provides what i need to do, though I don't know if it will work and more importantly I don't even know how to start programming for this. Maybe I have the wrong approach in doing this?
I kind of want this to be a light API, so that in the future I can make a simple UI on my phone and insert some coordinates to give it ways points and that is it. I know there is software out there already that does it, but I want to remove the need for touching the drone. I want it to start and end autonomously.
If anyone could help provide some info that much would be greatly appreciated.
Assuming you have no companion computer (Iris+ does not by default), you are OK with running a ground station app (you won't be out of range to send commands to "end mission on time expiry") and that driving the behaviour from your phone is important, I would be looking at DroneKit Android.
Some notes:
You're going to have to touch the drone at some point to attach the
batteries.
You can arm the device from dronekit
You can override the safety mechanism from a script. I hope you have
a lot of money to pay for the new drones you're going to have to buy when they crash and all the litigation from damaged people and property (in other words "don't do it".
The default behaviour is to return the device to launch (RTL) on low battery. This is convigurable
Setting a time is more "problematic". You can have a timer in a script that then sends return-to-launch but the script needs to be connected to the UAV. This means that either you have to be running in a connected ground station (which might potentially be out of range) or on a companion computer.
Iris+ does not have a companion computer. You have to install one or connect from a Ground Control Station.
DroneKit-Python runs on Linux, MacOSX or Windows. You can't just run it on an ordinary phone, though you could find some other mechanism to send messages/scripts to it running on a companion Computer.
DroneKit Android runs on Android. We do have a planned iOS version too. In theory these could run on a companion computer, but in practice currently these are only used as ground stations.

How to send a notification to another PC?

Is there a way i can send a notification/message to another PC in C/C++? I think something like net send, but i don't know if there is another way to send a notification/message. I created an application which will run on every PC, and i want, that if my application has finished it should send a notification to my PC, that it has finished running. I don't know if there is a solution for my question, but if yes, could someone tell me, how to do that?
Thanks,
kampi
How about using sockets?
http://www.alhem.net/Sockets/tutorial/
Start by learning about WCF. http://msdn.microsoft.com/en-us/netframework/aa663324.aspx
We ended up building a system for alerting all of our retail locations of emergency situations by building a service that opens up a TCP channel using .NET Remoting. It just sits there and listens for notifications. Our command center has a program that can send out notifications to this service. The service is responsible for displaying the message.
The code is proprietary, so I can't share it, but that's the general idea. Remoting has been rolled into WCF, which is why I started by suggesting learning that.
It has been working very well for us for many years, and works just fine on newer versions of Windows (unlike Net Send) and it's faster than Net Send.
Edit - added
I hadn't heard of this until now but you could also look into msg.exe. it looks easier.
http://www.appscout.com/2009/03/vistas_msgexe_replaces_net_sen.php
If you want something like "NET SEND" use mailslots!
Here more info on MSDN: http://msdn.microsoft.com/en-us/library/aa365576.aspx
If you can't use net send, how about just creating a date-stamped temp file of some sort that your other PC looks for?
Make your application a Growl client
Net Send is an option, but I think it will annoy the crap out of you, as it sends console toast to your computer, which pops up in front of the tasks you are working on. Personally, I would find that incredibly annoying.
If you created the application, you have the ability to include notication code. As an example, you can set up a service on your box and write the code to contact that service. On a windows machine, this can be a WCF service. You can also wrap this in a windows service if you want to fire up non-annoying toast.
I am not sure how to set up C to access a service, so another option might be to drop something in a folder and have a file watcher tell you. A bit kludgy, of course.

Remote Desktop Project in C

I want to make project for my final year in college.
So someone suggested me to make Remote Desktop in C.
Now I know basic socket functions for windows in C i.e. I know how to make
echo server in C.
But I don't know what to do next. I searched on internet but couldn't find
something informative.
Could someone suggest me how to approach from this point..any tutorial...or any source ?
I think this is do-able. For a college project, you don't need to have something as complex and as full-featured as VNC. Even demonstrating simple keyboard and mouse control and screen feedback would be enough, in my opinion, and that's well within reach.
If you're doing everything from scratch and using Win32, you can get the remote screen using the regular "printscreen" example all around the internet.
http://www.codeproject.com/KB/cpp/Screen_Capture__Win32_.aspx has it, for one. You can then compress the image with a third-party library, or just send it raw; this wouldn't be very efficient but it would still be a viable demonstration.
Apart from capturing the screen data remotely and showing it in the local window, you'll need to listen for local window messages for mouse and keyboard events, send them to the remote host, and then play them back. http://msdn.microsoft.com/en-us/library/ms646310%28VS.85%29.aspx will probably do that for you.
Check tightvnc TightVNC is a free remote control software package. The source code is also available.
For sending the image of the screen I would probably use rtp. The JRTPLIB is really handy for that.
And yes, as KevinDTimm says, an echo server is the very easiest part.
KevinDTimm may well be right, writing an RDP client would a fairly significant undertaking. To give you some idea, the current spec, available at the top of this page, is 419 pages long and includes references to several additional documents for specific aspects of RDP like Audio Redirection and Clipboards.

prevent screen capture

i am developing a video player i silverlight
i wanna something to prevent recording or screen capturing
i thought about hacking the windows APIs and stop my program from running if there was any of those capturing software asking the user to close it first but i donno how to do this
is there another solution ??!!!!
It's simple not possible. If you try it, you're only going to annoy people.
Even 'hacking the windows API' would not work, since the OS itself could be run inside a VM.
I hate to be a downer, but task is impossible to fully accomplish.
If you were somehow able to hook the keyboard (from a silverlight app no-less) I would certainly hope that whatever AV the user is running would throw up some red flags.
Also what if the user doesn't use the standard (alt)+prtscr? A third-party tool might use a different key-combo. Also, I've written a screen-grabber with the GDI+ API, and there's no way to disable something that low-level.
What about attached capture-cards? What if your app is running in a VM or over remote-desktop?
If you are that deeply concerned about protection your HD content, watermark it, or make the user pay for it first.
All-in-all, as soon as your content's data enters your user's computer, they can duplicate it.
You could go about using a key hook system, stopping the user pressing the print screen key on the keyboard, that would be a start. There aren't many systems which stop users from print screening video specifically. You might want to try just watermarking your video instead? At least then people know that the video was originally sourced from you.
The solution is not to allow your application to run on a computer, but instead target a device such as a phone. Computers will always allow some kind of screen capture and video capture but this is much harder and less likely to be tackled if you restrict to only playing on certain devices.
How badly do you need this? There are many ways to defeat screen capture protection: for instance, aiming a video recorder at the computer screen (or looping output to a TV with a capture card, etc. etc. etc.)
Go for a commercial solution if you really really need this: don't have any experience with those myself, however.

Resources