Speech Rule Engine

Turning Formulas into Speech


Project maintained by Speech-Rule-Engine Hosted on GitHub Pages — Theme by mattgraham

What’s new

Version 4.0

Version 4.0 has been released. SRE is now fully in Typescript.

For full details on changes see the release notes. But in a nutshell here is a summary of changes:

Acknowledgements

Thanks to the following organisations for their support:

Background

Speech rule engine (SRE) is a JavaScript library for generating speech for mathematical expressions. SRE is a standalone system based on its original implementation as the maths speech engine in ChromeVox. SRE was forked from ChromeVox release 1.31.0 SRE can translate XML expressions into speech strings according to rules that can be specified in a syntax using Xpath expressions. It was originally designed for translation of MathML and MathJax DOM elements for the ChromeVox screen reader. However, in combination with MathJax SRE can also work with more commonly use mathematics markup like LaTeX and AsciiMath.

Usage

There are three ways of using SRE:

  1. Node Module: Download via npm or yarn. This is the easiest way to use the speech rule engine via its Api and is the preferred option if you just want to include it in your project.

  2. Standalone Tool: Download via github and build with make, or simply run it with npx. This is useful if you want to use the speech rule engine in batch mode or interactively to add your own code.

  3. Browser Library: This gives you the option of loading SRE in a browser and use its full functionality on your websites.

For more information see the documentation on SRE’s github pages.

Language Support

Besides the rules originally designed for the use in ChromeVox, it also has an implementation of the full set of Mathspeak and Clearspeak rules, localisation into a number of languages and Braille output currently in Nemeth.

Languages

Others are in preparation. If you want to help, please contact us.

All localisation are done in the dedicated repository sre-l10n using a bespoke YAML format for rules and CrowdIn support for simple message translations.

Braille

If you want to help adding more, please contact us.

Semantic Library

SRE contains a library for semantic interpretation to re-represents any mathematical expression in its own internal semantic format, overcoming the poor design of presentation MathML by fully disassembling and reconstructing an expression. For a better understanding of the representation have a look at its visualiser where you can easily use LaTeX syntax for generating mathematics. The semantic trees can be used in their own XML format directly or used to enrich the input MathML expressions with semantic information and speech strings.

Browser Support

SRE provides extensive browser support not only for translating mathematics into text but also for navigating, highlighting and semantically restructuring expressions. For more details and an overview of the interface see here.

Working files

The most recent test results are available at SRE’s test site.