VoiceXML with Visual Studio

Every so often I'm surprised by the incredible flexibility built into Visual Studio 2005.

I've been writing a lot of VoiceXML lately and I was really missing the intellisense that I've become so used to. On a whim I tried opening a VoiceXML document in Visual Studio and much to my surprise it worked!

It turns out that Visual Studio is capable of understanding the syntax of a document based on it's DOCTYPE. In my case it saw <!DOCTYPE vxml PUBLIC "-//W3C//DTD VOICEXML 2.1//EN" "http://www.w3.org/TR/voicexml21/vxml.dtd"> and was able to automatically give me basic intellisense and syntax checking for VoiceXML version 2.1.

As an example, create a new XML document and insert the following:

<?xml version="1.0" encoding="utf-8" ?>

<!DOCTYPE vxml PUBLIC "-//W3C//DTD VOICEXML 2.1//EN" "http://www.w3.org/TR/voicexml21/vxml.dtd">

<vxml version="2.1">
</vxml>

You'll notice that the last element (</vxml>) gives you a warning. Hovering over it tells you not only that your missing an element but what the valid elements might be!

This is all very cool if you ask me...

7 Comments

  • How did VMXL to appear in the HTML Source Editing Dropdown list?

  • It doesn't show up in the drop down list, the editor is simply aware of the document type.

    That said, if you are using Visual Studio 2005 you can download and install the developer components for Speech Server 2007. This will give you fully integrated support for VoiceXML v2.1. Unfortunately the SDK doesn't work at all with Visual Studio 2008.

  • Think you. I will download the Microsoft Office Communications Server 2007 Speech Server Developer Edition and give it a try.

  • I'm afraid I don't understand your question. Could you please give some more detail?

  • Diego,

    I am assuming you and I are in the same boat.

    The problem is that you need server-side execution of the page. Which means it can't be a ".XML" extension (at least no without adding an ISAPI handler for that extenaion and it's verbs).

    What you need is to serve it up as an ASPX page that returns a response type of XML. The problem that I am having is that the aspx page doesn't grab the DTD or dosn't parse it or whatever. So it defaults to intellisense for XHTML 1.0 Transitional.

    Anyone know how to get intellisense for VS2005 when the file extension is ASPX?

  • Hi guys,
    i am new to speech server ..i want to develop vxml 2.1
    applicaions in Microsoft office communication sever...i installed ocs.but i am not getting wher to start...

  • Hi Marc,

    I just got a task to write a dynamic vxml application. I have several questions:

    1. Can I use IIS7 to serve vxml pages along with their contents? (voice, video)
    Do i have to setup something on the IIS7?

    2. How can I read the DTMF on the application?

    Thanks,
    newbie

Comments have been disabled for this content.