Detect sound and press key - audio

im trying to figure out how to write a code to detect sound from soundcard and press a key once its detected
Trying to write this using visual studio but need some help getting started

Related

How to create a new destination in Android Studio using a screen reader

I am following the Android Fundamentals using Kotlin codelabs, and one of the tasks is to create a new destination in the navigation editor. It's written that I have to press the New Destination button, but I can't find it. I am blind, and I use the NVDA screen reader under Windows. A possible solution that came to my mind is to write the XML that the IDE would generate if I pressed the button, but I don't know what the exact syntax is.

Get any input from iPad’s virtual keyboard in PyTo

I’m using the PyTo IDE on iPad. Now I want to get the information if any key is pressed on the virtual keyboard. Couldn‘t find a way to do it. I know that PyTo allows to use Objective-C library but that was too complex for me since that is my first encounter with Python and first encounter programming an iPad.

How to type a text with Android Keyboard with Appium and Python?

Introduction
I am developing a script in Python 3.7 using Appium. It will automate some task on a Real Android smartphone. My script need to type some text in textfield.
I don't want to use send_keys method or ActionChains.
I would prefer to type the text, character by character, using the keyboard of the smartphone.
Problem
I investigate and read various docs:
press-keycode
https://appium.readthedocs.io/en/latest/en/commands/device/keys/press-keycode/
which brings me to Keyevent
https://developer.android.com/reference/android/view/KeyEvent.html
Which brings me to KeyCharacterMap
https://developer.android.com/reference/android/view/KeyCharacterMap.html
To be honest with you, after I read it all, it is super difficult for me to undestand all that.
So I made some experimentations by trying different lines of code to see what happens:
driver.press_keycode(0)
driver.press_keycode(1)
driver.press_keycode(2)
etc...
It seems than nothing happen.
Is there anyone who knows a good tutorial or article which can explain me how to type a text in a textfield of an Android smartphone Application using the keyboard instead of send_keys method and ActionChains?
Could you help me please to find the way?

Detect mouse and keyboard events on TravisCI

I've been working on a native Node.js module called RobotJS that allows the user to automate the mouse and keyboard. I've been trying to find a way to automate testing for keyboard and mouse events. For example, I need to be able to confirm that RobotJS is sending the correct keycodes, like "a" and "!". And I need to be able to detect mouse clicks.
I got this working locally using the terminal, here is the code to detect mouse clicks:
https://github.com/octalmage/robotjs/blob/keyboard-tests/test/detectMouse.js
But it doesn't work on TravisCI. I imagine because they don't open an actual terminal window, even though I start xvfb and can detect mouse movement.
I considered writing a new application using Electron to open a window to detect the events, but I'd rather not if I could get my current tests to work.
Thoughts? Here's my current .travis.yml:
https://github.com/octalmage/robotjs/blob/master/.travis.yml
And here's the projects GitHub:
https://github.com/octalmage/robotjs

How can I create a button (or hotkey) that will automatically connect my bluetooth headset?

I have a bluetooth headset that I would like to be able to quickly switch between connection from my laptop(running windows 8) to my phone. I downloaded autohotkey to help me make a hotkey that would connect to my bluetooth headset, but I was only able to make a hotkey that would open the bluetooth control panel for my specific headset, which is not what I was trying to accomplish. What I am trying to accomplish is a hotkey that would immediately connect my headset when typed.
The code I used in autohotkey, to open the bluetooth control panel(by clicking Ctrl+Alt+B) is:
^!b:: run "C:\Program Files\WIDCOMM\Bluetooth Software\BTWUIExt.exe" /deviceAddr=445ef3aa5294
this code won't work for you as the numbers and letters on the end are a uniqe idendifier for my specific headset. You can find your unique id by opening bluetooth in the control panel and right clicking your headset, selecting properties, clicking the bluetooth tab (remove the dots and colons).
This worked to connect the first bluetooth device in the list (Windows 10)
#SingleInstance,force
;https://autohotkey.com/board/topic/83571-autohotkey-connect-to-bluetooth/
^F1::
Run, bthprops.cpl
Sleep, 2000
Send, {tab}{tab}{enter}{tab}{enter}
Sleep, 200
Send,!{Tab}
return
There is very little information to give exact solution. But from given information I can say:
You can automate GUI with AutoHotkey so that script will go to the
place where unique id is located. In fact, AutoHotkey allows any
GUI automation (conventional or non conventional GUI).
If the unique id is there as a text and you can copy it, then it
also can be automated by several ways. If unique id cant be coped
and is as image, then it is slightly complicated and you need to use some OCR
techniques. In that case you need to make screenshot of that region
and use some OCR script getting text out of it. Or with AutoHotkey pass image to OCR software and get text from it.
After you have text, you can manipulate it the way you like. Most powerfull solution
is Regular Expressions which are supported by AutoHotkey.
When unique id is ready to use, you can use it in Run
command this way:
^!b:: run "C:\Program Files\WIDCOMM\Bluetooth Software\BTWUIExt.exe" %MyUnicIDVariable%
Turns out that the code I have works on its own. If I just wait for about 10 seconds after typing out the hotkey, the headphones connect, and the control panel that opened automatically closes. Quite convenient actually as I didn't expect it to connect or to auto-close the window.
Thanks for the effort anyway!
Try to install [Broadcom Bluetooth 4.0 Driver for Windows 8.1 ] LINK=>> 1 !
At least works fine on my HP-EliteBook-8570p with stereo "BlueDio 99B" headset. After switching the headset ON the Windows connect the device automatically, and switch Audio-Stream into new-attached device. Optimal!
PS - Unfortunately it is still the Problem with Windows 8.1 + Skype( MIC-Problem) :( Windows 8 is the first OS, than not support Skype at all! ;)

Resources