Free Print Subscription Printer-friendly version Email to a Friend

Add voice command to virtual instrumentation

( 01 Jul 2002 )
Alexander Bell, Infosoft International Inc, Rego Park, NY, USA

Debates still persist in the engineering community about the relative merits of analog and digital controls of instrumentation. Meanwhile, a revolutionary new type of control—voice-command control—is gaining acceptance in many application areas (Reference 1). This Design Idea focuses on the practical implementation of the Voice Commander voice-command interface in a virtual-instrumentation project. The beauty of the method lies in the fact that a single Microsoft Excel file, vScope VC.xls, encapsulates the entire voice-command system. The Excel file comprises two worksheets, vScope and vScopeData; two standard code modules; and a small portion of code in the This Workbook code module. You can download the relevant software from the Web version of this Design Idea at www.ednmag.com. Using the terminology and the concept of modern multitiered software architecture, the voice-command method embraces the user-interface and the business-logic layers.


Figure 1
This screen snapshot uses the time-domain mode with horizontal zoom and split-view on to see signal details at the beginning and end of the scale.

The simulated-data layer is in the vScopeData worksheet. Column A contains the samples’ ordinal numbers (i=1, 2, ...64), Column B contains simulated signal-amplitude samples (V=sin(6.28×2×i/64)+0.5cos(6.28×10×i/64)), and columns C and D contain calculated complex-FFT and signal-amplitude spectra, respectively. By adding the actual data source (signal samples captured by a data-acquisition board or database query for historical data analysis) and linking it to Column B, you can expand the technique to a “full-flavored” virtual instrument or analytical tool with voice-command interface.


Figure 2
These signal-amplitude spectra correspond to a 64-point FFT with 32 spectral components.

The vScope worksheet contains the Chart Object (called “Chart1” in the downloadable macros), formatted to emulate the actual oscilloscope screen (Figure 1). A custom toolbar appears at the top of the display, which contains control buttons. The buttons are associated with macros that execute when you press the button or say the command, corresponding with the button’s caption. Note that the voice-command feature is available only in the latest Excel 2002 Office application. Table 1shows the list of custom commands. The Chart Object dynamically links via macros to the simulated data in the vScopeData worksheet. The Business Logic portion of the routine is programmed in VBA (macros) and partially in Excel worksheet functions. It contains a 64-point FFT, based on the Excel add-in functions. To use this feature, install Analysis Tool-VBA from the Tools-Add-Ins menu item. You can expand the business-logic and user-interface layers by including different digital-filtering and windowing techniques and by adding multiple channels, for example.



Figure 3

Upon opening the Demo file, a temporary custom toolbar appears at the top of the display (Figure 1). In Excel 2002, activate the speech tools: Go to the Tools—Speech—Speech Recognition menu item and then choose the Voice Command mode. In this mode, you can enter the command either by saying it or by clicking the button on the toolbar. For example, by clicking on or saying “go scope,” you can maximize the view by temporarily removing some standard screen components. You can restore the components by clicking or by saying, “reset Excel.” The Split command allows you to open two pseudowindows with independent horizontal scrolling. This feature lets you see the rising and falling edges of the long, or horizontally “zoomed,” signal at the same time. When you say, “spectra,” the signal-amplitude spectra screen appears (Figure 2). You can use this technique with Excel 95, 97, and 2000, but you must use the custom toolbar instead of voice commands. Note that when you enable macros in Excel or other applications, some macros could perform potentially dangerous and harmful actions, and some may contain viruses. The code for this Design Idea is on an as-is basis without warranty of any kind. The vScope VC.xls file is for demo purpose only, and commercial use of this file is prohibited.


REFERENCES
1. Bell, Alexander, “Add voice commands to your CAD system,” EDN, May 2, 2002, pg 77.

 
Free Print Subscription Printer-friendly version Email to a Friend
Article Rating 
Average Rate: No rating yet
 
Poor Quite Good Good Very Good Excellent
 
 
Related Content 
 
 
WEBCASTS
 
KNOWLEDGE CENTER
Panasonic Key Devices Guide 2008:
 
Fairchild Semiconductor :
 
 
Highest Rated  
 
 
 
ADVERTISEMENT
Press Release 
 
TECHNOLOGY NEWS
 
RESOURCE CENTER


 
 
PRODUCT NEWS
 
FEATURED SPONSORS


 
 
 
DESIGN CENTERS
 
ADVERTISEMENT
     
Reference Designs 
   
     
 
 
 


RSS
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

POLL
What type of environmental regulation do you think will be most beneficial for the tech industry?
Proper recycling and disposal
Push for power efficiency and energy conservation
Chemical/lead regulation
View results

Outlook and Trends 2008
 
 
 


 

Reed Electronics Group | Reed Business Information Asia |
EDN India | EDN Taiwan | EDN Korea | EDN Japan | EDN China | EDN | EDN Europe
ECN Asia | ECN Taiwan | ECN Korea | ECN China | EB Asia | WDDA | WDDA Taiwan | WDDA China

 
ABOUT EDN Asia | FREE SUBSCRIPTION | CONTACT US
   
© 2009 Reed Business Information, a division of Reed Elsevier Inc.
All rights reserved. Use of this web site is subject to its Terms and Conditions of Use. View our Privacy Policy.