VB Magic

2014/09/01

Problems with Windows Phone 8.1 Update Developer Preview and Cyan Update (Lumia Phones)

Filed under: Windows Phone 8, wp8 — Tags: , , , , , — vbmagic @ 2:55 pm

Hi,

This is just a quick note for the people who are on the Windows Phone 8.1 Update and are trying to install the Lumia Cyan firmware update.

Even if the Cyan update is available for you phone. It will not install when you are running the developer preview. To get this installed, you need to be ok with wiping your phone (Backups may be a good idea). The steps to get your phone updated are:

  1. Download the Nokia Recovery Tool
  2. Run the tool which will wipe your phone and reset it to an earlier released OS (Mine was to WP 8.0)
  3. Once the phone has updated, You then need to go into settings and select Phone Update.
  4. Once this update is finished Go back to 3 until the updates are completed before carrying on.
  5. Re-download/run the Developer preview app enable the preview on the phone
  6. Check for update again until there are no more updates and to get your phone back up to 8.1 Update.

This process takes a loooooooooong time so be prepared to spend a couple of hours doing this.

2013/03/25

Windows Phone 8 Speech API is easier than I thought

I decided to try out the Windows Phone 8 Speech API and expecting it to be quite complicated I had a pleasant surprise…

I created a new project and found that all the speech functionality is already in the SDK.

Below is a simple XAML screen to test out the functionality

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="VBMAGIC" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="speech toy" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <StackPanel>
                <TextBlock HorizontalAlignment="Center">Enter Text To Say</TextBlock>
                <TextBox x:Name="speechTextBox"></TextBox>
                <Button x:Name="sayitButton">Say It</Button>
                <Button x:Name="listenButton">Listen</Button>
            </StackPanel>
        </Grid>

And this is all the code I needed to actually handle everything.

Imports System
Imports System.Threading
Imports System.Windows.Controls
Imports Microsoft.Phone.Controls
Imports Microsoft.Phone.Shell
Imports Windows.Phone.Speech.Synthesis
Imports Windows.Phone.Speech.Recognition

Partial Public Class MainPage
    Inherits PhoneApplicationPage

    Private _synth As New SpeechSynthesizer
    Private _recog As New SpeechRecognizerUI()

    ' Constructor
    Public Sub New()
        InitializeComponent()

        SupportedOrientations = SupportedPageOrientation.Portrait Or SupportedPageOrientation.Landscape

    End Sub

    Private Sub sayitButton_Click(sender As Object, e As RoutedEventArgs) Handles sayitButton.Click

        ' Says it all
        SayIt()

    End Sub

    Private Async Sub listenButton_Click(sender As Object, e As RoutedEventArgs) Handles listenButton.Click

        _recog.Settings.ReadoutEnabled = False
        _recog.Settings.ShowConfirmation = False

        ' Display the speech recognition dialogue
        Dim recoResult = Await _recog.RecognizeWithUIAsync()

        ' Put the text that comes back into the speechTextBlock
        ' and then say it.
        speechTextBox.Text = recoResult.RecognitionResult.Text
        SayIt()
    End Sub

    Private Async Sub SayIt()

        ' Speak the contents of the speechTextBox
        Await _synth.SpeakTextAsync(speechTextBox.Text)

    End Sub
End Class

I switched off some of the default Speech Recognition UI features which were a bit of an overkill for this simple app (Look under _recog.Settings for all settings)

To enable this functionality to work you need to modify the app manifest. On VB.net projects. Click the Show All Files icon in the Solution Explorer, Open the My Project Directory, Double click the WMAppManifest.xml file, Click the capabilities Tab and make sure that the following options are ticked.

  • ID_CAP_MICROPHONE
  • ID_CAP_NETWORKING
  • ID_CAP_SPEECH_RECOGNITION

That is it. Nothing else required.

Blog at WordPress.com.