Partager via


Upgrading Speech Application SDK Version 1.0 Applications

  Microsoft Speech Technologies Homepage

This topic summarizes the steps in upgrading Microsoft Speech Server 2004 (MSS) English (United States) applications to support non-English languages.

Step One: Installing Language Packs

The choice of languages available for MSS applications depends on whether, and which, language packs are installed. English (United States) engines and components are installed by default. To support another language, first install the appropriate language pack. For more information, see Installing or Removing a Language Pack.

Installing a language pack provides localized speech resources. The Microsoft Speech Application SDK Version 1.1 (SASDK) user interface does not change. For example, property names are still in English, and rule names in the localized grammar libraries are still in English.

Step Two: Making a Copy of the Original Application

Make a copy of the original application either because the original version will continue in production, or simply to create a backup. In the copied application it is necessary to update all URLs and file path references that point to resources used by the application.

Step Three: Determining Application Architecture

MSS applications can support one or more languages. Converting an English (United States) application to support a single non-English language does not require changing application architecture. However, upgrading to support multiple languages requires fundamental changes. For more information, see Recognizing and Prompting in Other Languages.

Step Four: Setting Language and Culture

When converting to another language it may be feasible to manually change the individual language settings of Manifest.xml, .aspx pages, grammar files and prompt projects. In multi-language scenarios the recommended technique is to use a chooser application to link to separate single-language applications. For more information, see Recognizing and Prompting in Other Languages.

In a One-to-One Conversion

When converting a MSS application to a single different language, change settings as specified in the following bullets.

  • Web.config Use the uiCulture attribute of the globalization element in Web.config to set the application culture. For more information, see the Knowledge Base article Set Culture Information in an ASP.NET Application Without Code.
    Note  In this release of MSS, use the value "es-MX" in Web.config to specify Spanish (United States), as "es-US" is not currently supported by ASP.NET. For more information, in the MSDN Library see CultureInfo Class.
  • Manifest.xml Use the resourceset element in Manifest.xml to determine engine settings, and which files are preloaded and cached. These settings vary by language. For more information, see Supporting Non-English Resources.
  • Custom Grammar Files Use the Language property of the grammar file to specify the supported language. For more information, see Creating Grammar Files.
  • Grammar Libraries Swap the original English (United States) grammar library for the appropriate localized grammar library. Obtain a localized Library.grxml by creating a non-English project using the Speech Web Application Project Wizard, and then copy the localized Library.grxml to the target project.
  • Prompt Project Select the language engine on the prompt project Property page. For more information, see Managing Prompt Projects.
  • .aspx Pages On .aspx pages if culture is not set in Web.config and Speech Controls are not used, add the lang attribute to the html element, as in the following example. If the lang attribute is different than the Web.config setting, it will override Web.config. Therefore, attention is needed if both settings are used.
<html lang="fr-CA">

In a Multi-language Scenario

In a multi-language scenario, create a separate application for each language. To set the language for a new application, use the Language drop-down list box in the Application Settings pane of the Speech Web Application Project Wizard. For more information, see Use the Project Wizard to Set the Application Language.

  • Web.config Settings in Web.config are created automatically in accordance with the selection in the Application Settings pane.
  • Manifest.xml Manifest.xml is created using the correct resourceset element settings.
  • Custom Grammar Files The initial custom grammar file is created using the correct Language property value.
  • Grammar Libraries The language packs that ship with Microsoft Speech Application SDK Version 1.1 include complete localized versions of the English (United States) grammar library. When an application is created using the Speech Web Application Project Wizard, the localized grammar library is automatically added to the project.
  • Prompt Project A prompt project is created with engine settings in accordance with the selection in the Application Settings pane.
  • .aspx Pages A Start page is created automatically without a lang attribute. At run time, language attributes of .aspx pages are determined by the current thread culture, which in turn is determined by the culture settings in Web.config.

Step Five: Using Application Speech Controls

Application Speech Controls are ASP.NET Web custom controls that encapsulate linguistic information common to a number of speech Web application scenarios. For more information, including a list of application controls, see Making Applications Easier to Build.

It is not necessary to change the Application Speech Controls. Once the culture of the application thread is set, Application Speech Controls will use the correct resource .dll files, and therefore recognize speech and speak prompts in the correct language.

Step Six: Translating Prompts and Grammars

Converting a speech application from English to another language is a deeper and more complex process than string-localizing a typical application user interface.

  • Recognition grammars are the components that require the most work. Grammar libraries must be localized. Localized grammar libraries for Spanish (Mexico) and French (Canada) are provided with SASDK Version 1.1. In application grammars not only must lexical items be translated, but grammatical rule structures must also be reviewed and sometimes significantly refactored.
  • To translate prompts, simply translate them as strings.
  • Semantic items can be translated on a one-to-one basis into the new language.

Note  In multilanguage projects, JScript files from any editor must be saved as Unicode (UTF-8 with signature) - Codepage 65001. In particular, when saving JScript files in Visual Studio .NET 2003 this selection must be made every time the file is saved, or the setting will be incorrect. For more information, see Authoring Notes.

Step Seven: Creating an Application Error Page

Create a custom error page to efficiently handle application errors. For information on creating application error pages, see Creating Error Pages.

Step Eight: Debugging non-English Language Applications

When debugging voice-only applications that recognize and prompt in languages other than English (United States), use the following procedure to select among speech recognition or voice engines.

To select speech recognition and voice engines

  1. In Telephony Application Simulator (TASim), on the Tools menu, select Options.
  2. In the Languages and Speech Engines dialog box, click an entry in the Voice or Recognizer column and select from the listed engines.
  3. Click OK.

TASim can be used outside of the Microsoft Visual Studio .NET 2003 environment. Thus it is possible to view and select the installed languages and select engines either with or without Visual Studio .NET 2003.

Step Nine: Deploying the Application

Part of the process of deploying a MSS application is creating engine configurations. Note that many of the settings involved in engine configuration correspond to entries in Manifest.xml. It is important that these settings and entries match. For more information, in the MSS help file MSS.chm see the topic "Configuring Support for Additional Languages"; and see Manifest File Elements.

Step Ten: Tuning Non-English Applications

The Speech Application Log Analysis Tools rely on events provided by the Microsoft Speech Server event-logging schema. Among these events is the QASummary event of the QA control. The QASummary event supports application tuning, and occurs in every call at the completion of each Prompt playout / Recognition attempt pair, for the QA control. The Message property of each QASummary event contains the locale ID for the current Web page.

In both Call Viewer and Speech Application Reports databases this information is stored in the Calls table, and can be queried.

  • In Call Viewer to display calls by language, create queries containing a particular locale ID.
  • In Speech Application Reports, in the SQL Server Reporting Services toolbar for each report, use the Language drop-down list box to query for individual languages or groups of languages.

For more information, see Raising Events from Application Script. In the log analysis Help file LogAnalysis.chm see the event schema topics, and the sections on Call Viewer and Speech Application Reports.

New Features in Microsoft Speech Application SDK Version 1.1

The SASDK tools include a number of new features that support creating speech applications in languages other than English (United States). Many of these features are described in the following table.

Tool New Features
Speech Grammar Editor Set the Language property for a grammar file to specify the language supported. Validation is performed by the speech recognition engine mapped to the language specified by the Language property. For more information, see Creating Grammar Files and Languages and Speech Engines, Options Dialog Box.
Pronunciation Editor The phoneme set is determined by the Language property for the grammar file. For more information, see Pronunciation Editor.
Speech Prompt Editor The language engine used when generating prompts, and in alignment and validation, is selected on the prompt project property page. For more information, see Managing Prompt Projects.
Speech Control Editor The language selected in the Speech Web Application Project Wizard determines the language setting for the initial set of project components. For more information, see Using the Project Wizard to Set the Application Language.
Telephony Application Simulator When debugging voice-only applications that recognize and prompt in languages other than English (United States), select among the available speech recognition or voice engines. For more information, see the previous section Step Eight: Debugging Non-English Language Applications.

Client Support for Non-English Language Applications

Speech applications running on Speech Server 2004 Service Pack 1 support two clients: Telephony Application Services and Telephony Application Simulator. Multimodal clients are supported only on Microsoft Speech Server 2004.

Conclusion

This topic summarizes the steps needed to convert a MSS English (United States) application to support one or more non-English languages. More detailed information is contained in the following topics.