Windows 10 on Windows Phone, with Speech Apps

WP_20160207_21_07_49_ProWP_20160207_21_06_22_Pro

And in the end it wasn’t SO hard. By the end of the weekend, I have this:

  • Lumia 635 with no micro-SD upgraded to Windows 10
  • Windows 10 speech app (Universal) building and running ok in Visual Studio 2015. It has both synthesis and recognition, so using that as a template, I should now be able to build whatever I need.
  • The same app running on the above Lumia 635 (this is from Microsoft and GitHub, to be clear)

Don’t know why, but right now I cannot take screenshots on this phone, so these are photos of the Lumia 635 taken from my Lumia 735:

Advertisements

Windows Speech Synthesis

I’ve been away from this area for a bit. I’m watching this video from Microsoft Visual Academy.

cortana01

Supporting MSDN stuff here. Here is the Speech SDK.

cortana02

So anyway, just diving in…

Windows Phone 10: what’s in it for developers?

Whatever it is, there seems little point in doing any further development on Windows Phone right now, at least until the alleged February CTP appears. Top of my own wishlist is not so much any killer feature, but some clarity around how you can actually search for apps in the Store. When you can’t find a direct reference to popular apps such as Duolingo and Office 365 for goodness sake, just by typing… “Duolingo” and “Office 365”, then that suggests to me that something ain’t right.

Windows 10, Visual Studio Community Edition, and Windows Phone

Argh. Argh argh argh argh argh.

(but OK-ish in the end for the emulator but not the phone – check the end of the post)

In installing Windows 10, I trusted in my VisualSVN server (good), trusted in Azure (good), but my published Windows app now fails to deploy with an error. What error? Too late to talk about that, but here are most of the screenshots that led to that point. Some tidying and explanation may follow (also, since Windows 10, the snipping tool hangs for 30 seconds, then fine – can’t see anything in task manager to indicate why).

Wiindows10

azureBilling01 azureBilling02 visualsvn2_01 visualsvn2_02 visualsvnServer_01 visualsvnServer_02 visualsvnClient_03 visualsvnClient_04 visualsvnClient_05 visualsvnClient_06 visualsvnClient_07 visualsvnClient_08 visualsvnClient_09 PhoneEmulators01 visualsvnClient_10 visualsvnClient_11 visualsvnClient_12 visualsvnClient_13

One last argh.

15 minutes later….

phoneOKNow01

And now it’s OK, with absolutely no changes on my part. I wonder if Windows 10 was still sending in its updates, along with Visual Studio etc, and it thought I was a bit quick off the mark.

We’ll see if it’s still healthy another day.

Trying to deploy to the phone rather than the emulator I get this…

Error 6 Error : DEP6810 : MdilXapCompile.exe failed with error code 2001. See log file 'C:\data\sandbox\SvnCheckoutRoot\LanguageApps\Projects\SpeakingNumbers\SpeakingNumbers\obj\ARM\Release\MDIL\MDILXapCompileLog.txt' for more details.

That file is too big to post here, but the final lines give no clues, other than the word “CrossGen”:

CrossGen failed
Error processing assembly C:\data\sandbox\SvnCheckoutRoot\LanguageApps\Projects\SpeakingNumbers\SpeakingNumbers\obj\ARM\Release\MSIL\NumberSpeaker.exe
Raw error code: 2147942411

Translation and Speech in Windows Phone 8.1

BingTranslate14

  • Many lessons learned today when developing for Windows Phone 8.1 rather than Phone 8.0. The jump from 8.0 to 8.1 feels as big as I hear the move from 7 to 8 was.
    Before trying any Windows Phone stuff, especially 8.1, make sure you have installed the Visual Studio 2013 Update 3. Start it running, and then go away and do something else for the 29 hours it takes to install. Once you’ve done that, come back and read on…
    The emulator thrashes the disk. Counter-intuitively, it is much quicker to attach the disk to the laptop, and debug/deploy to the device, rather than the emulator.
    You can debug the Phone (as opposed to the emulator) really easily.
    Don’t assume that because you have lots of languages for speech synthesis on your PC, you have them automatically on your Phone. There are a number of languages available, but not installed. For example, I have been downloading German and Spanish for the last 30 minutes I think (only around 20MB or so), and they are still not complete.(In fact just got to the bottom of that – it’s because (in my case anyway), Battery Saver was on. Obvious isn’t it… not)
    Good stuff is the fact that Microsoft/bing allow you 1 million characters per month of free translation, whereas Google charge for any amount.
    Let’s now go back to the start of the day…

Do I say “This looks promising” a lot? This looks promising.

Not sure how far this will get us, but first have to Register the Bing Translator Control with the Azure Data Marketplace as described here.

BingTranslate01

Once installed that takes you to a Translator Help Page.

And this looks tailor-made for my needs:

BingTranslate02

(If you don’t already have it, you need the Phone 8.1 SDK – which on a good connection takes say 30 minutes to download and install)

I thought this might happen: I’m trying to run all my Visual Studio dev in Azure. At the end of the Windows Phone SDK installation, I got this warning/error:

BingTranslate03

As this points to warnings about SLAT, and updating your BIOS, yada, and as Azure is itself a VM and the HyperV which is used as the emulator can’t support that (I’m just rushing words off, sorry for the English), then I suspected this would end in tears. This is the error when  loading the XAML for the Phone Template page:

BingTranslate04

So I now need to get off Azure for Phone dev, and back onto my local PC. Darn it.

I then built the app on my local machine, but when I started to run the emulator, I got this:

BingTranslate05

While I’m waiting for the latest Phone SDK to download on my local pc, googling points to getting a workable solution from the Mobile Services on Azure. I’ll try that in a bit.

Goodness, this is a frustrating time: I downloaded the SDK locally, could not see the rich set of templates that I see in the VM version of 2013. So I tried to copy across first the phone template, then a solution built on the phone template, but neither worked. When I then compared the Help About for the 2 copies, turns out my local 2013 is not Update 3, I’m running that now.

But my memory is running low, despite having 8GB (of which 2GB is RamDisk for Reaper).

Having done VS Update 3, which I think took about 1.5 hours to install, it has now been sitting on this image for at least 5 minutes…

BingTranslate07

this has been a fairly long day: you have to register for a translator code thing:

http://blogs.msdn.com/b/translation/p/gettingstarted1.aspx

Ha – it isn’t entirely free: https://datamarket.azure.com/dataset/bing/microsofttranslator

https://datamarket.azure.com/receipt/32d674d0-76d5-4a00-bb06-335e07153595?ctpa=False

Speech has changed in 8.1:

http://msdn.microsoft.com/en-GB/library/windows/apps/dn393981.aspx

and usage:

http://www.kunal-chowdhury.com/2014/06/whats-new-for-wp8dev-voice.html

Got a failure here:

http://stackoverflow.com/questions/25203787/windows-phone-8-1-speech-synthesizer-access-denied

Windows phone allegedly has lots of voices: http://msdn.microsoft.com/en-us/library/windows/apps/jj207057(v=vs.105).aspx

And various other screenshots from the day:

BingTranslate08   BingTranslate11 BingTranslate12

BingTranslate13

Debugging showed that by default these were the only voices on the phone:
Just2Voices01

Later…

I was able to deploy the app both to my Lumia 920 and my daughter’s Lumia … can’t remember. For hers, I did need to unlock it as a registered Phone developer, but I was pleased that I was able to do so, as that means I can write apps for any number of personal phones, without going through the Windows Store.

Not that I mind, as I have zero investment in Phone 8.0, but it is clear that matters have changed a lot. Check out this series.

This is a nice simple phone MVVM app.

Prism support for Windows Phone 8.1 seems to be happening.

And a more well-formed set of Prism QuickStarts for 8.1.

And yet more.

And Nuget of course:

BingTranslate15

Which gives this once installed:

BingTranslate16

And this cropped up again, and it cropped up again because I moved the code to a new app (doesn’t matter why, double-click because of the resolution):

Access01

So the resolution to the problem is this:

Access02

, namely you have to turn on the Microphone capability for speaking… and listening.