+
    Qia( c                  sJ  a  0 t $ R t^ RIHt RtRtRtRtRt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIHt ^ R	IHt ^R
IHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIH t  ^RI!H"t" ^RI#H$t$ ^RI%H&t& ^RI'H(t( ^RI)H*t* ^RI+H,t, ^RI-H.t. ]'       d*   ^ RI/t/]/P`                  ! RR 4       ^ R!I1H2t2 ^R"I3H4t4 ^R#I H5t5  ! R$ R%]4      t6 ! R& R']4      t7 ! R( R)]4      t8 ! R* R+4      t9]9! 4       t:R+];R,&   R- R. lt<R# )/IConfigures speech and verbosity settings and adjusts strings accordingly.)annotationsz$Id$z
$Revision$z$Date$zQCopyright (c) 2005-2008 Sun Microsystems Inc.Copyright (c) 2016-2025 Igalia, S.L.ZLGPLN)Enum)TYPE_CHECKING)cmdnames)dbus_service)debug)focus_manager)input_event)keybindings)mathsymbols)messages)object_properties)pronunciation_dict)settings)settings_manager)speech)speechserver)ACSS)
AXDocument)AXHypertext)AXObject)AXTable)AXText)AXUtilitiesAtspiz2.0)r   )default)SpeechServerc                  sb    ] tR t^LtRt]P                  t]P                  t	]P                  tRtR# )CapitalizationStylezBCapitalization style enumeration with string values from settings. N)__name__
__module____qualname____firstlineno____doc__r   CAPITALIZATION_STYLE_NONENONECAPITALIZATION_STYLE_SPELLZSPELLCAPITALIZATION_STYLE_ICONZICON__static_attributes__r       F/usr/lib/python3.14/site-packages/orca/speech_and_verbosity_manager.pyr   r   L   s&    L--D//E--Dr(   r   c                  s    ] tR t^StRt]P                  t]P                  t	]P                  t]P                  t]R R l4       tRtR# )PunctuationStylez<Punctuation style enumeration with int values from settings.c                   V ^8  d   QhRR/#    returnstrr   Zformat   "r)   __annotate__ZPunctuationStyle.__annotate__\        ! !S !r(   c                6    V P                   P                  4       # z6Returns the lowercase string name for this enum value.nameZlowerself   &r)   string_nameZPunctuationStyle.string_name[        yy  r(   r   N)r   r   r    r!   r"   r   PUNCTUATION_STYLE_NONEr$   PUNCTUATION_STYLE_SOMEZSOMEPUNCTUATION_STYLE_MOSTZMOSTPUNCTUATION_STYLE_ALLZALLpropertyr;   r'   r   r(   r)   r*   r*   S   sC    F**D**D**D

(
(C! !r(   r*   c                  s`    ] tR t^atRt]P                  t]P                  t	]
R R l4       tRtR# )VerbosityLevelz:Verbosity level enumeration with int values from settings.c               r+   r,   r   r0   r1   r)   r2   ZVerbosityLevel.__annotate__h   r3   r(   c                r4   r5   r6   r8   r:   r)   r;   ZVerbosityLevel.string_nameg   r<   r(   r   N)r   r   r    r!   r"   r   VERBOSITY_LEVEL_BRIEFZBRIEFVERBOSITY_LEVEL_VERBOSEZVERBOSErA   r;   r'   r   r(   r)   rB   rB   a   s-    D**E..G! !r(   rB   c                  s   ] tR t^mtRtR R ltERR R lltERR R lltR R	 ltR
 R lt	R R lt
R R ltR R ltR R lt]P                  R R l4       t]P                  R R l4       t]P$                  R R l4       t]P                  R R l4       t]P$                  R R l4       t]P                  R R l4       t]P                  R  R! l4       t]P0                  ERR# R$ ll4       t]P                  R% R& l4       t]P$                  R' R( l4       tR) R* ltR+ R, lt]P<                  ERR- R. ll4       t]P<                  ERR/ R0 ll4       t ]P<                  ERR1 R2 ll4       t!]P<                  ERR3 R4 ll4       t"]P                  R5 R6 l4       t#]P$                  R7 R8 l4       t$]P<                  ERR9 R: ll4       t%]P<                  ERR; R< ll4       t&]P                  R= R> l4       t']P$                  R? R@ l4       t(]P<                  ERRA RB ll4       t)]P<                  ERRC RD ll4       t*]P                  RE RF l4       t+]P$                  RG RH l4       t,]P<                  ERRI RJ ll4       t-]P<                  ERRK RL ll4       t.]P                  RM RN l4       t/]P$                  RO RP l4       t0]P<                  ERRQ RR ll4       t1RS RT lt2]P                  RU RV l4       t3]P$                  RW RX l4       t4]P<                  ERRY RZ ll4       t5R[ R\ lt6ERR] R^ llt7]P<                  ERR_ R` ll4       t8]P                  Ra Rb l4       t9]P$                  Rc Rd l4       t:]P                  Re Rf l4       t;]P$                  Rg Rh l4       t<]P                  Ri Rj l4       t=]P$                  Rk Rl l4       t>]P                  Rm Rn l4       t?]P$                  Ro Rp l4       t@]P                  Rq Rr l4       tA]P$                  Rs Rt l4       tB]P                  Ru Rv l4       tC]P$                  Rw Rx l4       tD]P                  Ry Rz l4       tE]P$                  R{ R| l4       tF]P                  R} R~ l4       tG]P$                  R R l4       tH]P                  R R l4       tI]P$                  R R l4       tJ]P                  R R l4       tK]P$                  R R l4       tL]P                  R R l4       tM]P$                  R R l4       tN]P                  R R l4       tO]P$                  R R l4       tP]P                  R R l4       tQ]P$                  R R l4       tR]P                  R R l4       tS]P$                  R R l4       tT]P                  R R l4       tU]P$                  R R l4       tV]P                  R R l4       tW]P$                  R R l4       tX]P                  R R l4       tY]P$                  R R l4       tZ]P                  R R l4       t[]P$                  R R l4       t\]P                  R R l4       t]]P$                  R R l4       t^]P                  R R l4       t_]P$                  R R l4       t`]P                  R R l4       ta]P$                  R R l4       tb]P                  R R l4       tc]P$                  R R l4       td]P                  R R l4       te]P$                  R R l4       tf]P                  R R l4       tg]P$                  R R l4       th]P                  R R l4       ti]P$                  R R l4       tj]P<                  ERR R ll4       tkR R ltl]P                  R R l4       tm]P$                  R R l4       tn]P                  R R l4       to]P$                  R R l4       tp]P                  R R l4       tq]P$                  R R l4       tr]P<                  ERR R ll4       ts]P                  R R l4       tt]P$                  R R l4       tuR R ltv]P                  R R l4       tw]P$                  R R l4       tx]P<                  ERR R ll4       ty]P                  R R l4       tz]P$                  R R l4       t{]P                  R R l4       t|]P$                  R R l4       t}]P<                  ERR R ll4       t~]P<                  ERR R ll4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       tERR R lltER	R R lltERR ER  lltERtR"# (
  SpeechAndVerbosityManagerr    c               r+   r-   r.   Noner   r0   r1   r)   r2   &SpeechAndVerbosityManager.__annotate__p   s     	P 	P$ 	Pr(   c                	s    V P                  R 4      V n        \        P                  ! 4       V n        RV n        RV n        Rp\        P                  ! \        P                  VR 4       \        P                  ! 4       pVP                  RV 4       R# )T z9SPEECH AND VERBOSITY MANAGER: Registering D-Bus commands.rE   N)get_handlers	_handlersr	   KeyBindings	_bindings_last_indentation_description_last_error_descriptionr   print_message
LEVEL_INFOr   Zget_remote_controllerZregister_decorated_module)r9   msgZ
controller   &  r)   __init__Z"SpeechAndVerbosityManager.__init__p   sq    CGCTCTUYCZ2=2I2I2K24*,.$IE,,c48!779
,,-H$Or(   c               s$    V ^8  d   QhRRRRRR/# )r-   refreshbool
is_desktopr.   zkeybindings.KeyBindingsr   r0   r1   r)   r2   rH   {   s$      15	 r(   c                sN   V'       dc   RV 2p\         P                  ! \         P                  VR4       V P                  P	                  R4       V P                  4        V P                  # V P                  P                  4       '       d   V P                  4        V P                  # )z5Returns the speech and verbosity manager keybindings.z@SPEECH AND VERBOSITY MANAGER: Refreshing bindings.  Is desktop: Tz2SPEECH AND VERBOSITY MANAGER: Refreshing bindings.)r   rP   rQ   rM   Zremove_key_grabs_setup_bindingsZis_empty)r9   rU   rW   rR   s   &&& r)   get_bindingsZ&SpeechAndVerbosityManager.get_bindings{   s    
 TU_T`aC 0 0#t<NN++,`a  " ~~ ^^$$&&  "~~r(   c                    V ^8  d   QhRRRR/# )r-   rU   rV   r.   z(dict[str, input_event.InputEventHandler]r   r0   r1   r)   r2   rH      s      D 5] r(   c                s    V'       d9   Rp\         P                  ! \         P                  VR4       V P                  4        V P                  # )z2Returns the speech and verbosity manager handlers.z2SPEECH AND VERBOSITY MANAGER: Refreshing handlers.T)r   rP   rQ   _setup_handlersrK   )r9   rU   rR      && r)   rJ   Z&SpeechAndVerbosityManager.get_handlers   s:     FC 0 0#t<  "~~r(   c               r+   rF   r   r0   r1   r)   r2   rH      s     L9 L9 L9r(   c                s   / V n         \        P                  ! V P                  \        P
                  4      V P                   R&   \        P                  ! V P                  \        P                  4      V P                   R&   \        P                  ! V P                  \        P                  4      V P                   R&   \        P                  ! V P                  \        P                  4      V P                   R&   \        P                  ! V P                  \        P                  4      V P                   R&   \        P                  ! V P                  \        P                  4      V P                   R&   \        P                  ! V P                   \        P"                  4      V P                   R&   \        P                  ! V P$                  \        P&                  4      V P                   R&   \        P                  ! V P(                  \        P*                  4      V P                   R	&   \        P                  ! V P,                  \        P.                  4      V P                   R
&   \        P                  ! V P0                  \        P2                  4      V P                   R&   \        P                  ! V P4                  \        P6                  4      V P                   R&   \        P                  ! V P8                  \        P:                  4      V P                   R&   \        P                  ! V P<                  \        P>                  4      V P                   R&   Rp\@        PB                  ! \@        PD                  VR4       R# )z6Sets up the speech and verbosity input event handlers.cycleCapitalizationStyleHandler$cycleSpeakingPunctuationLevelHandlercycleSynthesizerHandlerchangeNumberStyleHandlertoggleSilenceSpeechHandlertoggleSpeechVerbosityHandler-toggleSpeakingIndentationJustificationHandlertoggleTableCellReadModeHandlerdecreaseSpeechRateHandlerincreaseSpeechRateHandlerdecreaseSpeechPitchHandlerincreaseSpeechPitchHandlerdecreaseSpeechVolumeHandlerincreaseSpeechVolumeHandlerz.SPEECH AND VERBOSITY MANAGER: Handlers set up.TN)#rK   r   ZInputEventHandlercycle_capitalization_styler   ZCYCLE_CAPITALIZATION_STYLEcycle_punctuation_levelZCYCLE_PUNCTUATION_LEVELcycle_synthesizerZCYCLE_SYNTHESIZERchange_number_styleZCHANGE_NUMBER_STYLEtoggle_speechZTOGGLE_SPEECHtoggle_verbosityZTOGGLE_SPEECH_VERBOSITY$toggle_indentation_and_justificationZ+TOGGLE_SPOKEN_INDENTATION_AND_JUSTIFICATIONtoggle_table_cell_reading_modeZTOGGLE_TABLE_CELL_READ_MODEdecrease_rateZDECREASE_SPEECH_RATEincrease_rateZINCREASE_SPEECH_RATEdecrease_pitchZDECREASE_SPEECH_PITCHincrease_pitchZINCREASE_SPEECH_PITCHdecrease_volumeZDECREASE_SPEECH_VOLUMEincrease_volumeZINCREASE_SPEECH_VOLUMEr   rP   rQ   r9   rR      & r)   r[   Z)SpeechAndVerbosityManager._setup_handlers   s     ))//335 	89 )),,002 	=> ))&&**, 	01 ))((,,. 	12 ))""&&( 	34 ))%%002 	56 ))99DDF 	FG ))33446 	78 ))""--/ 	23 ))""--/ 	23 ))##..0 	34 ))##..0 	34 ))$$//1 	45 ))$$//1 	45
 ?E,,c48r(   c               r+   rF   r   r0   r1   r)   r2   rH      s     h9 h9 h9r(   c           	     s
   \         P                  ! 4       V n        V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R	,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R
,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       Rp\        P                  ! \        P                  VR4       R# )z.Sets up the speech and verbosity key bindings.rI   r]   r^   r_   r`   re   rf   rg   rh   ri   rj   rc   sra   Zvrb   ZF11rd   z.SPEECH AND VERBOSITY MANAGER: Bindings set up.TN)r	   rL   rM   ZaddZ
KeyBindingZDEFAULT_MODIFIER_MASKZNO_MODIFIER_MASKrK   ZORCA_MODIFIER_MASKr   rP   rQ   ry   rz   r)   rX   Z)SpeechAndVerbosityManager._setup_bindings   s    %002""11,,@A	C	D 	""11,,EF	H	I 	""11,,89	;	< 	""11,,9:	<	= 	""11,,:;	=	> 	""11,,:;	=	> 	""11,,;<	>	? 	""11,,;<	>	? 	""11,,<=	?	@ 	""11,,<=	?	@ 	""11,,NO	Q	R 	""11..;<	>	? 	""11..=>	@	A 	""11..?@	B	C ?E,,c48r(   c               r+   )r-   r.   zSpeechServer | Noner   r0   r1   r)   r2   rH   L  s      0 r(   c                s  aa \         P                  ! 4       oSf+   Rp\        P                  ! \        P                  VR4       R# \
        P                  ! 4       oVV3R lp\        P                  ! VRR7      pVP                  4         SP                  RR7       R	S.p\        P                  ! \        P                  TR4       S#   \
        P                   d-    Rp\        P                  ! \        P                  TR4        R# i ; i)
z/Returns the speech server if it is responsive..Nz4SPEECH AND VERBOSITY MANAGER: Speech server is None.Tc                 sJ   < S P                  4        SP                  R 4       R# )TN)get_output_moduleZput)resultresult_queues   r)   health_check_threadZBSpeechAndVerbosityManager._get_server.<locals>.health_check_threadW  s    $$&T"r(   )ZtargetZdaemong       @)ZtimeoutzBSPEECH AND VERBOSITY MANAGER: Speech server health check timed outz.SPEECH AND VERBOSITY MANAGER: Speech server is)r   Zget_speech_serverr   rP   rQ   queueZQueue	threadingZThreadstartgetZEmptyLEVEL_WARNINGprint_tokens)r9   rR   r   Zthreadtokensr}   r~   s   &    @@r)   _get_serverZ%SpeechAndVerbosityManager._get_serverL  s     ))+>HC 0 0#t<*/++-	# !!)<TJ	S) CFK5++VT: {{ 	VC 3 3S$?	s   C	 	=D
	D
c               r+   r-   r.   z	list[str]r   r0   r1   r)   r2   rH   i  s     : :	 :r(   c                sP    \        V P                  4       P                  4       4      # )z+Returns a list of available speech servers.)list_get_server_module_mapZkeysr8   r:   r)   _get_available_serversZ0SpeechAndVerbosityManager._get_available_serversi  s!     D//166899r(   c               r+   )r-   r.   zdict[str, str]r   r0   r1   r)   r2   rH   n  s       r(   c                s   / p\         P                   FH  p \        P                  ! RV 24      p TP
                  pTP                  4       ;p'       d   Y!T&   KH  KJ  	  V#   \         d.     \        P                  ! T4      p LU  \         d      K  i ; ii ; i  \        \        \        3 d:   pRT R2T.p\        P                  ! \        P                  TR4        Rp?K  Rp?ii ; i)z2Returns a mapping of server names to module names.zorca.zSPEECH AND VERBOSITY MANAGER: z not available:TN)r   ZspeechFactoryModules	importlibZimport_moduleZImportErrorr   get_factory_nameZAttributeErrorZ	TypeErrorr   r   rQ   )r9   r}   Zmodule_nameZfactoryZspeech_server_classserver_nameZerrorr   s   &       r)   r   Z0SpeechAndVerbosityManager._get_server_module_mapn  s     #88K#11E+2GHC&-&:&:#"5"F"F"HH;H*5;' I 9$   '55kBG"  #I{; C:;-WY^_""5#3#3VTBBCsF   A!#BB!B-BBBBBC+2.C&&C+c               rZ   )r-   target_serverr/   r.   rV   r   r0   r1   r)   r2   rH     s     : :C :D :r(   c                s   V P                  4       pVP                  V4      pV'       g   R# V P                  4        \        P                  ! 4       P                  RV4       V P                  4        V P                  4       V8H  # )z!Switches to the specified server.FZspeechServerFactory)r   r   shutdown_speechr   get_managerset_settingstart_speechget_current_server)r9   r   Zserver_module_mapZtarget_module   &&  r)   _switch_serverZ(SpeechAndVerbosityManager._switch_server  so     !779)--m<$$&223H-X&&(M99r(   c               r+   r   r   r0   r1   r)   r2   rH     s      y r(   c                s~    V P                  4       pRV R2p\        P                  ! \        P                  VR4       V# )z$Returns a list of available servers.z1SPEECH AND VERBOSITY MANAGER: Available servers: .T)r   r   rP   rQ   )r9   r}   rR   rS   r)   get_available_serversZ/SpeechAndVerbosityManager.get_available_servers  s=     ,,.A&KE,,c48r(   c               r+   r,   r   r0   r1   r)   r2   rH     s      C r(   c                    V P                  4       pVf+   Rp\        P                  ! \        P                  VR4       R# VP	                  4       pRV R2p\        P                  ! \        P                  VR4       V# )zKReturns the name of the current speech server (Speech Dispatcher or Spiel).7SPEECH AND VERBOSITY MANAGER: Cannot get speech server.TrI   z)SPEECH AND VERBOSITY MANAGER: Server is: r   )r   r   rP   rQ   r   )r9   serverrR   r7      &   r)   r   Z,SpeechAndVerbosityManager.get_current_server  sp     !!#>KC 0 0#t<&&(9$qAE,,c48r(   c               rZ   r-   valuer/   r.   rV   r   r0   r1   r)   r2   rH     s     * * * *r(   c                s$    V P                  V4      # )zASets the current speech server (e.g. Speech Dispatcher or Spiel).)r   )r9   r   s   &&r)   set_current_serverZ,SpeechAndVerbosityManager.set_current_server  s     ""5))r(   c               r+   r,   r   r0   r1   r)   r2   rH     s       r(   c                r   )z5Returns the current synthesizer of the speech server.r   TrI   z.SPEECH AND VERBOSITY MANAGER: Synthesizer is: r   )r   r   rP   rQ   r|   )r9   r   rR   r}   r   r)   get_current_synthesizerZ1SpeechAndVerbosityManager.get_current_synthesizer  sp     !!#>KC 0 0#t<))+>vhaHE,,c48r(   c               rZ   r   r   r0   r1   r)   r2   rH     s     3 3S 3T 3r(   c                s   V P                  4       pVf+   Rp\        P                  ! \        P                  VR4       R# V P	                  4       pW9  d1   RV R2V.p\        P
                  ! \        P                  VR4       R# RV R2p\        P                  ! \        P                  VR4       VP                  V4       VP                  4       V8H  # )z9Sets the current synthesizer of the active speech server.r   TFSPEECH AND VERBOSITY MANAGER: 'z' is not inz6SPEECH AND VERBOSITY MANAGER: Setting synthesizer to: r   )r   r   rP   rQ   get_available_synthesizersr   set_output_moduler|   )r9   r   r   rR   	availabler      &&    r)   set_current_synthesizerZ1SpeechAndVerbosityManager.set_current_synthesizer  s     !!#>KC 0 0#t<335	!7wkJIVFu//>FugQOE,,c48  ''')U22r(   c               r+   r   r   r0   r1   r)   r2   rH     s      I r(   c                sN   V P                  4       pVf+   Rp\        P                  ! \        P                  VR4       . # VP	                  4       pV Uu. uF  qDP                  4       ^,          NK  	  ppRV R2p\        P                  ! \        P                  VR4       V# u upi )z>Returns a list of available synthesizers of the speech server.r   Tz6SPEECH AND VERBOSITY MANAGER: Available synthesizers: r   )r   r   rP   rQ   Zget_speech_serversget_info)r9   r   rR   Zsynthesizersr{   r}      &     r)   r   Z4SpeechAndVerbosityManager.get_available_synthesizers  s     !!#>KC 0 0#t<I002+78<a**,q//<8FvhaPE,,c48 9s   B"c               r+   r   r   r0   r1   r)   r2   rH     s      i r(   c                s.   V P                  4       pVf   . # VP                  4       pV'       g   . # . pV FH  pVP                  \        P                  P
                  R4      ;p'       g   K7  VP                  V4       KJ  	  \        \        V4      4      pV# )z?Returns a list of available voices for the current synthesizer.rI   )	r   get_voice_familiesr   r   VoiceFamilyNAMEappendsortedset)r9   r   voicesr}   Zvoice
voice_namer   r)   get_available_voicesZ.SpeechAndVerbosityManager.get_available_voices  s     !!#>I**,IE"YY|'?'?'D'DbIIzIIj)  F$r(   Nc               s0    V ^8  d   QhRRRRRRRRRR	R
R/# )r-   languager/   variantscriptdefault.Script | Noneeventinput_event.InputEvent | Nonenotify_userrV   r.   zlist[tuple[str, str, str]]r   r0   r1   r)   r2   rH     sF        &	
 -  
$r(   c           
     s   RVRVRVRVRV.
p\         P                  ! \         P                  VR4       V P                  4       pVf   . # VP	                  W4      p. p	V F-  w  rpT	P                  Y;'       g    RT;'       g    R34       K/  	  R\        V	4       R	V R
2p\         P                  ! \         P                  VR4       V	# )z>Returns a list of available voices for the specified language.z@SPEECH AND VERBOSITY MANAGER: get_voices_for_language. Language:zVariant:Script:Event:notify_user:TrI   z$SPEECH AND VERBOSITY MANAGER: Found z voice(s) for 'z'.)r   r   rQ   r   Zget_voice_families_for_languager   lenrP   )r9   r   r   r   r   r   r   r   r   r}   r7   ZlangZvarrR   s   &&&&&&        r)   get_voices_for_languageZ1SpeechAndVerbosityManager.get_voices_for_language  s     UV^gy&E>;@ 	5++VT:!!#>I77J%ODMM4SYYB78  & 5S[MQYPZZ\]E,,c48r(   c               r+   r,   r   r0   r1   r)   r2   rH     s      3 r(   c                s    V P                  4       pVf   R# RpVP                  4       ;p'       d+   VP                  \        P                  P
                  R4      pV# )zReturns the current voice name.rI   )r   Zget_voice_familyr   r   r   r   )r9   r   r}   voice_familyr   r)   get_current_voiceZ+SpeechAndVerbosityManager.get_current_voice  sV     !!#>!2244<4!%%l&>&>&C&CRHFr(   c               rZ   )r-   r   r/   r.   rV   r   r0   r1   r)   r2   rH   $  s      C D r(   c                s   V P                  4       pVf   R# V P                  4       pW9  d1   RV RV 2p\        P                  ! \        P                  VR4       R# VP                  4       pV'       g   R# RpV FH  pVP                  \        P                  P                  R4      pW8X  g   K5  VP                  V4       Rp M	  RV RV 2p\        P                  ! \        P                  VR4       V# )z2Sets the current voice for the active synthesizer.Fr   z' is not in TrI   z,SPEECH AND VERBOSITY MANAGER: Set voice to 'z': )r   r   r   rP   rQ   r   r   r   r   r   Zset_voice_family)	r9   r   r   r   rR   r   r}   r   Zfamily_names	   &&       r)   set_current_voiceZ+SpeechAndVerbosityManager.set_current_voice#  s     !!#>--/	&3J<|I;WC 0 0#t<**,"L&**<+C+C+H+H"MK(''5 # =ZLF8TE,,c48r(   c               r+   )r-   r.   ztuple[str, str]r   r0   r1   r)   r2   rH   A  s     & & &r(   c                s    V P                  4       pVf   R# VP                  4       w  r#RV RV R2p\        P                  ! \        P                  VR4       W#3# )z5Returns the name and ID of the current speech server.z2SPEECH AND VERBOSITY MANAGER: Speech server info: z, r   T)rI   rI   )r   r   r   rP   rQ   )r9   r   r   	server_idrR   s   &    r)   get_current_speech_server_infoZ8SpeechAndVerbosityManager.get_current_speech_server_infoA  sc     !!#>O!'!2B;-rR[Q\\]^E,,c48%%r(   c               r+   rF   r   r0   r1   r)   r2   rH   P  s      d r(   c                sB   \         P                  ! 4       pVP                  R4      '       g;   Rp\        P                  ! \        P
                  VR4       V P                  4        R# Rp\        P                  ! \        P
                  VR4       V P                  4        R# )z>Checks the speech setting and initializes speech if necessary.enableSpeechzJSPEECH AND VERBOSITY MANAGER: Speech is not enabled. Shutting down speech.TNz0SPEECH AND VERBOSITY MANAGER: Speech is enabled.)r   r   get_settingr   rP   rQ   r   r   )r9   managerrR   rS   r)   check_speech_settingZ.SpeechAndVerbosityManager.check_speech_settingP  sx     #..0"">22^C 0 0#t<  "@E,,c48r(   c               (    V ^8  d   QhRRRRRRRR/# r-   r   r   r   r   r   rV   r.   r   r0   r1   r)   r2   rH   _  s2      % - 	
 
r(   c                s    RVRVRV.p\         P                  ! \         P                  VR4       \        P                  ! 4        R# )zStarts the speech server.z3SPEECH AND VERBOSITY MANAGER: start_speech. Script:r   r   T)r   r   rQ   r   initr9   r   r   r   r      &&&& r)   r   Z&SpeechAndVerbosityManager.start_speech^  s?     HE>;@5++VT:r(   c               r   r   r   r0   r1   r)   r2   rH   n  s2      % - 	
 
r(   c                s    RVRVRV.p\         P                  ! \         P                  VR4       V P                  4       ;p'       d   VP	                  4        R# )zInterrupts the speech server.z7SPEECH AND VERBOSITY MANAGER: interrupt_speech. Script:r   r   T)r   r   rQ   r   Zstopr9   r   r   r   r   r      &&&&  r)   interrupt_speechZ*SpeechAndVerbosityManager.interrupt_speechm  sS     LVE>;@5++VT:%%''6'KKMr(   c               r   r   r   r0   r1   r)   r2   rH     s2      % - 	
 
r(   c                s    RVRVRV.p\         P                  ! \         P                  VR4       V P                  4       ;p'       d&   VP	                  4        \
        P                  ! 4        R# )zShuts down the speech server.z6SPEECH AND VERBOSITY MANAGER: shutdown_speech. Script:r   r   T)r   r   rQ   r   Zshutdown_active_serversr   Zdeprecated_clear_serverr   r   r)   r   Z)SpeechAndVerbosityManager.shutdown_speech  sb     KFE>;@5++VT:%%''6'**,**,r(   c               r   r   r   r0   r1   r)   r2   rH     s2      % - 	
 
r(   c                s    RVRVRV.p\         P                  ! \         P                  VR4       V P                  4        V P	                  4        R# )z%Shuts down and re-initializes speech.z5SPEECH AND VERBOSITY MANAGER: refresh_speech. Script:r   r   T)r   r   rQ   r   r   r   r   r)   refresh_speechZ(SpeechAndVerbosityManager.refresh_speech  sN     J6E>;@5++VT:r(   c               r+   r-   r.   intr   r0   r1   r)   r2   rH     s     
 
# 
r(   c                s$   ^2p\         P                  P                  \         P                  4      pV'       d-   \        P
                  V9   d   V\        P
                  ,          pRV R2p\        P                  ! \        P                  VR4       V# )z Returns the current speech rate.z/SPEECH AND VERBOSITY MANAGER: Current rate is: r   T)	r   r   r   DEFAULT_VOICEr   RATEr   rP   rQ   r9   r}   default_voicerR   r   r)   get_rateZ"SpeechAndVerbosityManager.get_rate  sj      ++H,B,BCTYY-7"499-F?xqIE,,c48r(   c               rZ   r-   r   r   r.   rV   r   r0   r1   r)   r2   rH     s      c d r(   c                R   \        V\        \        34      '       g   R# \        P                  P                  \        P                  4      pV'       d(   \        P                  V9   d   W\        P                  &   RV R2p\        P                  ! \        P                  VR4       R# )z2Sets the current speech rate (0-100, default: 50).Fz+SPEECH AND VERBOSITY MANAGER: Set rate to: r   T)
isinstancer   floatr   r   r   r   r   r   r   rP   rQ   r9   r   r   rR   r   r)   set_rateZ"SpeechAndVerbosityManager.set_rate  su     %#u.. ++H,B,BCTYY-7',$))$;E7!DE,,c48r(   c               r   r   r   r0   r1   r)   r2   rH     2      % - 	
 
r(   c                T   RVRVRV.p\         P                  ! \         P                  VR4       V P                  4       pVf+   Rp\         P                  ! \         P                  VR4       R# VP                  4        V'       d$   Ve    VP                  \        P                  4       R# )zDecreases the speech rate.z4SPEECH AND VERBOSITY MANAGER: decrease_rate. Script:r   r   Tr   )	r   r   rQ   r   rP   Zdecrease_speech_ratepresent_messager   ZSPEECH_SLOWERr9   r   r   r   r   r   rR      &&&&   r)   rs   Z'SpeechAndVerbosityManager.decrease_rate       I&E>;@5++VT:!!#>KC 0 0#t<##%6-""8#9#9:r(   c               r   r   r   r0   r1   r)   r2   rH     r   r(   c                r   )zIncreases the speech rate.z4SPEECH AND VERBOSITY MANAGER: increase_rate. Script:r   r   Tr   )	r   r   rQ   r   rP   Zincrease_speech_rater   r   ZSPEECH_FASTERr   r   r)   rt   Z'SpeechAndVerbosityManager.increase_rate  r   r(   c               r+   r-   r.   r   r   r0   r1   r)   r2   rH     s     
 
5 
r(   c                $   Rp\         P                  P                  \         P                  4      pV'       d-   \        P
                  V9   d   V\        P
                  ,          pRV R2p\        P                  ! \        P                  VR4       V# )z!Returns the current speech pitch.g      @z0SPEECH AND VERBOSITY MANAGER: Current pitch is: r   T)	r   r   r   r   r   AVERAGE_PITCHr   rP   rQ   r   r   r)   	get_pitchZ#SpeechAndVerbosityManager.get_pitch  sn      ++H,B,BCT//=@"4#5#56F@JE,,c48r(   c               rZ   r-   r   r   r.   rV   r   r0   r1   r)   r2   rH     s      u  r(   c                r   )z7Sets the current speech pitch (0.0-10.0, default: 5.0).Fz,SPEECH AND VERBOSITY MANAGER: Set pitch to: r   T)r   r   r   r   r   r   r   r   r   r   rP   rQ   r   r   r)   	set_pitchZ#SpeechAndVerbosityManager.set_pitch  sy     %#u.. ++H,B,BCT//=@05$,,-<UG1EE,,c48r(   c               r   r   r   r0   r1   r)   r2   rH     r   r(   c                r   )zDecreases the speech pitchz5SPEECH AND VERBOSITY MANAGER: decrease_pitch. Script:r   r   Tr   )	r   r   rQ   r   rP   Zdecrease_speech_pitchr   r   ZSPEECH_LOWERr   r   r)   ru   Z(SpeechAndVerbosityManager.decrease_pitch  s     J6E>;@5++VT:!!#>KC 0 0#t<$$&6-""8#8#89r(   c               r   r   r   r0   r1   r)   r2   rH   '  r   r(   c                r   )zIncrease the speech pitchz5SPEECH AND VERBOSITY MANAGER: increase_pitch. Script:r   r   Tr   )	r   r   rQ   r   rP   Zincrease_speech_pitchr   r   ZSPEECH_HIGHERr   r   r)   rv   Z(SpeechAndVerbosityManager.increase_pitch&  s     J6E>;@5++VT:!!#>KC 0 0#t<$$&6-""8#9#9:r(   c               r+   r   r   r0   r1   r)   r2   rH   @  s     
 
E 
r(   c                r   )z"Returns the current speech volume.g      $@z1SPEECH AND VERBOSITY MANAGER: Current volume is: r   T)	r   r   r   r   r   GAINr   rP   rQ   r   r   r)   
get_volumeZ$SpeechAndVerbosityManager.get_volume?  sj      ++H,B,BCTYY-7"499-FA&KE,,c48r(   c               rZ   r   r   r0   r1   r)   r2   rH   M  s       $ r(   c                r   )z9Sets the current speech volume (0.0-10.0, default: 10.0).Fz-SPEECH AND VERBOSITY MANAGER: Set volume to: r   T)r   r   r   r   r   r   r   r   r   r   rP   rQ   r   r   r)   
set_volumeZ$SpeechAndVerbosityManager.set_volumeL  su     %#u.. ++H,B,BCTYY-7',$))$=eWAFE,,c48r(   c               r   r   r   r0   r1   r)   r2   rH   \  r   r(   c                r   )zDecreases the speech volumez6SPEECH AND VERBOSITY MANAGER: decrease_volume. Script:r   r   Tr   )	r   r   rQ   r   rP   Zdecrease_speech_volumer   r   ZSPEECH_SOFTERr   r   r)   rw   Z)SpeechAndVerbosityManager.decrease_volume[       KFE>;@5++VT:!!#>KC 0 0#t<%%'6-""8#9#9:r(   c               r   r   r   r0   r1   r)   r2   rH   u  r   r(   c                r   )zIncreases the speech volumez6SPEECH AND VERBOSITY MANAGER: increase_volume. Script:r   r   Tr   )	r   r   rQ   r   rP   Zincrease_speech_volumer   r   ZSPEECH_LOUDERr   r   r)   rx   Z)SpeechAndVerbosityManager.increase_volumet  r   r(   c               r+   r,   r   r0   r1   r)   r2   rH     s     Q Q# Qr(   c                J    \         P                  ! 4       P                  R4      # )z)Returns the current capitalization style.capitalizationStyler   r   r   r8   r:   r)   get_capitalization_styleZ2SpeechAndVerbosityManager.get_capitalization_style        ++-99:OPPr(   c               rZ   r   r   r0   r1   r)   r2   rH     s      c d r(   c                    \         VP                  4       ,          pRT R2p\        P                  ! \        P                  TR4       \        P                  ! 4       P                  RTP                  4       T P                  4        R#   \         d0    RT 2p\        P                  ! \        P
                  TR4        R# i ; i)zSets the capitalization style.z<SPEECH AND VERBOSITY MANAGER: Invalid capitalization style: TFz>SPEECH AND VERBOSITY MANAGER: Setting capitalization style to r   r   )r   upperKeyErrorr   rP   r   rQ   r   r   r   r   update_capitalization_styler9   r   stylerR   r   r)   set_capitalization_styleZ2SpeechAndVerbosityManager.set_capitalization_style  s    	'6E OugUVWE,,c48$$&223H%++V((*  	PQVPWXC 3 3S$?	   B
 
6CCc               r   r   r   r0   r1   r)   r2   rH     s2      % - 	
 
r(   c                s   RVRVRV.p\         P                  ! \         P                  VR4       \        P                  ! 4       pVP                  R4      pV\        P                  8X  d2   \        P                  p\        P                  p\        P                  p	MvV\        P                  8X  d2   \        P                  p\        P                  p\        P                  p	M0\        P                  p\        P                  p\        P                   p	VP#                  RV4       Ve   V'       d   VP%                  W4       V P'                  4        R# )z:Cycle through the speech-dispatcher capitalization styles.zASPEECH AND VERBOSITY MANAGER: cycle_capitalization_style. Script:r   r   Tr   )r   r   rQ   r   r   r   r   r#   r%   r   ZCAPITALIZATION_SPELL_FULLZCAPITALIZATION_SPELL_BRIEFr&   ZCAPITALIZATION_ICON_FULLZCAPITALIZATION_ICON_BRIEFZCAPITALIZATION_NONE_FULLZCAPITALIZATION_NONE_BRIEFr   r   r   )
r9   r   r   r   r   r   Zcurrent_styleZ	new_stylefullbrief
   &&&&      r)   rk   Z4SpeechAndVerbosityManager.cycle_capitalization_style  s    VW]E>;@5++VT:"..0++,ABH>>> ;;I55D77EhAAA ::I44D66E ::I44D66E19=+""4/((*r(   c               r+   r-   r.   rV   r   r0   r1   r)   r2   rH     s     
 
T 
r(   c                    V P                  4       pVf+   Rp\        P                  ! \        P                  VR4       R# VP	                  4        R# )z@Updates the capitalization style based on the value in settings.r   T)r   r   rP   rQ   r   r9   r   rR   rS   r)   r   Z5SpeechAndVerbosityManager.update_capitalization_style  sF     !!#>KC 0 0#t<**,r(   c               r+   r,   r   r0   r1   r)   r2   rH     s     7 7s 7r(   c                t    \         P                  ! 4       P                  R4      p\        V4      P                  # )z&Returns the current punctuation level.verbalizePunctuationStyle)r   r   r   r*   r;   r9   Z	int_valuerz   r)   get_punctuation_levelZ/SpeechAndVerbosityManager.get_punctuation_level  s/     %002>>?Z[		*666r(   c               rZ   r   r   r0   r1   r)   r2   rH     s      3 4 r(   c                r   )zSets the punctuation level.z9SPEECH AND VERBOSITY MANAGER: Invalid punctuation level: TFz;SPEECH AND VERBOSITY MANAGER: Setting punctuation level to r   r  )r*   r   r   r   rP   r   rQ   r   r   r   r   update_punctuation_levelr   r   r)   set_punctuation_levelZ/SpeechAndVerbosityManager.set_punctuation_level  s    	$U[[]3E LE7RSTE,,c48$$&223NPUP[P[\%%'  	MeWUC 3 3S$?	r   c               r   r   r   r0   r1   r)   r2   rH     s2     # #%# -# 	#
 
#r(   c                s0   RVRVRV.p\         P                  ! \         P                  VR4       \        P                  ! 4       pVP                  R4      pV\        P                  8X  d2   \        P                  p\        P                  p\        P                  p	MV\        P                  8X  d2   \        P                  p\        P                  p\        P                  p	MvV\        P                  8X  d2   \        P                  p\        P                   p\        P"                  p	M0\        P                  p\        P$                  p\        P&                  p	VP)                  RV4       Ve   V'       d   VP+                  W4       V P-                  4        R# )z-Cycles through punctuation levels for speech.z>SPEECH AND VERBOSITY MANAGER: cycle_punctuation_level. Script:r   r   Tr  )r   r   rQ   r   r   r   r   r=   r>   r   ZPUNCTUATION_SOME_FULLZPUNCTUATION_SOME_BRIEFr?   ZPUNCTUATION_MOST_FULLZPUNCTUATION_MOST_BRIEFr@   ZPUNCTUATION_ALL_FULLZPUNCTUATION_ALL_BRIEFZPUNCTUATION_NONE_FULLZPUNCTUATION_NONE_BRIEFr   r   r  )
r9   r   r   r   r   r   Zcurrent_levelZ	new_levelr   r   r   r)   rl   Z1SpeechAndVerbosityManager.cycle_punctuation_level  s7    STZE>;@5++VT:"..0++,GHH;;; 77I11D33Eh=== 77I11D33Eh=== 66I00D22E 77I11D33E7C+""4/%%'r(   c               r+   r   r   r0   r1   r)   r2   rH     s     
 
$ 
r(   c                r   )z=Updates the punctuation level based on the value in settings.r   T)r   r   rP   rQ   r  r   rS   r)   r  Z2SpeechAndVerbosityManager.update_punctuation_level  sF     !!#>KC 0 0#t<'')r(   c               rZ   )r-   r   z
str | Noner.   rG   r   r0   r1   r)   r2   rH     s     0 0J 0 0r(   c                s   V P                  4       pVf+   Rp\        P                  ! \        P                  VR4       R# VP	                  4       p\
        P                  ;'       g    RR.pV'       g   \        V4      ^8X  d
   V^,          pV'       dK   W8w  dC   RV RV R2p\        P                  ! \        P                  VR4       VP                  V4       R# R# R# )zCUpdates the synthesizer to the specified id or value from settings.Nr   TrI   z8SPEECH AND VERBOSITY MANAGER: Updating synthesizer from z to r   )	r   r   rP   rQ   r|   r   ZspeechServerInfor   r   )r9   r   r   rR   Z	active_idZinfor   r)   update_synthesizerZ,SpeechAndVerbosityManager.update_synthesizer  s     !!#>KC 0 0#t<,,.	((44RHSY!^QI/J9+ V[#   0 0#t<$$Y/ 09r(   c               r   r   r   r0   r1   r)   r2   rH   3  s2     ( (%( -( 	(
 
(r(   c                s   RVRVRV.p\         P                  ! \         P                  VR4       V P                  4       pVf+   Rp\         P                  ! \         P                  VR4       R# VP                  4       pV'       g+   Rp\         P                  ! \         P                  VR4       R# VP                  4       pV'       g+   Rp\         P                  ! \         P                  VR4       R#  VP                  V4      ^,           p	V	\        V4      8X  d   ^ p	TP                  Yy,          4       Te    T'       d   TP                  Yy,          4       R#   \         d    ^ p	 LKi ; i)z-Cycles through available speech synthesizers.z8SPEECH AND VERBOSITY MANAGER: cycle_synthesizer. Script:r   r   Tr   z8SPEECH AND VERBOSITY MANAGER: Cannot get output modules.z?SPEECH AND VERBOSITY MANAGER: Cannot get current output module.)r   r   rQ   r   rP   Zlist_output_modulesr|   indexr   Z
ValueErrorr   r   )
r9   r   r   r   r   r   rR   r   Zcurrentr  r   r)   rm   Z+SpeechAndVerbosityManager.cycle_synthesizer2  s6    MfE>;@5++VT:!!#>KC 0 0#t<..0	LC 0 0#t<**,SC 0 0#t<	OOG,q0EI& 	  !12+""9#34  	E	s   2*E E('E(c               r+   r   r   r0   r1   r)   r2   rH   ^  s     V V Vr(   c                r   )z3Returns whether the misspelled indicator is spoken.speakMisspelledIndicatorr   r8   r:   r)   get_speak_misspelled_indicatorZ8SpeechAndVerbosityManager.get_speak_misspelled_indicator]        ++-99:TUUr(   c                    V ^8  d   QhRRRR/# r-   r   rV   r.   r   r0   r1   r)   r2   rH   d  s      D T r(   c                    RV R2p\         P                  ! \         P                  VR4       \        P                  ! 4       P                  RV4       R# )z0Sets whether the misspelled indicator is spoken.zDSPEECH AND VERBOSITY MANAGER: Setting speak misspelled indicator to r   Tr  r   rP   rQ   r   r   r   r9   r   rR   r\   r)   set_speak_misspelled_indicatorZ8SpeechAndVerbosityManager.set_speak_misspelled_indicatorc  sK     UUZT[[\]E,,c48$$&223MuUr(   c               r+   r   r   r0   r1   r)   r2   rH   m  s     N Nt Nr(   c                r   )z/Returns whether object descriptions are spoken.speakDescriptionr   r8   r:   r)   get_speak_descriptionZ/SpeechAndVerbosityManager.get_speak_descriptionl        ++-99:LMMr(   c               r  r  r   r0   r1   r)   r2   rH   s        4 D r(   c                r  )z,Sets whether object descriptions are spoken.z;SPEECH AND VERBOSITY MANAGER: Setting speak description to r   Tr  r  r  r\   r)   set_speak_descriptionZ/SpeechAndVerbosityManager.set_speak_descriptionr  sI     LE7RSTE,,c48$$&223EuMr(   c               r+   r   r   r0   r1   r)   r2   rH   |       T T4 Tr(   c                r   )z@Returns whether the position and set size of objects are spoken.enablePositionSpeakingr   r8   r:   r)   get_speak_position_in_setZ3SpeechAndVerbosityManager.get_speak_position_in_set{        ++-99:RSSr(   c               r  r  r   r0   r1   r)   r2   rH           t  r(   c                r  )z=Sets whether the position and set size of objects are spoken.z?SPEECH AND VERBOSITY MANAGER: Setting speak position in set to r   Tr  r  r  r\   r)   set_speak_position_in_setZ3SpeechAndVerbosityManager.set_speak_position_in_set  sJ     PPUwVWXE,,c48$$&223KUSr(   c               r+   r   r   r0   r1   r)   r2   rH     r  r(   c                r   )z,Returns whether widget mnemonics are spoken.enableMnemonicSpeakingr   r8   r:   r)   get_speak_widget_mnemonicZ3SpeechAndVerbosityManager.get_speak_widget_mnemonic  r  r(   c               r  r  r   r0   r1   r)   r2   rH     r  r(   c                r  )z)Sets whether widget mnemonics are spoken.z@SPEECH AND VERBOSITY MANAGER: Setting speak widget mnemonics to r   Tr  r  r  r\   r)   set_speak_widget_mnemonicZ3SpeechAndVerbosityManager.set_speak_widget_mnemonic  sK     QQVPWWXYE,,c48$$&223KUSr(   c               r+   r   r   r0   r1   r)   r2   rH     s     T TT Tr(   c                r   )z-Returns whether tutorial messages are spoken.enableTutorialMessagesr   r8   r:   r)   get_speak_tutorial_messagesZ5SpeechAndVerbosityManager.get_speak_tutorial_messages  r  r(   c               r  r  r   r0   r1   r)   r2   rH            $ r(   c                r  )z*Sets whether tutorial messages are spoken.zASPEECH AND VERBOSITY MANAGER: Setting speak tutorial messages to r   Tr  r  r  r\   r)   set_speak_tutorial_messagesZ5SpeechAndVerbosityManager.set_speak_tutorial_messages  sK     RRWQXXYZE,,c48$$&223KUSr(   c               r+   r   r   r0   r1   r)   r2   rH     s     O Od Or(   c                r   )zSReturns whether pauses are inserted between utterances, e.g. between name and role.enablePauseBreaksr   r8   r:   r)   $get_insert_pauses_between_utterancesZ>SpeechAndVerbosityManager.get_insert_pauses_between_utterances        ++-99:MNNr(   c               r  r  r   r0   r1   r)   r2   rH     s      $ 4 r(   c                r  )zPSets whether pauses are inserted between utterances, e.g. between name and role.z7SPEECH AND VERBOSITY MANAGER: Setting insert pauses to r   Tr#  r  r  r\   r)   $set_insert_pauses_between_utterancesZ>SpeechAndVerbosityManager.set_insert_pauses_between_utterances  sH     HwaPE,,c48$$&223FNr(   c               r+   r   r   r0   r1   r)   r2   rH     s     R Rc Rr(   c                r   )zPReturns the count at which repeated, non-alphanumeric symbols will be described.repeatCharacterLimitr   r8   r:   r)   get_repeated_character_limitZ6SpeechAndVerbosityManager.get_repeated_character_limit        ++-99:PQQr(   c               rZ   r   r   r0   r1   r)   r2   rH     s      # $ r(   c                r  )zMSets the count at which repeated, non-alphanumeric symbols will be described.zBSPEECH AND VERBOSITY MANAGER: Setting repeated character limit to r   Tr'  r  r  r\   r)   set_repeated_character_limitZ6SpeechAndVerbosityManager.set_repeated_character_limit  sK     SSXRYYZ[E,,c48$$&223I5Qr(   c               r+   r   r   r0   r1   r)   r2   rH     s     X X$ Xr(   c                r   )zFReturns whether the user's pronunciation dictionary should be applied.usePronunciationDictionaryr   r8   r:   r)    get_use_pronunciation_dictionaryZ:SpeechAndVerbosityManager.get_use_pronunciation_dictionary        ++-99:VWWr(   c               r  r  r   r0   r1   r)   r2   rH     s      d t r(   c                r  )zCSets whether the user's pronunciation dictionary should be applied.zFSPEECH AND VERBOSITY MANAGER: Setting use pronunciation dictionary to r   Tr+  r  r  r\   r)    set_use_pronunciation_dictionaryZ:SpeechAndVerbosityManager.set_use_pronunciation_dictionary  sL     WW\V]]^_E,,c48$$&223OQVWr(   c               r+   r   r   r0   r1   r)   r2   rH     s     M Mt Mr(   c                r   )z+Returns whether blank lines will be spoken.speakBlankLinesr   r8   r:   r)   get_speak_blank_linesZ/SpeechAndVerbosityManager.get_speak_blank_lines  s      ++-99:KLLr(   c               r  r  r   r0   r1   r)   r2   rH     r  r(   c                r  )z(Sets whether blank lines will be spoken.z;SPEECH AND VERBOSITY MANAGER: Setting speak blank lines to r   Tr/  r  r  r\   r)   set_speak_blank_linesZ/SpeechAndVerbosityManager.set_speak_blank_lines  sI     LE7RSTE,,c48$$&223DeLr(   c               r+   r   r   r0   r1   r)   r2   rH     s     S SD Sr(   c                r   )zFReturns whether Up/Down in GUI tables speaks the row or just the cell.readFullRowInGUITabler   r8   r:   r)   get_speak_row_in_gui_tableZ4SpeechAndVerbosityManager.get_speak_row_in_gui_table  s      ++-99:QRRr(   c               r  r  r   r0   r1   r)   r2   rH     s        r(   c                r  )zCSets whether Up/Down in GUI tables speaks the row or just the cell.z@SPEECH AND VERBOSITY MANAGER: Setting speak row in GUI table to r   Tr2  r  r  r\   r)   set_speak_row_in_gui_tableZ4SpeechAndVerbosityManager.set_speak_row_in_gui_table  sK     QQVPWWXYE,,c48$$&223JERr(   c               r+   r   r   r0   r1   r)   r2   rH     s     X X Xr(   c                r   )zPReturns whether Up/Down in text-document tables speaks the row or just the cell.readFullRowInDocumentTabler   r8   r:   r)   get_speak_row_in_document_tableZ9SpeechAndVerbosityManager.get_speak_row_in_document_table  r-  r(   c               r  r  r   r0   r1   r)   r2   rH     s      T d r(   c                r  )zMSets whether Up/Down in text-document tables speaks the row or just the cell.zESPEECH AND VERBOSITY MANAGER: Setting speak row in document table to r   Tr5  r  r  r\   r)   set_speak_row_in_document_tableZ9SpeechAndVerbosityManager.set_speak_row_in_document_table  sL     VV[U\\]^E,,c48$$&223OQVWr(   c               r+   r   r   r0   r1   r)   r2   rH     s     V Vd Vr(   c                r   )zHReturns whether Up/Down in spreadsheets speaks the row or just the cell.readFullRowInSpreadSheetr   r8   r:   r)   get_speak_row_in_spreadsheetZ6SpeechAndVerbosityManager.get_speak_row_in_spreadsheet  r
  r(   c               r  r  r   r0   r1   r)   r2   rH   	  s      $ 4 r(   c                r  )zESets whether Up/Down in spreadsheets speaks the row or just the cell.zBSPEECH AND VERBOSITY MANAGER: Setting speak row in spreadsheet to r   Tr8  r  r  r\   r)   set_speak_row_in_spreadsheetZ6SpeechAndVerbosityManager.set_speak_row_in_spreadsheet  sK     SSXRYYZ[E,,c48$$&223MuUr(   c               r+   r   r   r0   r1   r)   r2   rH     s     K K Kr(   c                r   )z=Returns whether cell spans are announced when greater than 1.speakCellSpanr   r8   r:   r)   get_announce_cell_spanZ0SpeechAndVerbosityManager.get_announce_cell_span        ++-99/JJr(   c               r  r  r   r0   r1   r)   r2   rH     s      D T r(   c                r  )z:Sets whether cell spans are announced when greater than 1.z=SPEECH AND VERBOSITY MANAGER: Setting announce cell spans to r   Tr;  r  r  r\   r)   set_announce_cell_spanZ0SpeechAndVerbosityManager.set_announce_cell_span  sH     NeWTUVE,,c48$$&22?EJr(   c               r+   r   r   r0   r1   r)   r2   rH   !  s     R Rt Rr(   c                r   )zAReturns whether (non-spreadsheet) cell coordinates are announced.speakCellCoordinatesr   r8   r:   r)   get_announce_cell_coordinatesZ7SpeechAndVerbosityManager.get_announce_cell_coordinates   r)  r(   c               r  r  r   r0   r1   r)   r2   rH   '        4 D r(   c                r  )z>Sets whether (non-spreadsheet) cell coordinates are announced.zCSPEECH AND VERBOSITY MANAGER: Setting announce cell coordinates to r   Tr?  r  r  r\   r)   set_announce_cell_coordinatesZ7SpeechAndVerbosityManager.set_announce_cell_coordinates&  sK     TTYSZZ[\E,,c48$$&223I5Qr(   c               r+   r   r   r0   r1   r)   r2   rH   0  s     Y Y4 Yr(   c                r   )z;Returns whether spreadsheet cell coordinates are announced.speakSpreadsheetCoordinatesr   r8   r:   r)   )get_announce_spreadsheet_cell_coordinatesZCSpeechAndVerbosityManager.get_announce_spreadsheet_cell_coordinates/        ++-99:WXXr(   c               r  r  r   r0   r1   r)   r2   rH   6  s     	 	t 	 	r(   c                r  )z8Sets whether spreadsheet cell coordinates are announced.zOSPEECH AND VERBOSITY MANAGER: Setting announce spreadsheet cell coordinates to r   TrC  r  r  r\   r)   )set_announce_spreadsheet_cell_coordinatesZCSpeechAndVerbosityManager.set_announce_spreadsheet_cell_coordinates5  sQ    
 ^gQ 	 	E,,c48$$&223PRWXr(   c               r+   r   r   r0   r1   r)   r2   rH   B  s     a a4 ar(   c                r   )zGReturns whether the selected range in spreadsheets is always announced.#alwaysSpeakSelectedSpreadsheetRanger   r8   r:   r)   1get_always_announce_selected_range_in_spreadsheetZKSpeechAndVerbosityManager.get_always_announce_selected_range_in_spreadsheetA  s      ++-99:_``r(   c               r  r  r   r0   r1   r)   r2   rH   H  s     	 	t 	PT 	r(   c                r  )zDSets whether the selected range in spreadsheets is always announced.zTSPEECH AND VERBOSITY MANAGER: Setting always announce selected spreadsheet range to r   TrG  r  r  r\   r)   1set_always_announce_selected_range_in_spreadsheetZKSpeechAndVerbosityManager.set_always_announce_selected_range_in_spreadsheetG  sQ    
 cgQ 	 	E,,c48$$&223XZ_`r(   c               r+   r   r   r0   r1   r)   r2   rH   T  s     N N4 Nr(   c                r   )z+Returns whether cell headers are announced.speakCellHeadersr   r8   r:   r)   get_announce_cell_headersZ3SpeechAndVerbosityManager.get_announce_cell_headersS  r  r(   c               r  r  r   r0   r1   r)   r2   rH   Z  r  r(   c                r  )z(Sets whether cell headers are announced.z?SPEECH AND VERBOSITY MANAGER: Setting announce cell headers to r   TrJ  r  r  r\   r)   set_announce_cell_headersZ3SpeechAndVerbosityManager.set_announce_cell_headersY  sJ     PPUwVWXE,,c48$$&223EuMr(   c               r+   r   r   r0   r1   r)   r2   rH   c  s     T T Tr(   c                r   )z7Returns whether blockquotes are announced when entered.speakContextBlockquoter   r8   r:   r)   get_announce_blockquoteZ1SpeechAndVerbosityManager.get_announce_blockquoteb  r  r(   c               r  r  r   r0   r1   r)   r2   rH   i  s      T d r(   c                r  )z4Sets whether blockquotes are announced when entered.z>SPEECH AND VERBOSITY MANAGER: Setting announce blockquotes to r   TrM  r  r  r\   r)   set_announce_blockquoteZ1SpeechAndVerbosityManager.set_announce_blockquoteh  sI     OugUVWE,,c48$$&223KUSr(   c               r+   r   r   r0   r1   r)   r2   rH   r  s     Y Y4 Yr(   c                r   )z>Returns whether non-landmark forms are announced when entered.speakContextNonLandmarkFormr   r8   r:   r)   get_announce_formZ+SpeechAndVerbosityManager.get_announce_formq  rE  r(   c               r  r  r   r0   r1   r)   r2   rH   x        t  r(   c                r  )z;Sets whether non-landmark forms are announced when entered.z8SPEECH AND VERBOSITY MANAGER: Setting announce forms to r   TrP  r  r  r\   r)   set_announce_formZ+SpeechAndVerbosityManager.set_announce_formw  sI     IqQE,,c48$$&223PRWXr(   c               r+   r   r   r0   r1   r)   r2   rH     s     O Ot Or(   c                r   )z5Returns whether groupings are announced when entered.speakContextPanelr   r8   r:   r)   get_announce_groupingZ/SpeechAndVerbosityManager.get_announce_grouping  r%  r(   c               r  r  r   r0   r1   r)   r2   rH     r  r(   c                r  )z2Sets whether groupings are announced when entered.z<SPEECH AND VERBOSITY MANAGER: Setting announce groupings to r   TrT  r  r  r\   r)   set_announce_groupingZ/SpeechAndVerbosityManager.set_announce_grouping  sI     MUGSTUE,,c48$$&223FNr(   c               r+   r   r   r0   r1   r)   r2   rH     s     R Rt Rr(   c                r   )z5Returns whether landmarks are announced when entered.speakContextLandmarkr   r8   r:   r)   get_announce_landmarkZ/SpeechAndVerbosityManager.get_announce_landmark  r)  r(   c               r  r  r   r0   r1   r)   r2   rH     r  r(   c                r  )z2Sets whether landmarks are announced when entered.z<SPEECH AND VERBOSITY MANAGER: Setting announce landmarks to r   TrW  r  r  r\   r)   set_announce_landmarkZ/SpeechAndVerbosityManager.set_announce_landmark  sI     MUGSTUE,,c48$$&223I5Qr(   c               r+   r   r   r0   r1   r)   r2   rH     s     N N4 Nr(   c                r   )z1Returns whether lists are announced when entered.speakContextListr   r8   r:   r)   get_announce_listZ+SpeechAndVerbosityManager.get_announce_list  r  r(   c               r  r  r   r0   r1   r)   r2   rH     rR  r(   c                r  )z.Sets whether lists are announced when entered.z8SPEECH AND VERBOSITY MANAGER: Setting announce lists to r   TrZ  r  r  r\   r)   set_announce_listZ+SpeechAndVerbosityManager.set_announce_list  sH     IqQE,,c48$$&223EuMr(   c               r+   r   r   r0   r1   r)   r2   rH     s     O OD Or(   c                r   )z2Returns whether tables are announced when entered.speakContextTabler   r8   r:   r)   get_announce_tableZ,SpeechAndVerbosityManager.get_announce_table  r%  r(   c               r  r  r   r0   r1   r)   r2   rH     s        r(   c                r  )z/Sets whether tables are announced when entered.z9SPEECH AND VERBOSITY MANAGER: Setting announce tables to r   Tr]  r  r  r\   r)   set_announce_tableZ,SpeechAndVerbosityManager.set_announce_table  sI     J%PQRE,,c48$$&223FNr(   c               r+   r   r   r0   r1   r)   r2   rH          K KT Kr(   c                r   )z>Returns whether colors are announced by name or as RGB values.useColorNamesr   r8   r:   r)   get_use_color_namesZ-SpeechAndVerbosityManager.get_use_color_names  r=  r(   c               r  r  r   r0   r1   r)   r2   rH            $ r(   c                r  )z;Sets whether colors are announced by name or as RGB values.z9SPEECH AND VERBOSITY MANAGER: Setting use color names to r   Tra  r  r  r\   r)   set_use_color_namesZ-SpeechAndVerbosityManager.set_use_color_names  sH     J%PQRE,,c48$$&22?EJr(   c               r+   r   r   r0   r1   r)   r2   rH     s     R RT Rr(   c                r   )z-Returns whether numbers are spoken as digits.speakNumbersAsDigitsr   r8   r:   r)   get_speak_numbers_as_digitsZ5SpeechAndVerbosityManager.get_speak_numbers_as_digits  r)  r(   c               r  r  r   r0   r1   r)   r2   rH     r!  r(   c                r  )z*Sets whether numbers are spoken as digits.zASPEECH AND VERBOSITY MANAGER: Setting speak numbers as digits to r   Tre  r  r  r\   r)   set_speak_numbers_as_digitsZ5SpeechAndVerbosityManager.set_speak_numbers_as_digits  sK     RRWQXXYZE,,c48$$&223I5Qr(   c               r   r   r   r0   r1   r)   r2   rH     s2      % - 	
 
r(   c                sz   RVRVRV.p\         P                  ! \         P                  VR4       V P                  4       pV'       d"   \        P
                  p\        P                  pM \        P                  p\        P                  pV P                  V'       * 4       Ve   V'       d   VP                  Wv4       R# )z5Changes spoken number style between digits and words.z:SPEECH AND VERBOSITY MANAGER: change_number_style. Script:r   r   T)r   r   rQ   rf  r   ZNUMBER_STYLE_WORDS_BRIEFZNUMBER_STYLE_WORDS_FULLZNUMBER_STYLE_DIGITS_BRIEFZNUMBER_STYLE_DIGITS_FULLrg  r   )r9   r   r   r   r   Zspeak_digitsr   r      &&&&    r)   rn   Z-SpeechAndVerbosityManager.change_number_style  s     OPVE>;@5++VT:77955E33D66E44D((\)9:+""4/r(   c               r+   r   r   r0   r1   r)   r2   rH     s     O OT Or(   c                s\    V P                  4       ;'       d    V P                  4       '       * # )z0Returns whether speech is enabled and not muted.)get_speech_is_enabledget_speech_is_mutedr8   r:   r)   #get_speech_is_enabled_and_not_mutedZ=SpeechAndVerbosityManager.get_speech_is_enabled_and_not_muted  s'     ))+NND4L4L4N0NNr(   c               r+   r   r   r0   r1   r)   r2   rH     r`  r(   c                r   )z3Returns whether speech output is temporarily muted.silenceSpeechr   r8   r:   r)   rj  Z-SpeechAndVerbosityManager.get_speech_is_muted  r=  r(   c               r  r  r   r0   r1   r)   r2   rH      rc  r(   c                r  )z0Sets whether speech output is temporarily muted.z6SPEECH AND VERBOSITY MANAGER: Setting speech muted to r   Trl  r  r  r\   r)   set_speech_is_mutedZ-SpeechAndVerbosityManager.set_speech_is_muted  sG     GugQOE,,c48$$&22?EJr(   c               r+   r   r   r0   r1   r)   r2   rH   	  s     J Jt Jr(   c                r   )zKReturns whether the speech server is enabled. See also the is-muted getter.r   r   r8   r:   r)   ri  Z/SpeechAndVerbosityManager.get_speech_is_enabled  s      ++-99.IIr(   c               r  r  r   r0   r1   r)   r2   rH     r  r(   c                r  )zHSets whether the speech server is enabled. See also the is-muted setter.z8SPEECH AND VERBOSITY MANAGER: Setting speech enabled to r   Tr   r  r  r\   r)   set_speech_is_enabledZ/SpeechAndVerbosityManager.set_speech_is_enabled  sG     IqQE,,c48$$&22>5Ir(   c               r+   r   r   r0   r1   r)   r2   rH     s     T Tt Tr(   c                r   )z5Returns whether only displayed text should be spoken.onlySpeakDisplayedTextr   r8   r:   r)   get_only_speak_displayed_textZ7SpeechAndVerbosityManager.get_only_speak_displayed_text  r  r(   c               r  r  r   r0   r1   r)   r2   rH     rA  r(   c                r  )z2Sets whether only displayed text should be spoken.zCSPEECH AND VERBOSITY MANAGER: Setting only speak displayed text to r   Tro  r  r  r\   r)   set_only_speak_displayed_textZ7SpeechAndVerbosityManager.set_only_speak_displayed_text  sK     TTYSZZ[\E,,c48$$&223KUSr(   c               r   r   r   r0   r1   r)   r2   rH   '  s2      % - 	
 
r(   c                s   RVRVRV.p\         P                  ! \         P                  VR4       Ve   VP                  4        V P	                  4       '       d?   V P                  R4       Ve(   V'       d    VP                  \        P                  4       R# \        P                  ! 4       P                  R4      '       gh   \        P                  ! 4       P                  RR4       \        P                  ! 4        Ve(   V'       d    VP                  \        P                  4       R# Ve(   V'       d    VP                  \        P                  4       V P                  R4       R# )zToggles speech on and off.z4SPEECH AND VERBOSITY MANAGER: toggle_speech. Script:r   r   TFr   )r   r   rQ   Zinterrupt_presentationrj  rm  r   r   ZSPEECH_ENABLEDr   r   r   r   r   r   ZSPEECH_DISABLEDr   r   r)   ro   Z'SpeechAndVerbosityManager.toggle_speech&  s    I&E>;@5++VT:))+##%%$$U+!k&&x'>'>?  "--/;;NKK((*66~tLKKM!k&&x'>'>?
  !k&&x'?'?@$$T*r(   c               r+   r   r   r0   r1   r)   r2   rH   E  s     Q Q4 Qr(   c                r   )z?Returns whether informative messages will be detailed or brief.messagesAreDetailedr   r8   r:   r)   get_messages_are_detailedZ3SpeechAndVerbosityManager.get_messages_are_detailedD  r   r(   c               r  r  r   r0   r1   r)   r2   rH   K  r  r(   c                r  )z<Sets whether informative messages will be detailed or brief.z?SPEECH AND VERBOSITY MANAGER: Setting messages are detailed to r   Trr  r  r  r\   r)   set_messages_are_detailedZ3SpeechAndVerbosityManager.set_messages_are_detailedJ  sJ     PPUwVWXE,,c48$$&223H%Pr(   c               r+   r   r   r0   r1   r)   r2   rH   S  s     9 9D 9r(   c                sp    \         P                  ! 4       P                  R4      pV\        P                  8H  # )z=Returns whether the speech verbosity level is set to verbose.speechVerbosityLevel)r   r   r   r   rD   )r9   levelrz   r)   use_verbose_speechZ,SpeechAndVerbosityManager.use_verbose_speechS  s/     !,,.::;QR8888r(   c               r+   r,   r   r0   r1   r)   r2   rH   Z  s     5 5S 5r(   c                r   )zCReturns the current speech verbosity level for object presentation.ru  )r   r   r   rB   r;   r  rz   r)   get_verbosity_levelZ-SpeechAndVerbosityManager.get_verbosity_levelY  s/     %002>>?UV	i(444r(   c               rZ   r   r   r0   r1   r)   r2   rH   a  s        r(   c                sn    \         VP                  4       ,          pRT R2p\        P                  ! \        P                  TR4       \        P                  ! 4       P                  RTP                  4       R#   \         d0    RT 2p\        P                  ! \        P
                  TR4        R# i ; i)z8Sets the speech verbosity level for object presentation.z7SPEECH AND VERBOSITY MANAGER: Invalid verbosity level: TFz9SPEECH AND VERBOSITY MANAGER: Setting verbosity level to r   ru  )rB   r   r   r   rP   r   rQ   r   r   r   r   )r9   r   rv  rR   r   r)   set_verbosity_levelZ-SpeechAndVerbosityManager.set_verbosity_level`  s    	"5;;=1E J%PQRE,,c48$$&223I5;;W  	KE7SC 3 3S$?	s   A: :6B43B4c               r   r   r   r0   r1   r)   r2   rH   q  r   r(   c                s   RVRVRV.p\         P                  ! \         P                  VR4       \        P                  ! 4       pVP                  R4      pV\        P                  8X  dN   Ve(   V'       d    VP                  \        P                  4       VP                  R\        P                  4       R# Ve(   V'       d    VP                  \        P                  4       VP                  R\        P                  4       R# )z9Toggles speech verbosity level between verbose and brief.z7SPEECH AND VERBOSITY MANAGER: toggle_verbosity. Script:r   r   Tru  )r   r   rQ   r   r   r   r   rC   r   r   ZSPEECH_VERBOSITY_VERBOSEr   rD   ZSPEECH_VERBOSITY_BRIEF)r9   r   r   r   r   r   r   r   r)   rp   Z*SpeechAndVerbosityManager.toggle_verbosityp  s     LVE>;@5++VT:"..0##$:;H222!k&&x'H'HI 68X8XY
  !k&&x'F'FG 68V8VWr(   c               r+   r   r   r0   r1   r)   r2   rH     s     U U Ur(   c                r   )zEReturns whether speaking of indentation and justification is enabled.enableSpeechIndentationr   r8   r:   r)   'get_speak_indentation_and_justificationZASpeechAndVerbosityManager.get_speak_indentation_and_justification  s      ++-99:STTr(   c               r  r  r   r0   r1   r)   r2   rH     s      T d r(   c                r  )zBSets whether speaking of indentation and justification is enabled.zMSPEECH AND VERBOSITY MANAGER: Setting speak indentation and justification to r   Trz  r  r  r\   r)   'set_speak_indentation_and_justificationZASpeechAndVerbosityManager.set_speak_indentation_and_justification  sP    
 \\a[bbcd 	 	E,,c48$$&223LeTr(   c               r+   r   r   r0   r1   r)   r2   rH     s     [ [t [r(   c                r   )zEReturns whether indentation will be announced only if it has changed.speakIndentationOnlyIfChangedr   r8   r:   r)   %get_speak_indentation_only_if_changedZ?SpeechAndVerbosityManager.get_speak_indentation_only_if_changed  s      ++-99:YZZr(   c               r  r  r   r0   r1   r)   r2   rH     s      4 D r(   c                r  )zBSets whether indentation will be announced only if it has changed.zKSPEECH AND VERBOSITY MANAGER: Setting speak indentation only if changed to r   Tr}  r  r  r\   r)   %set_speak_indentation_only_if_changedZ?SpeechAndVerbosityManager.set_speak_indentation_only_if_changed  sL     \\a[bbcdE,,c48$$&223RTYZr(   c               r   r   r   r0   r1   r)   r2   rH     r   r(   c                s   RRVRVRV.p\         P                  ! \         P                  VR4       V P                  4       pV P	                  V'       * 4       V P                  4       '       d"   \
        P                  p\
        P                  pM \
        P                  p\
        P                  pVe   V'       d   VP                  Wg4       R# )z6Toggles the speaking of indentation and justification.zDSPEECH AND VERBOSITY MANAGER: toggle_indentation_and_justification. r   r   r   T)r   r   rQ   r{  r|  r   Z!INDENTATION_JUSTIFICATION_ON_FULLZ"INDENTATION_JUSTIFICATION_ON_BRIEFZ"INDENTATION_JUSTIFICATION_OFF_FULLZ#INDENTATION_JUSTIFICATION_OFF_BRIEFr   )r9   r   r   r   r   r   r   r   rh  r)   rq   Z>SpeechAndVerbosityManager.toggle_indentation_and_justification  s     YVXunkS5++VT:<<>44Y?7799==D??E>>D@@E+""4/r(   c               r   r   r   r0   r1   r)   r2   rH     s2     ) )%) -) 	)
 
)r(   c                s   RVRVRV.p\         P                  ! \         P                  VR4       Vf+   Rp\         P                  ! \         P                  VR4       R# \        P
                  ! \        P                  ! 4       P                  4       4      pVf*   V'       d"   VP                  \        P                  4       R# VP                  P                  V4      '       g   RpM&VP                  P                  V4      '       d   RpMRp\        P                  ! 4       pVP!                  V4      p	VP#                  Wy'       * 4       V	'       g   \        P$                  pM\        P&                  pV'       d   VP                  V4       R# )	z)Toggles between speak cell and speak row.zESPEECH AND VERBOSITY MANAGER: toggle_table_cell_reading_mode. Script:r   r   TzOSPEECH AND VERBOSITY MANAGER: Toggling table cell reading mode requires script.r2  r8  r5  )r   r   rQ   rP   r   Z	get_tabler   r   Zget_locus_of_focusr   r   ZTABLE_NOT_IN_AZ	utilitiesZget_document_for_objectZis_spreadsheet_tabler   r   r   ZTABLE_MODE_ROWZTABLE_MODE_CELL)
r9   r   r   r   r   rR   ZtableZsetting_namer   Z	speak_rowr   r)   rr   Z8SpeechAndVerbosityManager.toggle_table_cell_reading_mode  s3    Z[aE>;@5++VT: >cC 0 0#t<!!-";";"="P"P"RS=[""8#:#:;77>>2L225995L7L"..0''5	L-8))C**C""3'r(   c               $    V ^8  d   QhRRRRRR/# r-   objAtspi.Accessibletextr/   r.   r   r0   r1   r)   r2   rH     s"     5 5/ 5s 5s 5r(   c                s    R p\         P                  '       g   \        P                  ! V 4      '       g   V# RP	                  \        W!P                  4       4      4      # )z*Adjusts text to present numbers as digits.c                sf    V P                  4       '       d   R P                  \        V 4      4      p V # ) )Z	isnumericjoinr   )Zwordr:   r)   _convertZ=SpeechAndVerbosityManager.adjust_for_digits.<locals>._convert  s&    ~~xxT
+Kr(   r  )r   re  r   Zis_text_input_telephoner  mapsplit)r  r  r  r\   r)   adjust_for_digitsZ+SpeechAndVerbosityManager.adjust_for_digits  sE    	
 ---1T1TUX1Y1YKxxHjjl344r(   c               (    V ^8  d   QhRRRRRRRR/# )r-   r  r  liner/   start_offsetr   r.   r   r0   r1   r)   r2   rH     s*      / s # RU r(   c                s&   RV9   d   V# V\        V4      ,           p\        P                  ! WV4      pV Uu. uF  p\        P                  ! V4      NK  	  pp\	        V Uu. uF  qwV,
          NK  	  upRR7      p\        V4      pV Fl  p	^ T	u;8:  d   \        V4      8:  g   K  M K!  R\        P                   2p
V	\        V4      8  d&   W,          P                  4       '       d
   V
R,          p
WW% Kn  	  RP                  V4      # u upi u upi )zAAdjust line to include the word "link" after any hypertext links.u   ￼T)Zreverser  rI   )
r   r   Zget_all_links_in_rangeZget_link_end_offsetr   r   r   ZLINKisalnumr  )r  r  r  Z
end_offsetZlinksZlinkZoffsetsoffsetr   Zor  s   &&&        r)   _adjust_for_linksZ+SpeechAndVerbosityManager._adjust_for_links  s     tK!CI-
223jQEJKUT;2248UKgFgF<//gFPTUdAA$V$$8==/*s6{?vy'8'8':':CKD"q  wwv LFs   D	!Dc               r  r-   r  r/   r.   r   r0   r1   r)   r2   rH     s     2 2# 2# 2r(   c                s  a  V 3R lp\        S 4      ^8  g   \        P                  ^8  d   S # \        P                  ! R\        \        P                  ^,
          4      ,           R,           4      p\        P                  ! W!S 4      # )z9Adjust line to include a description of repeated symbols.c                sF  < V P                  ^4      p\        V P                  ^ 4      4      pV P                  4       ^ 8  dL   SV P                  4       ^,
          ,          P                  4       '       d   R\        P
                  ! W4       2# \        P
                  ! W4      # )i   r  )Zgroupr   r   r  r   Zrepeated_char_count)ZmatchcharZcountr  s   &  r)   replacementZBSpeechAndVerbosityManager._adjust_for_repeats.<locals>.replacement  sx    ;;q>DA'E{{}q T%++-!*;%<%D%D%F%F877DEFF//<<r(   z([^a-zA-Z0-9\s])\1{z,})r   r   r'  reZcompiler/   Zsub)r  r  Zpatterns   f  r)   _adjust_for_repeatsZ-SpeechAndVerbosityManager._adjust_for_repeats  sc    	= t9q=H99A=K**3c(:W:WZ[:[6\\_ccdvvgD11r(   c               rZ   )r-   r  r  r.   rV   r   r0   r1   r)   r2   rH   %  s      +;  r(   c                sx   \         P                  ! V \        P                  4      pVf   R# \         P                  ! V\        P                  4      p\
        P                  ! V4      '       d   R# \        P                  ! 4       P                  R4      pV\        P                  \        P                  39   d   R# R# )z1Returns True if punctuation should be verbalized.Fr  T)r   Zfind_ancestor_inclusiver   Zis_codeZis_documentr   Zis_plain_textr   r   r   r   r@   r=   )r  ZancestorZdocumentr   r   r)   _should_verbalize_punctuationZ7SpeechAndVerbosityManager._should_verbalize_punctuation$  s     33C9L9LM33Hk>U>UV##H--
 !,,.::;VWX33X5T5TUUr(   c               r  r  r   r0   r1   r)   r2   rH   :  s#      0@  PS r(   c                s    \         P                  V 4      '       g   V# Tp\        \        P                  ! RV4      4      pV F  pVP                  VRV R24      pK  	  V# )zUSurrounds punctuation symbols with spaces to increase the likelihood of presentation.z[^\w\s]r  )rE   r  r   r  Zfindallreplace)r  r  r}   punctuationZsymbols   &&   r)   "_adjust_for_verbalized_punctuationZ<SpeechAndVerbosityManager._adjust_for_verbalized_punctuation9  s]     )FFsKKK"**Z89!F^^FaxqM:F " r(   c               r  r  r   r0   r1   r)   r2   rH   H  s     I Ic Ic Ir(   c                s    \         P                  ! 4       P                  R4      '       g   V # \        P                  ! RV 4      pRP                  \        \        P                  V4      4      # )z1Applies the pronunciation dictionary to the text.r+  z(\W+)rI   )	r   r   r   r  r  r  r  r   Zget_pronunciation)r  Zwordsrz   r)   _apply_pronunciation_dictionaryZ9SpeechAndVerbosityManager._apply_pronunciation_dictionaryG  sQ      ++-99:VWWK4(wws-??GHHr(   c               s$    V ^8  d   QhRRRRRR/# )r-   r  r/   only_if_changedbool | Noner.   r   r0   r1   r)   r2   rH   Q  s(     ' '' %' 
	'r(   c                s   V P                  4       '       g   V P                  4       '       g   R# VP                  RR4      p\        P                  ! RV4      pV'       d   VRVP                  4        pRp\        P                  ! RV4       Uu. uF  qUP                  4       NK  	  pp\        P                  ! RV4       Uu. uF  qUP                  4       NK  	  pp\        Wg,           4      pV Fu  p	W9   d8   V\        P                  ! V	^,          V	^ ,          ,
          4       R2,          pK@  V\        P                  ! V	^,          V	^ ,          ,
          4       R2,          pKw  	  Vf%   \        P                  ! 4       P                  R4      pV'       dK   V P                  V8X  d   R# V'       g0   V P                  '       d   RV n        \        P                  ! ^ 4      # W@n        V# u upi u upi )	z;Returns a description of the indentation in the given line.rI       r  z[^ 	]Nz +z	+r}  )rp  r{  r  r  Zsearchr   Zfinditerspanr   r   Zspaces_countZ
tabs_countr   r   r   rN   )
r9   r  r  Zendr}   ZmZspacesZtabsZspansr  s
   &&&       r)   get_indentation_descriptionZ5SpeechAndVerbosityManager.get_indentation_descriptionQ  s    --//>>@@||Hc*ii$'%D$&KKd$;<$;q&&($;<"$++eT":;":Q":;v}%D~X2247T!W3DEFaHHX00a471BCDAFF	  ".::<HH/1O 11V;d@@@572,,Q//-3*- =;s   G)G.c               s(    V ^8  d   QhRRRRRRRR/# )	r-   r  r  r  
int | Noner  r  r.   r/   r   r0   r1   r)   r2   rH   z  s2        %	
 
r(   c                s   \         P                  ! 4       P                  R4      '       g   R# \        P                  ! W4      ^ ,          pV\
        P                  \
        P                  ,           R,           9   d   R# Rp\        P                  ! W4      '       d   \        P                  pM,\        P                  ! W4      '       d   \        P                  pV'       d   WPP                  8X  d   R# WPn        V# )z9Returns a description of the error at the current offset.r  rI   r  )r   r   r   r   Zget_character_at_offsetstringr  Z
whitespaceZstring_has_spelling_errorr   Z
MISSPELLEDZstring_has_grammar_errorr   ZSTATE_INVALID_GRAMMAR_SPEECHrO   )r9   r  r  r  r  rR   r   r)   get_error_descriptionZ/SpeechAndVerbosityManager.get_error_descriptionz  s      ++-99:TUU --c:1=6%%(9(99HDD++C88%%C,,S99#@@Cs&B&BB'*$
r(   c               r  )r-   r  r  r  r/   r  r  r.   r   r0   r1   r)   r2   rH     s2        !	
 
r(   c                s   RV R2VRV 2.p\         P                  ! \         P                  VR4       \        P                  ! V4      '       d   \
        P                  ! V4      pVe   V P                  WV4      pV P                  W4      pV P                  V4      pV P                  W4      pV P                  V4      pRV R2p\         P                  ! \         P                  VR4       V# )z%Adjusts text for spoken presentation.z)SPEECH AND VERBOSITY MANAGER: Adjusting 'z' fromzstart_offset: Tz.SPEECH AND VERBOSITY MANAGER: Adjusted text: 'Z')r   r   rQ   r   Zis_math_relatedr
   Zadjust_for_speechr  r  r  r  r  rP   )r9   r  r  r  r   rR   r   r)   adjust_for_presentationZ1SpeechAndVerbosityManager.adjust_for_presentation  s     >dV6J~685++VT:&&s++006D#))#\BD%%c0''-66sA33D9>tfAFE,,c48r(   )rM   rK   rO   rN   )FT)F)rI   NNF)NNF)NNT)rI   )N)NT)r   r   r    r!   r"   rT   rY   rJ   r[   rX   r   r   r   r   r   Zgetterr   r   Zsetterr   r   r   r   r   Zparameterized_commandr   r   r   r   r   Zcommandr   r   r   r   r   r   rs   rt   r   r   ru   rv   r   r   rw   rx   r   r   rk   r   r  r  rl   r  r  rm   r	  r  r  r  r  r  r  r  r   r"  r$  r&  r(  r*  r,  r.  r0  r1  r3  r4  r6  r7  r9  r:  r<  r>  r@  rB  rD  rF  rH  rI  rK  rL  rN  rO  rQ  rS  rU  rV  rX  rY  r[  r\  r^  r_  rb  rd  rf  rg  rn   rk  rj  rm  ri  rn  rp  rq  ro   rs  rt  rw  rx  ry  rp   r{  r|  r~  r  rq   rr   Zstaticmethodr  r  r  r  r  r  r  r  r  r'   r   r(   r)   rE   rE   m   s   S	P  L9\h9T::
0:     * *
   3 3(    $ '' (8    :&    "  $    
 
    0  0 
 
    0  0 
 
    0  0 Q Q
     B
 7 7    # #J
0 0, ( (T V V
   N N
   T T
   T T
   T T
   O O
   R R
   X X
   M M
   S S
   X X
   V V
   K K
   R R
   Y Y
 	 	 a a
 	 	 N N
   T T
   Y Y
   O O
   R R
   N N
   O O
   K K
   R R
    2O
 K K
   J J
   T T
    : Q Q
  9 5 5    0 U U
   [ [
    0 ) )V 5 5  , 2 2   (   I I' 'R : r(   rE   _managerc               r+   )r-   r.   rE   r   r0   r1   r)   r2   r2     s      . r(   c                 s    \         # )z(Returns the Speech and Verbosity Manager)r  r   r(   r)   r   r     s	     Or(   )=__conditional_annotations__r"   Z
__future__r   Z__id__Z__version__Z__date__Z__copyright__Z__license__r   r   r  r  r   Zenumr   Ztypingr   rI   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   Zacssr   Zax_documentr   Zax_hypertextr   Z	ax_objectr   Zax_tabler   Zax_textr   Zax_utilitiesr   ZgiZrequire_versionZgi.repositoryr   Zscriptsr   r   r   r*   rB   rE   r  Z__annotations__r   )r  s   @r)   <module>r     s   4 P #7   	                      # %    %w&# *.$ .!t !
!T 
!C CL: '@&A
# Ar(   