Project Description
DynamicVCD allows Windows Phone 8 application developers to manage dynamically the installation of the Voice Command Definition files.


DynamicVCD provides VoiceCommandService class, a wrapper for the homologous class provided by Windows Phone 8 Speech API.
VoiceCommandService exposes all the original features and the feature to install VCD from a data structure in memory.

    Public Async Function InstallVCD() As task
        Dim vcd = New VoiceCommandDefinition
        ' Define command set
        Dim cs = New CommandSet
        cs.Name = "MyAppCommandSet"
        cs.Culture = "en-US"
        cs.CommandPrefix = "MyApp"
        cs.Example = "Sample"
        vcd.AddCommandSet(cs)
        ' Define single Command 
        Dim c = New Command() With {.Name = "OpenDocument",
                                    .Feedback = "I'm opening a document...",
                                    .Example = "Open a document"}
        c.ListenForList.Add("open [a] document")
        c.ListenForList.Add("show [a] document")
        cs.AddCommand(c)
        ' Try to install the VCD
        Try
            Await VoiceCommandService.InstallVoiceCommandDefinitionAsync(vcd)
            MessageBox.Show("VCD installed correctly")
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Function


DymanicVCD uses Speech Exceptions Toolkit (https://set.codeplex.com/) to manage Speech API exceptions.

Last edited Apr 30, 2013 at 1:46 PM by Cobra1970, version 5