Browse DevX
Sign up for e-mail newsletters from DevX


Buy and Sell Stocks with the Sound of Your Voice Using the .NET Speech SDK : Page 7

Some applications are even more useful when people can interact with them using nothing but a telephone. We used the .NET Speech SDK to voice-enable the existing FMStocks sample application—and learned some useful lessons along the way.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

In-Depth: Buy Stock Feature—Company Selection
We'll tie together many of the features discussed in the "How It Works" section by examining the Company selection process in the Buy Stock feature of FMStocksVoice. The Buy Stock feature allows a user to choose a company by speaking either a company name or ticker symbol, and to buy shares of stock from that company using the money in their account.

We take the entry that the user speaks and query for matches from the database. For example, if the user says "United," we would return "United Technologies" and "United Television" as choices for the user; if they say "M," we would return ten companies whose ticker symbol begins with "M." If the database returns more than one match, we activate the SelectableNavigator user control, to allow the user to browse through the companies and choose which one they want. Once the user makes a selection, we make sure they have enough money in their account to buy at least one share in the company, and then we confirm the choice with the user.

Speech Controls
We begin our page by determining which Speech elements to use, including controls and Semantic Items. Semantic items are the key to holding the answers which our users speak, and to controlling the flow of the page.

Tip: Page Flow—Because during the Buy Stock process, we want the users to be able to return to a previously read QA, we'll focus on manipulating the "semantic state" of the semantic items to determine what QA should be activated next. This is referred to as "flow."

Generally, one semantic item corresponds to one user's "answer." Each QA expecting an answer is assigned a semantic item in which the value of the user's answer will be stored.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date