SQLServerCentral Article

Introduction to English Query and Speech Recognition

,

A couple of weeks ago, I had just come away from yet

another Microsoft XP marketing pitch about what a wonderfully robust operating

system it is going to be, and how its cool new features were going to truly

enrich the end user experience. I've used XP a bit and I like it, so don't get

me wrong here. I'm not bashing Microsoft, but I couldn't help but be a bit

cynical when I heard this. In particular, the specific hype session was centered

on some very non-specific speech recognition capabilities that were destined to

"render the keyboard obsolete". I don't remember the exact wording, but I can't

be too far off in my paraphrasing.

I would be very impressed if I could get speech recognition and activation on my machine, and make it so that it was truly a productivity booster. Supposedly Office XP is fully loaded with voice recognition capabilities, including menu commands and dictation. But I can't help but think back to the early and mid-nineties when a number of the speech-recognition software products came out with what I recall were the "keyboard killers" of their time. I don't remember if their features were really new, or just new to me, but I do remember how the scene played out. It went something like this (after about 2 hours of trying to set up the microphone, and too many mundane hours of training the software):

"Ahem… File, new. File New. FILE NEW. No. F I LE N E W." (ok)

[Some nonsensical dictation, just a few lines to test it out. Works pretty well, kind of clunky, still a bit irritating]

"File Save. SAVE. S A V E! (no, not exit!) Save? YES! Not Exit! Cancel! CANCEL! @#$%&!

I was promptly thrown out of the word processing application with nothing to show. Nothing, that is, unless you count the resulting distaste for speech-to-text. I know the technology was still in its infancy, and may still be for all intents and purposes, but for me, it turned out to be nothing more than an interesting distraction. I would be willing to bet that most of you haven’t found it too compelling either. In fact, I have yet to meet anyone who speaks to his or her machine for purposes other than the opportunity to tell it what it can go do with itself.

Not too much after I saw the latest XP marketing pitch, I was on my in to work, thinking about a database project that we had been working on for a while. Part of it has to do with essentially recreating the Query builder functionality that can be found in SQL Server or Access. We have a web-based mechanism that is used for other applications and mimics that functionality fairly well, but it is not quite sufficient for the needs of this particular application. I’ve played around with a number of the third-party tools and controls that are currently on the market, and they too have a fairly robust feature set. What was lacking in all of these tools was EXTREME simplicity for the end-user. Dreaming the impossible dream, I recalled the speech recognition capabilities of XP, and thought about how cool it would be if I could just TELL the application what data I needed to pull, and it actually went out and did it.

A quick reality check reminded me that I knew nothing about speech to text technology, much less how to couple that with a database application. But I do know a little something about a particular database platform that supports a cool bit of technology. You guessed it – English Query. I’ve never actually used it before, and don’t even know for sure of anyone that has. However, one thing that I do know is that I live to learn about new technology, and this seemed to be the perfect opportunity to broaden my horizons.

Well, what is it?

The focus of English Query centers on the use of Database Objects and Semantic Objects (entities and relationships). An entity is anything that you can refer to as an "item" or an "object" such as a customer, employee, or invoice. These conceptual entities are physically represented in the database as a field or table, or combinations of fields and tables joined together through views. The relationships are just what you would think - simply descriptions of how the entities are related, and how they interact with one another. For example, "Invoices have Line Items", and "Customers purchase Products" are ways of describing relationships between two entities.

So what about the speech recognition part of this? After a little research, I found out that Microsoft has released their latest version of the

Speech SDK (5.1). This version is essentially a wrapper around their previous version (5.0) that allows for any programming environment that supports automation to access it's interface. In my case, this would be Visual Basic 6.0 as I'm still getting acclimated to .NET. However, I spent some time on the .NET Speech site, and it looks very promising.

As I progress through the English Query project, I may end up focusing more on

the .NET Speech tools, rather than the current tool set. This will inevitably

lengthen the learning curve, but it's something I want to do eventually

anyway.

This diagram represents the components of an English Query application deployed on the Web

What does it take to get an English Query application up and running?

My development environment is a Win2K Pro box running SQL Server 2K. I will go over the steps you must take to build and deploy an EQ application on the desktop and on the Web in more detail in subsequent articles; for now, here is a general overview of what needs to be done:

  1. The first thing you have to do is install English

    Query on your machine. This can be found in the setup option for SQL Server on

    the installation CD.

  2. To create an EQ application, you must create a new

    project in Visual Studio from scratch, or using one of the wizards that is

    provided with the EQ install. Save your sanity and use the wizards.

  3. Once the wizard completes its operation, refine the

    EQ model that was created by the wizard.

    1. Enhance the entities in your model by providing

      "synonyms" for certain entities (ex: phone = phone number)

    2. Define additional relationships between and within your entities.
  4. For any modifications you make, and for good

    programming practices in general, test your EQ model.

  5. After testing, you can refine how data is displayed.

    This will inevitably be an iterative process.

  6. Build (compile) the EQ application.
  7. Use the EQ application in your VB project, or deploy it to the Web.

 

This is a representation of the parts

of an English Query Project created in Visual Studio

Where do we go from here?

My aim in this series of articles is to document my learning curve on English Query and present some workable examples that you may be able to creatively apply to some of your own applications or web pages. Hopefully by the time we are done, you will have a better understanding of how EQ compliments the SQL Server 2000 platform. It is possible that I may get a couple of minor things wrong in an article as the series progresses, like the details of certain steps that need to be taken, or actions that may be performed in more than one way but represented by me as THE way to do it. Should this occur, it is my intention to keep updating each article in the series so that it will remain as current and accurate as possible, and credit anyone who points out the mistake. I would appreciate any feedback, suggestions, and questions you may have on either English Query or the Speech SDK. You can post your comments in the forum for this article by using the link on the tabs below.

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating