NSoiffer / MathCAT

MathCAT: Math Capable Assistive Technology for generating speech, braille, and navigation.
MIT License
54 stars 33 forks source link

Introduce Math capital pitch option #75

Open bhavyashah opened 1 year ago

bhavyashah commented 1 year ago

I use ESpeak-NG with NVDA and have Capital pitch change percentage set to 30 (probably default) in NVDA's Voice Settings. Capitals in Math (therefore likely processed by Math CAT) are spoken at way higher a pitch than the increased pitch at which capitals are otherwise read, to the point that Math capitals can sometimes be a bit challenging to understand. While there may be an argument to be made about how Math capitals should be spoken at an even higher pitch to make the contrast clearer since capitalization is more vital in Math than in general contexts, I think: (a) the current pitch change sounds excessive with ESpeak-NG to me, and (b) making this user-customizable would overcome the subjectivity of individual preferences.

NSoiffer commented 1 year ago

Coincidentally, I was looking at code "near" the pitch change (when sayCapForCapitals is true, it is locked to English, so I need to generalize it to other languages).

The only place that does pitch changes in MathCAT is this code in the python interface for MathCAT (MathCAT.py):

                if use_pitch:
                    out.append(PitchCommand(multiplier=int(synthConfig["capPitchChange"])))

This should be using the value in NVDA's pitch change dialog. Mine is set to 30 and to me it sounds good with the SAPI 5 Zira voice. I just tried ESpeak-NG and Max, and it sounded ok.

Could you include all the settings you have for the voice along with the setting for the pitch change so I can try and replicate it.

bhavyashah commented 1 year ago

I am not sure where in NVDA data I will find all these settings with their states. Hence, here is the Voice Settings dialog as I have configured it pasted below: edit read only multi line eSpeak NG Voice: combo box English (Great Britain) collapsed Alt+v Variant: combo box Steph collapsed Alt+a Rate: slider 30 Alt+r Rate boost check box checked Alt+t Pitch: slider 39 Alt+p Inflection: slider 41 Alt+i Volume: slider 30 Alt+o Automatic language switching (when supported) check box not checked Automatic dialect switching (when supported) check box not checked Punctuation/symbol level: combo box all collapsed Alt+l Trust voice's language when processing characters and symbols check box checked Include Unicode Consortium data (including emoji) when processing characters and symbols check box checked Delayed descriptions for characters on cursor movement check box not checked Alt+d Capital pitch change percentage edit selected 30 Say cap before capitals check box not checked Alt+c Beep for capitals check box not checked Alt+b Use spelling functionality if supported check box checked Alt+s I checked this again and there is a distinct difference in the pitch of plain text capitals and those in a Math block. If this remains unreproducible for you, I'll send over a test case.