Documentation

  • Demos
  • Visit our website
  • Contact us
  • MathType

    • Wiris Quizzes

      • Learning Lemur

        • CalcMe

          • MathPlayer

            • Store FAQ

              • VPAT for the electronic documentation

                • MathFlow

                  • BF FAQ

                    • Home
                    • MathPlayer
                    • Getting Started on a Translation
                    • Getting Started on a Translation

                    Debugging (what to do if it isn't working)

                    Reading time: 2min

                    It is almost guaranteed that you will encounter problems when you try test cases. If the expression spoken in the wrong language, you probably need to change the current speech style. To do this, right click on an expression and pick “Choose Speech”. Make sure you are using the appropriate language and rule set in that language (if there is more than one).

                    If the problem involves a mispronunciation, check the spelling or spacing. You may need to change the spelling to emphasize the way a word is spoken. Caution should be taken though, as different speech engines may pronounce the same word differently. If you have access to more than one voice, it is a good idea to try out multiple voices.

                    Other problems may be more complex, and therefore involve more steps in debugging. If MathPlayer is speaking only part of the expression or not speaking it at all, first check your coding to make sure you didn't create a syntax error in the file you changed by accidentally adding or deleting characters. Common syntax errors include:

                    • missing or unbalanced quotation marks;
                    • missing semicolons, typically after setting an attribute and before “}” or after a rule;
                    • missing commas at the end of child nodes (i.e., after a “)” or “}”);
                    • using the wrong parenthesis instead of braces or vice-versa (i.e., “( )” instead of “{ }”);
                    • unbalanced parenthesis in a condition on a rule

                    If nothing is noticeably wrong, you should look in the debugging file speech-debug.txt. It is located in your temp folder (%temp%).

                    This file contains a lot of information about your rules. To check if there was a syntax error or runtime error, search for “Error:” in the file. Make sure you include the colon. The error message will tell you what is wrong and where in the file the error is located. The line that the error message references is where rule interrupter first sees a problem. The real problem might be on a previous line that is missing a ‘;’ or a ‘"’.

                    Another file used for debugging is called speech-trees.txt. This will be in the same directory as speech-debug.txt and will be generated if you uncomment (remove the "//") in the line:

                     // log_show_speech_trees=true;
                    

                    You may want to remove this line in both simple-speech.tdl and simple-speech-xx.tdl. This file contains the speech trees of the specific example MathPlayer spoke. The math expression goes through various steps before it eventually gets spoken. You can look over the speech trees, which will show how the TTS engine interprets the expression, and see if anything looks inaccurate.

                    If none of the above processes work, there are a few other things to check. All of these "stupid" errors are things that I have done more than once:

                    • Check to make sure you did a "save" on the file with your changes.
                    • Make sure any new files that you create are encoded as UTF8 (with "BOM") or as UTF16.
                    • If you have multiple versions of the same file, make sure you were editing the right version of the file.

                    If you are still stuck, send us an email and include the files you have changed along with speech-debug.txt.

                    Was this article helpful?

                    Yes
                    No
                    Give feedback about this article

                    Related Articles

                    • Testing
                    • Formula into Plotter Area
                    • Programming
                    • Getting Started on a Translation

                    Making people’s STEM work more meaningful

                    MathType

                    • MathType for Office Tools
                    • MathType for Mac
                    • MathType for Microsoft 365
                    • MathType for Google Workspace
                    • MathType for LMS
                    • MathType for XML Editors
                    • Arabic notation
                    • Our products accessibility
                    • MathType is online

                    WirisQuizzes

                    Learning Lemur

                    Solutions for Education

                    • Blackboard Learn
                    • Brightspace by D2L
                    • Canvas
                    • Google Classroom
                    • Moodle
                    • Schoology

                    Solutions for Publishing Houses

                    Solutions for Technical Writers

                    Solutions for Chemistry

                    Integrations

                    • HTML Editors
                    • MathType in WordPress

                    Pricing

                    Company

                    Careers

                    Blog

                    Contact Us

                    Buy Now

                    Plugin Downloads

                    © Wiris 2025

                    • Cookie Preferences
                    • Cookie Policy
                    • Terms of Use
                    • Privacy Policy / GDPR
                    • Student Data Privacy
                    • Compliance
                    • Powered by Helpjuice
                    Expand