Partager via


Recognizing and Prompting in Multiple Languages

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The default language for Speech Server applications is the language the author selects in the new project dialog box at the time the project is created. The selection of available languages depends on what language packs are installed.

You can develop applications that support a single language or develop applications that support multiple languages by installing multiple language packs. Both scenarios are described in the following sections.

Selecting Languages and Speech Engines

The choice of languages available for speech applications in Speech Server depends on which language packs are installed. No language pack components are installed by default.

Installing Language Packs

To develop speech applications in any supported language, you must install the appropriate language pack on the computer running Speech Server. At the end of Speech Server installation, there is an option to install language packs. Using this option, you can install one or more supported language packs. You must install at least one language pack. Changes are effective following a restart of Speech Server.

Viewing the Installed Languages and Engines

To see the list of available languages and the voice and recognition engines associated with those languages, see the Languages and Speech Engines pane in the Options dialog box, as described in the following procedure. To change engine selections, use the list boxes on the Languages and Speech Engines pane.

To view available languages and the voice and recognition engines

  1. In Visual Studio 2005, click Options on the Tools menu.

  2. In the tree view pane, expand the Speech Application SDK node, and then click Languages and Speech Engines.

    Note

    If the Speech Application SDK node is not present, select Show all settings in the Options dialog box.

Creating a Multi-Language Application

The simplest model for developing a multi-language application is to use a chooser application or component to determine the language and branch from there to separate components or applications that support the selected language. One way to do this is to use an English-language dialog that prompts the user with something like "press 1 for English, press 2 for Spanish." When the user responds with a selection, navigate to the single-language component or application.

Consider using the Project Wizard to create a separate project for each application language. This provides an initial set of components using the correct language setting.

Assuming that the appropriate engine configurations are available on Speech Server, each application might be in a different language. There is no limit to the number of times the language can be switched in a session. Each Speech Server server farm can support multiple languages at one time.

In a Web-based voice response application, each .aspx page supports a single language, which is set by the xml:lang Attribute of the html element. To change languages in a SALT voice response application, navigate to a new page and set the xml:lang attribute on that page.

In a managed code voice response application, the language is set by the CurrentUICulture property. Languages can be changed within a workflow by using the CurrentUICulture property to change the language of the TelephonySessionproperty. For more information about switching languages, see the following sample applications:

Converting from an English (United States) Language Application

To convert an English (United States) language application to support a different language, perform the following tasks:

  • Translate application prompts.
  • Translate custom grammars.
  • Ensure that references to system grammars point to the localized grammars provided with the language pack.
  • Modify the application's Manifest.xml so that it references the correct application resources. For more information, see About Application Manifest Files.
  • Use the CurrentUICulture property in the Class1.cs file to set the application culture.

See Also

Concepts

Design Speech Applications for Easy Reporting and Tuning