[BlindMath] Issues With Math Player

Neil Soiffer soiffer at alum.mit.edu
Mon Dec 7 05:12:46 UTC 2020


I like the idea of a "literal" mode of reading and in a MathPlayer rewrite,
I will include one.

For the most part, the rules that MathPlayer uses are in plain text and can
be changed with a text editor. You may need admin privileges. I suggest
making a copy of any file you are going to change before making a change.

The rules are very likely in C:\Program Files (x86)\Design
Science\MathPlayer\Rules. The ones you care about are in the 'en' (English)
directory within the 'Rules' folder. There are many ways to fix the ":"
reading. Probably the easiest is search for "ratio" etc.,
in ClearSpeak-words.tdl, ClearSpeak-unicode.tdl, simple-speech-words.tdl,
unicode.tdl (in that order). If you don't see the word in the first file,
go onto the next. Or you can do all of the files but you may change more
than you want. Just change the word (inside the quotes) to "colon" or
whatever you want to hear. That is what gets sent to the speech engine. For
"ratio", it is slightly more complicated because "ratio" is a prefix word
and the word for the ":" is actually "to" (e.g., 'ratio of 3 to 2'), so the
"to" needs changing. For example, you will find "ratio" in
simple-speech-words.tdl:
   UIInput(string{text=(::verbosity < ::v_medium) ? "ratio" : "the ratio
of";})
This says that when verbosity is less than medium (i.e., "terse"), say
"ratio"; otherwise say "the ratio of".
A few lines further down you will see
   UIInput(string{text="to";})
That's the one you probably want to change to be colon.
Note though that there are three occurrences of a similar pattern
corresponding to a:b, a:b:c, and a:b:c:d. You may want to change the other
occurrences.

The cleaner but harder way to remove the special speech is to find the
pattern that generated the rule that is saying "ratio" and delete that. If
you want to remove a lot of special case speech, that would be the better
way to go.

If you want to eliminate all pausing, edit C:\Program Files (x86)\Design
Science\MathPlayer\Rules\tts.tdl (not in the 'en' dir as it is language
independent)
Find the line
pause ? (::tts_type=="SAPI5")

It is probably ~ line 150. Replace the next three lines which are
 => string{ text="<silence msec='"+
      sapi5_pause(ms+ ((has_next(match) && name(next(match))=="pause") ?
next(match).ms : 0), ::rate) +
      "'/>"; };

with just
=> ;

That will eliminate all the pausing. If you just want to reduce the pause
length, only change the line
        sapi5_pause(ms+ ((has_next(match) && name(next(match))=="pause") ?
next(match).ms : 0), ::rate) +
to
         sapi5_pause( (ms+ ((has_next(match) && name(next(match))=="pause")
? next(match).ms)/2.0 : 0), ::rate) +

The "/2.0" will half the pause amount. You can use '3' or whatever.

If you hear "compile error", then you have a typo -- probably unbalanced
quotes or you left off a ';' in the tts rule modification. Please send
email to me directly with problems.

I hope whatever modifications you make helps,

Neil Soiffer


On Sun, Dec 6, 2020 at 7:02 PM Bhavya shah via BlindMath <
blindmath at nfbnet.org> wrote:

> Dear all,
>
> I am facing a number of inconveniences in reading mathematical content
> with Math Player 4.0 and NVDA 2020.3. I have configured Math Player to
> read in the blindness, ClearSpeak and Terse modes.
> * It reads the same symbol differently in different contexts, often
> incorrectly. It reads the colon used while defining functions as
> 'ratio' and I would personally much prefer if the colon was
> universally read just as colon rather than as 'ratio', 'such that' and
> 'maps'. To be clear, the colon is just one example of a more prevalent
> issue. I like to speak and hear Math in concise forms rather than the
> most contextually and conventionally appropriate manner. But while
> screen readers have features like dictionary manager and speech
> dictionaries, Math Player does not have something similar.
> * There is a great deal of pausing while reading anything, even simple
> expression, to an extent that it serves as a slowdown. As someone who
> uses fast speech synthesis, I find the pauses between parts of an
> expression jarring. There doesn't seem to be any way to disable or
> reduce these pauses either.
> The underlying concern common to all of these is that as it stands,
> Math Player is not very customizable and it is not clear if there are
> any plans to update or maintain it in the future. Given that, I have
> the following questions:
> * Are there some hacky work-arounds to get around the issues I outlined
> above?
> * Do any alternatives to Math Player exist today? Even if such
> alternatives don't address my concerns currently, if they are active
> projects, there is at least the hope that the customizability I seek
> could get implemented in the future.
>
> I would truly appreciate any assistance!
>
> Thanks.
>
> --
> Best Regards
> Bhavya Shah
> Stanford University | Class of 2024
> E-mail Address: bhavya.shah125 at gmail.com
> LinkedIn: https://www.linkedin.com/in/bhavyashah125/
>
> _______________________________________________
> BlindMath mailing list
> BlindMath at nfbnet.org
> http://nfbnet.org/mailman/listinfo/blindmath_nfbnet.org
> To unsubscribe, change your list options or get your account info for
> BlindMath:
>
> http://nfbnet.org/mailman/options/blindmath_nfbnet.org/soiffer%40alum.mit.edu
> BlindMath Gems can be found at <
> http://www.blindscience.org/blindmath-gems-home>
>


More information about the BlindMath mailing list