Tool Documentation

GRXML Editor

Create, edit, and validate GRXML grammar files with our powerful editor.

Overview

The GRXML Editor is a specialized tool for creating and managing GRXML (Grammar XML) files used in speech recognition applications. It provides syntax highlighting, real-time validation, and intelligent suggestions to help you create efficient and accurate grammars.

Key Features

  • Syntax Highlighting: Color-coded elements make it easy to read and write GRXML
  • Real-time Validation: Catch errors as you type with instant feedback
  • Auto-completion: Quick insertion of common GRXML elements and attributes
  • Template Support: Save and reuse common grammar patterns
  • Testing Tools: Validate your grammars against sample inputs

Getting Started

Creating a New Grammar

  1. Click the "New Grammar" button in the editor toolbar
  2. Choose a template or start from scratch
  3. Enter your grammar content in the editor
  4. Click "Save" to store your grammar

Basic Grammar Template:

<?xml version="1.0"?>
<grammar version="1.0" 
         xmlns="http://www.w3.org/2001/06/grammar"
         xml:lang="en-US" 
         root="main">

    <rule id="main">
        <one-of>
            <item>yes</item>
            <item>no</item>
        </one-of>
    </rule>

</grammar>

Editor Interface

Toolbar Functions

  • New (Ctrl+N): Create a new grammar file
  • Open (Ctrl+O): Open an existing grammar
  • Save (Ctrl+S): Save current grammar
  • Validate: Check grammar for errors
  • Test: Test grammar against sample inputs
  • Format (Ctrl+Shift+F): Auto-format grammar

Keyboard Shortcuts

File Operations

  • Ctrl+N: New File
  • Ctrl+O: Open File
  • Ctrl+S: Save
  • Ctrl+Shift+S: Save As

Editing

  • Ctrl+Z: Undo
  • Ctrl+Y: Redo
  • Ctrl+F: Find
  • Ctrl+H: Replace

Best Practices

Grammar Structure

  • Use meaningful rule IDs that describe their purpose
  • Keep rules modular and reusable
  • Use comments to document complex patterns
  • Include sample phrases in comments

Performance Tips

  • Minimize deep nesting of rules
  • Use <one-of> for mutually exclusive choices
  • Group common patterns into separate rules
  • Test with various input patterns

Pro Features

Upgrade to Pro to unlock additional features:

  • AI-powered grammar suggestions with SpeechSmith AI
  • Advanced testing and validation tools
  • Grammar version control and history

Troubleshooting

Common Issues

Validation Errors

If you're seeing validation errors, check for:

  • Missing or mismatched XML tags
  • Incorrect rule references
  • Invalid attribute values
  • Proper XML namespace declarations

Performance Issues

If your grammar is performing poorly:

  • Simplify complex rule structures
  • Reduce unnecessary nesting
  • Use more specific patterns
  • Test with real-world examples

Additional Resources