Wiris

Documentation

  • Demos
  • Visit our website
  • Contact us
  • MathType

    • WirisQuizzes

      • LearningLemur

        • CalcMe

          • MathPlayer

            • Store FAQ

              • MathFlow

                • BF FAQ

                  • Miscellaneous

                    • Wiris Integrations

                      • 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?

                      Give feedback about this article

                      Related Articles

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

                      Empowering STEM education

                      MathType

                      • Office Tools
                      • LMS
                      • XML
                      • HTML

                      WirisQuizzes

                      Learning Lemur

                      Integrations

                      Solutions

                      • Education
                      • Publishing houses – platforms and interactive
                      • Publishing houses – Print and digital
                      • Technical writers

                      Pricing

                      Downloads

                      Blog

                      • Success stories

                      About us

                      • Careers
                      • Partnership

                      Contact Us

                      Contact Sales

                      European union (European Regional Development Fund) and 1EdTech (TrustEd Apps Certified)
                      • Cookie Policy
                      • Terms of Use
                      • Privacy Policy / GDPR
                      • Student Data Privacy
                      • Compliance
                      • Cookie Settings

                      © Wiris 2026

                      Expand