Window Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 21 April 2013

Introduction to Speech Capabilities in Windows Phone 8 – Part 3

Posted on 06:47 by Unknown

Today I am going to post last part of this series, Hope Part1 and Part2 went well with you and hope you tried out the Speech Capabilities of Windows Phone 8. We already talked a lot about the different approaches of Text To Speech, In this we will see exactly reverse approach that its Speech To Text. Most of the time it is considered to be vary hard and difficult to implement, But with the given APIs in Windows Phone 8 makes them pretty easy to implement.So Lets see how you can build such app quickly.

Take a new Windows Phone 8 Application Project. Design I will leave that to you, Right now I have put this inside a Pivot item like this :

XAML :

<phone:PivotItem Header="Speech2Text" DoubleTap="LoadSpeechToText">               
</phone:PivotItem>

C# Code :

private async void LoadSpeechToText(object sender, RoutedEventArgs e)
       {
           SpeechRecognizerUI myspeechRecognizer = new SpeechRecognizerUI();
           myspeechRecognizer.Settings.ExampleText = "Ex. Call,Search,Run";
           myspeechRecognizer.Settings.ListenText = "Listening...";
           ….

       }

This will bring up the Popup where you need to suppose to talk or give command, To enable this functionality, you need to add two more lines of code

myspeechRecognizer.Settings.ReadoutEnabled = true;
myspeechRecognizer.Settings.ShowConfirmation = true;

Once you run this you will see our regular Speech Popup like this :

Launching

But just showing this screen is not sufficient, we need to capture the Text and display it to user, So for this we need to add few more lines of code

SpeechRecognitionUIResult Speechresult = await speechRecognizer.RecognizeWithUIAsync();
if (Speechresult.ResultStatus == SpeechRecognitionUIStatus.Succeeded)
{
    MessageBox.Show(Speechresult.RecognitionResult.Text);
}

Now you can see the result on a MessageBox, While doing the test I said “Nokia” and you can see the result on the screen.

Launchingheardsay

And here you can see the Result on MessageBox.  finalNow its your decision where you want this piece of code to be use, There are lot of Business cases where you can use this kind of Speech Recognition. You can use this to launch certain Commands in your application or you can use to record voice as well and convert to text for any purpose.Hope you will find this useful and thus quick end of my Speech Capability series, I have kept it short but in coming days I am going to put detail article on these features by taking a Business Case.Till then Happy Coding, I will soon post a Calendar related article and we will see how we can use that API at our best.

Vikram.

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • First Windows Phone 7 update February 2011 - Small update but Big start
    After tons of rumors and set of predictions on Windows Phone 7 all over Internet, Microsoft came up with first Windows Phone 7 minor update ...
  • The little Story of “I Unlock Joy” event by Microsoft and Pune User Group
      This post is about recent “I Unlock Joy” event happened in Pune which was conducted by Microsoft and Pune User Group. Little History : ...
  • Silverlight On Mobile : Windows Phone 7 Splash Screen and Customization
    After talking about 3D capabilities on Windows Phone 7 using Silverlight in last article , Now I am moving ahead with small but equally impo...
  • Silverlight 5 : Platform Invoke (PInvoke) in Silverlight
      Two days back Microsoft announced availability of Silverlight 5 RC,I encourage you to download bits from here , My friend Pete Brown alr...
  • Introduction to Speech Capabilities in Windows Phone 8 – Part 1
    After a long..I am writing blog, I hope and I wish I will resume blogging like I use to in past. Lots of things happened in past few months....
  • MCTS : Microsoft Silverlight 4 Development Exam Guide (70-506) by Packt Publishing
      Hello, After a long time I got chance to come back here.I will soon resume blogging in month of August. Last 4-5 months were horrible due...
  • Introduction to Speech Capabilities in Windows Phone 8 – Part 2
    Hope you enjoyed my last article on Speech Capability in Windows Phone 8, Today I am posting another part or you can say little extension t...
  • Silverlight 3 : Insert & Update Data using WCF Service with DataForm and DataGrid
    In my Lap around Silverlight 3 series, I have written a separate article on DataForm in Silverlight 3, This article is a basic extension to ...
  • Mango : Using DeviceStatus in Windows Phone 7.1
    First of all “Thank You” for your wonderful response and comments on my last article on Silverlight Vs HTML5 ,I hope you like the points I ...
  • Silverlight, HTML5 & Windows 8 : Where we are heading to ?
    This is not the post or yet another post on most happening debate of Silverlight and HTML5, This is just a visit to all of them to realize t...

Blog Archive

  • ▼  2013 (4)
    • ►  August (1)
    • ▼  April (3)
      • Introduction to Speech Capabilities in Windows Pho...
      • Introduction to Speech Capabilities in Windows Pho...
      • Introduction to Speech Capabilities in Windows Pho...
  • ►  2012 (4)
    • ►  July (1)
    • ►  March (2)
    • ►  January (1)
  • ►  2011 (24)
    • ►  December (1)
    • ►  September (4)
    • ►  August (2)
    • ►  July (1)
    • ►  June (4)
    • ►  May (3)
    • ►  April (3)
    • ►  March (1)
    • ►  February (4)
    • ►  January (1)
  • ►  2010 (21)
    • ►  December (1)
    • ►  November (2)
    • ►  October (3)
    • ►  September (2)
    • ►  August (4)
    • ►  July (5)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
    • ►  January (1)
  • ►  2009 (49)
    • ►  December (1)
    • ►  November (5)
    • ►  October (2)
    • ►  September (1)
    • ►  August (5)
    • ►  July (5)
    • ►  June (1)
    • ►  May (5)
    • ►  April (5)
    • ►  March (9)
    • ►  February (4)
    • ►  January (6)
  • ►  2008 (43)
    • ►  December (3)
    • ►  November (9)
    • ►  October (7)
    • ►  September (4)
    • ►  August (2)
    • ►  July (3)
    • ►  June (4)
    • ►  May (3)
    • ►  March (3)
    • ►  February (5)
Powered by Blogger.

About Me

Unknown
View my complete profile