DIY voice control for Keysight 1000-X scopes - Page 1
Forum section: electronics / testgear

author: jmw
author_rank: Frequent Contributor
timestamp: February 25, 2019, 03:13:12 pm
content: I'd frequently be probing points with both hands and had to carefully twist to press the Single or Stop button, and wished I could just yell at the scope to pause the capture. Keysight does offer voice control for its oscilloscopes — starting on the 6000 series. For those of us on a more modest budget, I found a way to build DIY voice control for less than $50. It works on the DSOX1102G, and probably the new 4-channel version too (crossing my fingers for Wave next month).Update (Mar 25): I've now extended it to work with Rigol scopes, as well as the full family of Keysight 1000-6000 scopes.To build the solution, I started with a Raspberry Pi model 3A+, which has just enough ports to connect to the scope. The model 3A+ is smaller and $10 cheaper than the model 3B, and foregoes several USB ports and wired Ethernet. For a microphone, I used the Respeaker 2 hat that fits nicely in the Adafruit case. For the voice platform, I used Snips.ai. I learned about Snips at a Maker Faire a couple years ago and I really like their platform since it's partially open-source and free for individual use, it can run on the Pi, and it runs everything completely on-device — there's no network connection or cloud BS involved! Total cost: $25 (RPi 3A+) + $7 (Adafruit case) + $11 (microphone hat) = $44.Here's a 1-min video of me probing the FET turn-off in a power supply I built for Nixie tubes. The current sense node is low-level and next to an inductor, so there's no way to obtain good signal integrity without carefully holding the probe and using a ground spring. With my hands full, the voice control really helps when I need to stop the scope or change the view. The Pi is in the lower right corner, and the LEDs blink when the speech processing is active. "Hey Snips" is the wake word to activate speech processing. There is a pause required after speaking the wake word, and between commands, so it's not as snappy as I'd like, but hopefully the Snips developers will improve this over time.The Snips platform does speech recognition and natural language processing to interpret spoken commands into "intents" such as "show channel". I wrote a program that waits for these intent messages, and then sends VISA commands over USB.While I originally wanted voice control just to hit the Single button when my hands were occupied, there are other places where I found voice control could help me work faster. For example, changing the trigger source channel means pressing a handful of buttons on the scope, where I can now command it, "trigger on channel 2". I ended up implementing voice control for most of the "core" commands in Keysight's programming guide. The assistant can control these functions:- Run/Stop/Single- Show/Hide channel (1/2 + math, references, and the external channel)- Vertical/horizontal scale adjustments- Add and clear measurements (duty cycle, rise/fall time, pre/overshoot, +/- pulse width, frequency, period, amplitude/average/min/max/base/top/P-P voltage)- Trigger source and slope- Saving screen captures to a USB driveThe code for my assistant is on Github:https://github.com/jmwilson/ollieThe Snips app with the above functions and intents is here:https://console.snips.ai/store/en/skill_E3eq8QB0Ae- it can be bundled into your own assistant or you can use the trained model in the Github repository.Edit:ready-to-use Raspbian images are now available, linked from the Github readme:https://github.com/jmwilson/ollie#getting-startedI'd like to customize Raspbian's pi-gen system to make ready-to-use images for the Pi, but am blocked at the moment on generating Debian packages for the Respeaker's drivers. For now, the set up requires installing Raspbian lite, installing the Respeaker drivers according to Seeed studio's directions, installing the Snips platform with the trained assistant model, and then running the ollie service. Happy to walk others through the directions for making their own.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 25, 2019, 03:30:12 pm
content: Nice, but way too slow to not be annoying

author: jmw
author_rank: Frequent Contributor
timestamp: February 25, 2019, 03:42:49 pm
content: It's still faster than calling my annoyed girlfriend over to press the button

author: Fungus
author_rank: Super Contributor
timestamp: February 25, 2019, 03:59:10 pm
content: Foot pedals?

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 25, 2019, 04:19:31 pm
content: Can you bypass the wake-up, and use sound volume to get the selectivity - maybe a directional mic

author: jmw
author_rank: Frequent Contributor
timestamp: February 25, 2019, 04:28:49 pm
content: I think the necessity of a wake word is more of software thing -- my guess is it is computationally expensive to run full automated speech recognition (ASR) continuously. Wake word detection is an ASR that is optimized to fire only for a particular phrase but needs less resources and can be running continuously in real-time.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 25, 2019, 07:27:10 pm
content: Quote from: jmw on February 25, 2019, 04:28:49 pmshouldn't be hard to tell when there is some speech using level detection, with a small prestore buffer to avoid missing the start

author: TheSteve
author_rank: Unknown
timestamp: February 25, 2019, 09:18:39 pm
content: I like it!A speed improvement wouldn't hurt, but let's face it, when you need such a feature waiting a second or two is much quicker and easier then growing a third arm.It can likely be adapted for many different products too(I am thinking SA/VNA use).

author: Keysight DanielBogdanoff
author_rank: Unknown
timestamp: February 25, 2019, 10:43:51 pm
content: Really cool project!

author: salvagedcircuitry
author_rank: Regular Contributor
timestamp: February 26, 2019, 12:45:22 am
content: Huh. This is a pretty sweet project. I'm going to give this a go on my 3034a. I think I have a ras pi lying around

author: Smokey
author_rank: Super Contributor
timestamp: February 26, 2019, 02:56:13 am
content: Quote from: jmw on February 25, 2019, 03:42:49 pmMy girlfriend sometimes doesn't respond to my voice commands at all

author: jmw
author_rank: Frequent Contributor
timestamp: February 26, 2019, 03:16:41 am
content: Quote from: salvagedcircuitry on February 26, 2019, 12:45:22 amCool! You'll need to check the USB vendor and product ID and update the keysight1000x.py file. Other than that, I think the VISA command set is the same between the two. Let me know how it goes or if you run into setup problems.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 26, 2019, 10:33:32 am
content: Quote from: jmw on February 26, 2019, 03:16:41 amShouldn't be too hard to make a pretty generic speech-to-SCPI over LXI , which would work on pretty much any instrument. If you get it right it would probably be a quite sellable product

author: LapTop006
author_rank: Unknown
timestamp: February 27, 2019, 12:21:02 pm
content: Looks like it works better than the native voice control on my 6000-X.

author: RoGeorge
author_rank: Super Contributor
timestamp: February 27, 2019, 12:43:17 pm
content: Quote from: mikeselectricstuff on February 26, 2019, 10:33:32 amI'm afraid technology is not there yet. Offline speech recognition is still unreliable, voice capture without a lavaliere microphone is almost impossible, etc. Yet, I'll be very happy if anybody can proved me I'm wrong.A speech-to-SCPI would make a great kickstarter, thought!Areliableoffline voice recognition, in general, will change the world.

author: jmw
author_rank: Frequent Contributor
timestamp: March 03, 2019, 10:41:12 pm
content: Update: I've created ready-to-use images for the Pi, with no manual configuration needed if you're connecting to a 1000-X. Original post has been edited to link to the flashable images.Also, I've made significant speed and responsiveness improvements; there is now no need to pause in between commands!

author: jmw
author_rank: Frequent Contributor
timestamp: March 25, 2019, 03:44:37 pm
content: Short update (and probably last for a while): I finished support for Rigol scopes and all of the 1000-6000 X Keysight scopes, and included more commands, including incrementally changing the horizontal & vertical zoom, and support for MSO digital channels. Latest image here:https://github.com/jmwilson/ollie

author: salvagedcircuitry
author_rank: Regular Contributor
timestamp: April 09, 2019, 06:16:59 pm
content: It seems like there is snips support for the pi zero. Can a pi zero run this or is it limited by the cpu or USB otg input?

author: jmw
author_rank: Frequent Contributor
timestamp: April 10, 2019, 01:50:01 am
content: The pi zero only works as a satellite, meaning it streams the audio to something else with more processing power. I think the Pi 3 is the minimum for running the entire Snips platform on a single device. Seehttps://docs.snips.ai/articles/raspberrypi/hardware/hardware.

author: Housedad
author_rank: Frequent Contributor
timestamp: April 10, 2019, 04:12:45 am
content: That is so cool. I wonder how long it will be till someone writes a Android App for tablets and phones to use their voice recognition and then send the proper commands out the USB port.Imagine the graphics possibilities for verification of commands or even have it talk back to you.Wild, wild, world.

author: EEVblog
author_rank: Unknown
timestamp: April 10, 2019, 04:33:44 am
content: Quote from: mikeselectricstuff on February 26, 2019, 10:33:32 amWas just thinking that myself

author: Bud
author_rank: Super Contributor
timestamp: April 10, 2019, 05:19:37 am
content: Quote from: Housedad on April 10, 2019, 04:12:45 amI've got it. I call it "wife".

author: Electro Detective
author_rank: Super Contributor
timestamp: April 13, 2019, 09:39:23 am
content: Program it to respond with rapper commands too"Yo bitch, enuffadatsheet, gets back to sweepin.."

author: james_s
author_rank: Super Contributor
timestamp: April 13, 2019, 05:16:52 pm
content: I loathe voice control, we have one of those Echo things which admittedly is handy as a kitchen timer but most of the time I wish I could control it by pushing buttons, talking to machines always feels awkward and tedious and it often mis-hears me or picks up sounds from the TV. Seems to be the latest fad though.

author: jmw
author_rank: Frequent Contributor
timestamp: April 14, 2019, 12:17:14 am
content: A lot of Alexa does seem like a solution in search of a problem. In this case, and the reason I built it, is that voice control is absolutely indicated as a form of human-computer interaction when one's hands or eyes are already occupied, as is the case when doing high-frequency probing. It was after addressing this problem that I found a lot of other scope functions could be done faster by voice. For example, changing the trigger source or edge slope requires punching at least 3 buttons and turning a knob on my scope.

author: Electro Detective
author_rank: Super Contributor
timestamp: April 14, 2019, 12:34:12 am
content: Basic KIS commands would be handy > Run, Stop, AutoSet, Single, Save etcOld school knobs, switches and dials for the restA built in microphone with small voice recognition program (Dragon mini?) would offer better accuracy and security,so no external or background noise to stuff things upOther users can have their voice profile in there too, or saved on a USB stick and loaded up------------------------@ lurking DSO manufacturer reps:I expect a nice FAT royalty cheque for this innovative revolutionary proposal/idea ASAP,...and a humble patent/copyright ongoing percentage

author: Noy
author_rank: Frequent Contributor
timestamp: January 21, 2022, 02:03:21 pm
content: Found this topic just now...here is my new thread for such things:https://www.eevblog.com/forum/testgear/voice-control-for-testgear-(oszi)-with-sepia-framework-pc-mic/msg3956282/#msg3956282Are there any news for your speech-to-lxi support?Maybe just use your already to your testgear connected ( LXI/GPIB/Serial Port ) PC and a microphone / webcam?Found something called "bitvoicer" but it looks like its closed already.. Any new regarding SNIPS alternatives? Found the sepia framework which will run on WIN / Linux desktops too.. Would be nice to prevent the usage for additional bench filling hardware (beside the allocation situation for RPis..)