Author Topic: DIY voice control for Keysight 1000-X scopes  (Read 5452 times)

0 Members and 1 Guest are viewing this topic.

Offline jmwTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: us
DIY voice control for Keysight 1000-X scopes
« on: February 25, 2019, 03:13:12 pm »
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 drive

The code for my assistant is on Github: https://github.com/jmwilson/ollie
The 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-started

I'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.
« Last Edit: March 25, 2019, 03:40:53 pm by jmw »
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13742
  • Country: gb
    • Mike's Electric Stuff
Re: DIY voice control for Keysight 1000-X scopes
« Reply #1 on: February 25, 2019, 03:30:12 pm »
Nice, but way too slow to not be annoying
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline jmwTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: us
Re: DIY voice control for Keysight 1000-X scopes
« Reply #2 on: February 25, 2019, 03:42:49 pm »
It's still faster than calling my annoyed girlfriend over to press the button ;)
 
The following users thanked this post: wraper

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16642
  • Country: 00
Re: DIY voice control for Keysight 1000-X scopes
« Reply #3 on: February 25, 2019, 03:59:10 pm »
Foot pedals?
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13742
  • Country: gb
    • Mike's Electric Stuff
Re: DIY voice control for Keysight 1000-X scopes
« Reply #4 on: February 25, 2019, 04:19:31 pm »
Can you bypass the wake-up, and use sound volume to get the selectivity - maybe a directional mic
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline jmwTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: us
Re: DIY voice control for Keysight 1000-X scopes
« Reply #5 on: February 25, 2019, 04:28:49 pm »
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.
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13742
  • Country: gb
    • Mike's Electric Stuff
Re: DIY voice control for Keysight 1000-X scopes
« Reply #6 on: February 25, 2019, 07:27:10 pm »
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.
shouldn't be hard to tell when there is some speech using level detection, with a small prestore buffer to avoid missing the start
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline TheSteve

  • Supporter
  • ****
  • Posts: 3752
  • Country: ca
  • Living the Dream
Re: DIY voice control for Keysight 1000-X scopes
« Reply #7 on: February 25, 2019, 09:18:39 pm »
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).
VE7FM
 
The following users thanked this post: Keysight DanielBogdanoff, salvagedcircuitry, jmw

Offline Keysight DanielBogdanoff

  • Supporter
  • ****
  • Posts: 778
  • Country: us
  • ALL THE SCOPES!
    • Keysight Scopes YouTube channel
Re: DIY voice control for Keysight 1000-X scopes
« Reply #8 on: February 25, 2019, 10:43:51 pm »
Really cool project!
 
The following users thanked this post: jmw

Offline salvagedcircuitry

  • Regular Contributor
  • *
  • Posts: 185
  • Country: us
  • Electrical Engineer | Hobbyist | Camera Enthusiast
    • salvagedcircuitry
Re: DIY voice control for Keysight 1000-X scopes
« Reply #9 on: February 26, 2019, 12:45:22 am »
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  ^-^
SalvagedCircuitry
www.salvagedcircuitry.com
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2572
  • Country: us
  • Not An Expert
Re: DIY voice control for Keysight 1000-X scopes
« Reply #10 on: February 26, 2019, 02:56:13 am »
It's still faster than calling my annoyed girlfriend over to press the button ;)

My girlfriend sometimes doesn't respond to my voice commands at all :)
 
The following users thanked this post: odessa, Romain, Jacon

Offline jmwTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: us
Re: DIY voice control for Keysight 1000-X scopes
« Reply #11 on: February 26, 2019, 03:16:41 am »
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  ^-^
Cool! 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.
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13742
  • Country: gb
    • Mike's Electric Stuff
Re: DIY voice control for Keysight 1000-X scopes
« Reply #12 on: February 26, 2019, 10:33:32 am »
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  ^-^
Cool! 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.
Shouldn'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
 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline LapTop006

  • Supporter
  • ****
  • Posts: 467
  • Country: au
Re: DIY voice control for Keysight 1000-X scopes
« Reply #13 on: February 27, 2019, 12:21:02 pm »
Looks like it works better than the native voice control on my 6000-X.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6186
  • Country: ro
Re: DIY voice control for Keysight 1000-X scopes
« Reply #14 on: February 27, 2019, 12:43:17 pm »
Shouldn't be too hard to make a pretty generic speech-to-SCPI over LXI

I'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!

A reliable offline voice recognition, in general, will change the world.   :)

Offline jmwTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: us
Re: DIY voice control for Keysight 1000-X scopes
« Reply #15 on: March 03, 2019, 10:41:12 pm »
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!
 
The following users thanked this post: salvagedcircuitry

Offline jmwTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: us
Re: DIY voice control for Keysight 1000-X scopes
« Reply #16 on: March 25, 2019, 03:44:37 pm »
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
 
The following users thanked this post: PedroDaGr8, TheSteve, salvagedcircuitry, Hexley

Offline salvagedcircuitry

  • Regular Contributor
  • *
  • Posts: 185
  • Country: us
  • Electrical Engineer | Hobbyist | Camera Enthusiast
    • salvagedcircuitry
Re: DIY voice control for Keysight 1000-X scopes
« Reply #17 on: April 09, 2019, 06:16:59 pm »
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?
SalvagedCircuitry
www.salvagedcircuitry.com
 

Offline jmwTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: us
Re: DIY voice control for Keysight 1000-X scopes
« Reply #18 on: April 10, 2019, 01:50:01 am »
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. See https://docs.snips.ai/articles/raspberrypi/hardware/hardware.
 
The following users thanked this post: salvagedcircuitry

Offline Housedad

  • Frequent Contributor
  • **
  • Posts: 514
  • Country: us
Re: DIY voice control for Keysight 1000-X scopes
« Reply #19 on: April 10, 2019, 04:12:45 am »
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.
« Last Edit: April 10, 2019, 04:17:20 am by Housedad »
At least I'm still older than my test equipment
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 37730
  • Country: au
    • EEVblog
Re: DIY voice control for Keysight 1000-X scopes
« Reply #20 on: April 10, 2019, 04:33:44 am »
Shouldn'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

Was just thinking that myself
 

Online Bud

  • Super Contributor
  • ***
  • Posts: 6905
  • Country: ca
Re: DIY voice control for Keysight 1000-X scopes
« Reply #21 on: April 10, 2019, 05:19:37 am »
Imagine the graphics possibilities for verification of commands or even have it talk back to you.
I've got it. I call it "wife".
Facebook-free life and Rigol-free shack.
 
The following users thanked this post: capt bullshot

Offline Electro Detective

  • Super Contributor
  • ***
  • Posts: 2715
  • Country: au
Re: DIY voice control for Keysight 1000-X scopes
« Reply #22 on: April 13, 2019, 09:39:23 am »

Program it to respond with rapper commands too

"Yo bitch, enuffadatsheet, gets back to sweepin.."

 :D
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: DIY voice control for Keysight 1000-X scopes
« Reply #23 on: April 13, 2019, 05:16:52 pm »
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.
 

Offline jmwTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: us
Re: DIY voice control for Keysight 1000-X scopes
« Reply #24 on: April 14, 2019, 12:17:14 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf