%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/orca/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/orca/__pycache__/speechdispatcherfactory.cpython-312.pyc

�

g
f�c��4�dZdZdZdZdZdZdZddlmZdd	l	Z	d
dl
mZd
dl
mZd
d
l
m
Z
d
dl
mZd
dl
mZd
dl
mZd
dl
mZd
dl
mZd
dlmZd
dlmZmZ	dd	lZdZ	eed�dZGd�dej<�Zy	#e$rdZY�wxYw#e$rdZY�,wxYw)z=Provides an Orca speech server for Speech Dispatcher backend.z$Id$z
$Revision$z$Date$z Tomas Cerha <cerha@brailcom.org>z(Copyright (c) 2006-2008 Brailcom, o.p.s.�LGPL�)�GLibN�)�debug)�	guilabels)�mathsymbols)�messages)�speechserver)�settings)�script_manager)�settings_manager)�ACSS)�SSML�SSMLCapabilitiesT�CallbackTypeFc���eZdZiZdZeejiZed��Z	ed��Z
ed��Zed0d��Z
ed��Z�fd�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd1d�Zd�Zd�Zd�Zd�Zd2d�Zd2d�Zd2d�Z d�Z!d�Z"d3d�Z#d�Z$d0d�Z%d0d�Z&d4d�Z'd4d �Z(d5d!�Z)d5d"�Z*d5d#�Z+d5d$�Z,d%�Z-d&�Z.d1d'�Z/d0d(�Z0d1d)�Z1d*�Z2d+�Z3d,�Z4d-�Z5d6d.�Z6d/�Z7�xZ8S)7�SpeechServer�defaultc�"�tjS�N)r�SPEECH_DISPATCHER���>/usr/lib/python3/dist-packages/orca/speechdispatcherfactory.py�getFactoryNamezSpeechServer.getFactoryName@s���*�*�*rc���g}tjtj�}|�J|j|�|j	�D]&}|jtj|���(|Sr)r�_getSpeechServer�DEFAULT_SERVER_ID�append�list_output_modules)�serversr�modules   r�getSpeechServerszSpeechServer.getSpeechServersDse�����/�/��0N�0N�O�����N�N�7�#�!�5�5�7�
F�����|�<�<�V�D�E�
F��rc�d�||jvr||�|jj|�S)z�Return an active server for given id.

        Attempt to create the server if it doesn't exist yet.  Returns None
        when it is not possible to create the server.
        
        )�_active_servers�get)�cls�serverIds  rrzSpeechServer._getSpeechServerNs2���3�.�.�.���M��"�"�&�&�x�0�0rc�Z�|�|dntj}tj|�S)Nr)rrr)�info�thisIds  r�getSpeechServerzSpeechServer.getSpeechServer\s)�� �,��a��,�2P�2P���,�,�V�4�4rc��tjj�D�cgc]}|��}}|D]}|j��ycc}wr)rr%�values�shutdown)�sr!�servers   r�shutdownActiveServersz"SpeechServer.shutdownActiveServersasC��*�:�:�A�A�C�D��1�D��D��	�F��O�O��	��Es�	Ac�~��tt|��||_d|_i|_tj|jftj|jftj|jftj|jff|_t s(d}t#j$t"j&|d�yt(s(d}t#j$t"j&|d�y	t*j,j.}t4j6t*j,j8t4j:|t4j<t*j,j2t4j>t*j,j@i|_!t*jDjFtHjJjLt*jDjNtHjJjPt*jDjRtHjJjTt*jDjVtHjJjLi|_,tZj\|z|_/	|ja�|tjb|<d|_3y#t0$rt*j,j2}Y���wxYw#t0$rTt#jdt"j&�d}t#j$t"j&|d�Yd|_3ywxYw)Nz)ERROR: Speech Dispatcher is not availableTz<ERROR: Speech Dispatcher version 0.6.2 or later is required.z2ERROR: Speech Dispatcher service failed to connect)4�superr�__init__�_id�_client�_current_voice_propertiesr�RATE�	_set_rate�
AVERAGE_PITCH�
_set_pitch�GAIN�_set_volume�FAMILY�_set_family�_acss_manipulators�_speechd_availabler�printMessage�
LEVEL_WARNING�_speechd_version_ok�speechd�PunctuationMode�MOST�	Exception�SOMEr�PUNCTUATION_STYLE_ALL�ALL�PUNCTUATION_STYLE_MOST�PUNCTUATION_STYLE_SOME�PUNCTUATION_STYLE_NONE�NONE�_PUNCTUATION_MODE_MAPr�BEGINr
�
SayAllContext�PROGRESS�CANCEL�INTERRUPTED�END�	COMPLETED�
INDEX_MARK�_CALLBACK_TYPE_MAPr�SPEECH_DEFAULT_VOICE�_default_voice_name�_initr%�printException�_lastKeyEchoTime)�selfr(�msg�most�	__class__s    �rr5zSpeechServer.__init__isZ���
�l�D�*�,�������)+��&�
�Y�Y����'�
�
�
����1�
�Y�Y��(�(�)�
�[�[�$�*�*�+�	#���"�=�C����u�2�2�C��>��"�P�C����u�2�2�C��>��	0��*�*�/�/�D�
�*�*�W�-D�-D�-H�-H��+�+�T��+�+�W�-D�-D�-I�-I��+�+�W�-D�-D�-I�-I�	&��"�
� � �&�&��(B�(B�(K�(K�� � �'�'��)C�)C�)O�)O�� � �$�$�l�&@�&@�&J�&J�� � �+�+�L�,F�,F�,O�,O�	#���$-�#A�#A�H�#L�� �	:��J�J�L�6:�L�(�(��2� $����5�	0��*�*�/�/�D�	0��&�	?�� � ��!4�!4�5�F�C����u�2�2�C��>�!%���	?�s%�9J5�
K�5#K�K�AL<�;L<c���tjd|j��x|_}|j	tj
j�|j|jk7r|j|j�i|_	|jtj}|j|�|jtjj �y)N�Orca)�	component)rF�
SSIPClientr6r7�set_priority�Priority�MESSAGEr�set_output_moduler8rQr�verbalizePunctuationStyle�set_punctuation�
set_data_mode�DataModer)r`�client�modes   rr]zSpeechServer._init�s��� '� 2� 2�6�T�X�X� N�N���v����G�,�,�4�4�5��8�8�t�-�-�-��$�$�T�X�X�.�)+��&��)�)�(�*L�*L�M�����t�$����W�-�-�2�2�3rc��tjtjk(rd}n&tjtjk(rd}nd}	|jj|�y#tj$rUd}tjtj|d�|j�|jj|�Yyt$rYywxYw)z;Updates the capitalization style used by the speech server.�icon�spell�none�8SPEECH DISPATCHER: Connection lost. Trying to reconnect.TN)
r�capitalizationStyle�CAPITALIZATION_STYLE_ICON�CAPITALIZATION_STYLE_SPELLr7�set_cap_let_recognrF�SSIPCommunicationErrorrrC�
LEVEL_INFO�resetrI)r`�styleras   r�updateCapitalizationStylez&SpeechServer.updateCapitalizationStyle�s����'�'�8�+M�+M�M��E�
�
)�
)�X�-P�-P�
P��E��E�	��L�L�+�+�E�2���-�-�	3�L�C����u�/�/��d�;��J�J�L��L�L�+�+�E�2��	��	�s�A(�(A%C�C�Cc�t�|jtj}|jj	|�y)z6 Punctuation level changed, inform this speechServer. N)rQrrlr7rm)r`rqs  r�updatePunctuationLevelz#SpeechServer.updatePunctuationLevel�s*���)�)�(�*L�*L�M�����$�$�T�*rc���	||i|��S#tj$rBd}tjtj|d�|j�||i|��cYSt$rYywxYw)NrvT)rFr{rrCr|r}rI)r`�command�args�kwargsras     r�
_send_commandzSpeechServer._send_command�sm��	��D�+�F�+�+���-�-�	,�L�C����u�/�/��d�;��J�J�L��D�+�F�+�+��	��	�s�
�AA)�A)�(A)c
��tdtdtd|��zdz
�}|j|jj
|�y)N�r�c�b)�int�max�minr�r7�set_rate)r`�	acss_rate�rates   rr:zSpeechServer._set_rate�s>���1�s�1�c�"�i�0�1�1�B�6�7�����4�<�<�0�0�$�7rc
��tdtdtd|��zdz
�}|j|jj
|�y)N�r�	�Z)r�r�r�r�r7�	set_pitch)r`�
acss_pitch�pitchs   rr<zSpeechServer._set_pitch�s>���B��Q��A�z� 2�3�3�b�8�9�����4�<�<�1�1�5�9rc
��tdtdtd|��zdz
�}|j|jj
|�y)N�rr��#)r�r�r�r�r7�
set_volume)r`�acss_volume�volumes   rr>zSpeechServer._set_volume�s>���R�#�a��Q��!4�5�5��:�;�����4�<�<�2�2�F�;rc�H�|�i}|jtjj�}|jtjj�}|sGddl}|j
�\}}d\}}|r)|jd�}|d}t|�dk(r|d}||fS)Nr)�r��_r�r)	r&r
�VoiceFamily�LANG�DIALECT�locale�getdefaultlocale�split�len)r`�acss_family�language�dialectr��familyLocale�encoding�localeValuess        r�_get_language_and_dialectz&SpeechServer._get_language_and_dialect�s������K��?�?�<�#;�#;�#@�#@�A���/�/�,�":�":�"B�"B�C����%+�%<�%<�%>�"�L�(� &��H�g��+�1�1�#�6��'��?���|�$��)�*�1�o�G��� � rc��|j|�\}}|rT|j|jj|�|r,|j|jj|dz|z�	|jj}|jtjj�}|�#||jk7r|j||�yyy#t$rYywxYw)N�-)r�r�r7�set_language�set_synthesis_voicer&r
r��NAMEr\�AttributeError)r`r��langr�r��names      rr@zSpeechServer._set_family�s����6�6�{�C�
��g�����t�|�|�8�8�$�?���"�"�4�<�<�#<�#<�d�S�j�7�>R�S�	>�"&�,�,�"B�"B���?�?�<�#;�#;�#@�#@�A�D���D�D�,D�,D�$D��"�"�#6��=�%E���	�	��	�s�,C�	C�Cc�p�tjtjkDry	|j|jj
�}|j|jj�}|j|jj�}|j|jj�}|jjtj�}tjdtj dtj"dtj$di}d|�d|jjtj&��d|jjtj(��d	|jjtj*��d
|j-|�d�d|jt/j0�j3d
���d|�d|�d	|�d
|��}tj4tj|d�y#t$rdx}x}x}}Y��|wxYw)Nz(exception occurred)rPrJrHrLzSPEECH DISPATCHER: z
ORCA rate z, pitch z	, volume z, language rz, punctuation: rlz	
SD rate T)r�
debugLevelr|r�r7�get_rate�	get_pitch�
get_volume�get_languagerIr8r&rr?rrOrNrMrKr9r;r=r�r
�
getManager�
getSettingrC)	r`�prefix�sd_rate�sd_pitch�	sd_volume�sd_language�family�stylesras	         r�_debug_sd_valueszSpeechServer._debug_sd_values�s������e�.�.�.��	R��(�(����)>�)>�?�G��)�)�$�,�,�*@�*@�A�H��*�*�4�<�<�+B�+B�C�I��,�,�T�\�\�-F�-F�G�K��/�/�3�3�D�K�K�@���1�1�6��1�1�6��1�1�6��0�0�%�9��"�&��*��7�7�;�;�D�I�I�F�G�H��3�3�7�7��8J�8J�K�L�M��4�4�8�8����C�D�E��6�6�v�>�q�A�B�C��z�z�*�5�5�7�B�B�C^�_�`�a�b��i�x��z��9�+�[�Q\�P]�
_�	�	���5�+�+�S�$�7��)�	R�;Q�Q�G�Q�h�Q��[�	R�s�BH � H5�4H5c��|�!tjtj}|j}|jD]�\}}|j|�}|�#|j|�|k7s�.||�|||<�<|tjk(r|d�d||<�]|tjk(r|d�d||<�~|tjk(r|d�d||<��|tjk(s��|i�i||<��y)Ng@�
�2)r�voices�
DEFAULT_VOICEr8rAr&rr;r=r9r?)r`�acss�current�
acss_property�method�values      r�_apply_acsszSpeechServer._apply_acsss����<��?�?�8�#9�#9�:�D��0�0��%)�%<�%<�	,�!�M�6��H�H�]�+�E�� ��;�;�}�-��6��5�M�-2�G�M�*��$�"4�"4�4��s��),��
�&��$�)�)�+��r�
�),��
�&��$�)�)�+��r�
�),��
�&��$�+�+�-��r�
�)+��
�&�#	,rc��t|t�rd}tj|tj
�}|j
|�|jd|�d��|j|jj|fi|��y)Nr�z
Speaking 'z' )�
isinstancerr�
markupTextr�MARKr�r�r�r7�speak)r`�textr�r��ssmls     r�_speakzSpeechServer._speak2sn���d�D�!��D����t�%5�%:�%:�;����������
�4�&��3�4�����4�<�<�-�-�t�>�v�>rc	�������	t��\�}d����fd�	}�j�j||t�jj����y#t$rYywxYw)zLProcess another sayAll chunk.

        Called by the gidle thread.

        c�@���
j|}|tjjk(r�|r�|j	d�}t|�dk\r�|dd\}}�jt|�z�_�jt|�z�_	d�j�d�j�d�j�d�j��}tjtj|d�nN�j�_d�_	n5|tjjk(r�j�_d�_	tj �	�j#�|�|tjjk(r"tj �
j$��	�yy)N�:r�rzSPEECH DISPATCHER: Got mark z / T)rZr
rSrTr�r��startOffsetr��
currentOffset�currentEndOffset�	endOffsetrrCr|rXr�idle_add�copy�_say_all)�callbackType�
index_mark�t�index�start�endra�context�iterator�
orca_callbackr`s       ����r�callbackz'SpeechServer._say_all.<locals>.callbackGse����+�+�L�9����2�2�;�;�;�!� *� 0� 0�� 5���u�:��?�).�q���J�E�3�4;�4G�4G�#�e�*�4T�G�1�7>�7J�7J�S�QT�X�7U�G�4�">�#*�#8�#8�"9��7�;S�;S�:T�TW�#*�#6�#6�"7�q��9J�9J�8K�!M� �
"�.�.�u�/?�/?��d�K�07�0C�0C��-�37��0��,�4�4�>�>�>�,3�,=�,=�G�)�/3�G�,��
�
�m�W�\�\�^�Q�?���2�2�<�<�<��M�M�$�-�-��=�I�=r)r��event_typesFr)�nextr��	utterance�listrZ�keys�
StopIteration)r`r�r�r�r�r�s```  @rr�zSpeechServer._say_all<sw���!	J� ��N�M�G�T�
J�
J�6
�K�K��)�)�4�(�$(��)@�)@�)E�)E�)G�$H�
�
J���A�	��>�A	�s�A�	A*�)A*c�N�|j|jj�yr)r�r7�cancel�r`s r�_cancelzSpeechServer._cancelfs�����4�<�<�.�.�/rc��tjtj}||xrdxsdz}	|tj}t
dtd||z��|tj<d|��}tjtj|d�|j|xrtjxstj|��y#t
$rd}Y��wxYw)	N���rr�rr�zSPEECH DISPATCHER: Rate set to T�r�)rr�r�rr9�KeyErrorr�r�rrCr|r�r	�
SPEECH_SLOWER�
SPEECH_FASTER)r`�step�decreaser��deltar�ras       r�_change_default_speech_ratez(SpeechServer._change_default_speech_rateis������x�5�5�6�����R�-�2�.��	���	�	�?�D��a��R����!6�7��T�Y�Y��/��v�6��
���5�+�+�S�$�7��
�
�8�6�� 6� 6�-��,�,�4�	�	9���	��D�	���C�C�Cc��tjtj}||xrdxsdz}	|tj}t
dtd||z��|tj<d|��}tjtj|d�|j|xrtjxstj|��y#t
$rd}Y��wxYw)	Nr�r�rr�z SPEECH DISPATCHER: Pitch set to Tr�)rr�r�rr;r�r�r�rrCr|r�r	�SPEECH_LOWER�
SPEECH_HIGHER)r`r�r�r�rr�ras       r�_change_default_speech_pitchz)SpeechServer._change_default_speech_pitchvs������x�5�5�6�����R�-�2�.��	���+�+�,�E�$'�q�#�a����*?�#@��T�
�
� �0���8��
���5�+�+�S�$�7��
�
�8�5�� 5� 5�-��,�,�4�	�	9���	��E�	�rc��tjtj}||xrdxsdz}	|tj}t
dtd||z��|tj<d|��}tjtj|d�|j|xrtjxstj|��y#t
$rd}Y��wxYw)	Nr�rr�rr�z!SPEECH DISPATCHER: Volume set to Tr�)rr�r�rr=r�r�r�rrCr|r�r	�
SPEECH_SOFTER�
SPEECH_LOUDER)r`r�r�r�rr�ras       r�_change_default_speech_volumez*SpeechServer._change_default_speech_volume�s������x�5�5�6�����R�-�2�.��	��$�)�)�_�F��a��Q����!7�8��T�Y�Y��1�&��:��
���5�+�+�S�$�7��
�
�8�6�� 6� 6�-��,�,�4�	�	9���	��F�	�rc�z�|jj|j|j�|jgSr)�
_SERVER_NAMESr&r6r�s r�getInfozSpeechServer.getInfo�s,���"�"�&�&�t�x�x����:�D�H�H�E�Erc
��ddlm}m}||�d}|�d|vrd}n|jd�\}}|dz|z}d}	|jj
}	||j
|�z
}d}	|r-|D]\}
}}||k(s�
|}	n|	s|D]\}
}}|k(s�
|}	�|	s|}	|j|	dff|z}g}
|D]�\}
}}|
jtjtjj|
tjj|jd�dtjj |jd�dtjj"|i����|
S#t$rY��wxYw#t$rY��wxYw)Nr)�	getlocale�LC_MESSAGESr�r�rr�r�)r�rrr�r7�list_synthesis_voicesr�rIr�r\rr
r�r�r��	partitionr��VARIANT)r`rrr��locale_language�locale_lang�locale_dialectr�r�default_langr�r��variant�familiess              r�getVoiceFamilieszSpeechServer.getVoiceFamilies�s���	2��;�'��*���>�S��.�"�O�*0�,�,�s�*;�'�K��)�C�/�.�@�O���		�$(�L�L�$F�$F�!�
��$�,�,�-B�C�C�����'-�
�#��d�G��?�*�#2�L��
� �+1�3�'�D�$���{�*�'2��3� �.���+�+�\�4�@�B�V�K����#)�	;��D�$���O�O�L�4�4��&�&�+�+�T��&�&�+�+�T�^�^�C�-@��-C��&�&�.�.����s�0C�A�0F��&�&�.�.��69�:�
;�	;����;�
��
���	��	�s#�E:�E*�*	E7�6E7�:	F�Fc���|sy|jr(|xr$tj�|jz
dkD}t|�dk(rcd|�d�}tjtj
|d�|j
|�|j|jj|�yd|�d�}tjtj
|d�|j||�y)N��?r�SPEECH DISPATCHER: Speaking '�	' as charT�' as string)r_�timer�rrCr|r�r�r7�charr�)r`r�r��	interruptras     rr�zSpeechServer.speak�s������ � �!�Q�t�y�y�{�T�5J�5J�'J�c�&Q�I��t�9��>�1�$��y�A�C����u�/�/��d�;����T�"����t�|�|�0�0�$�7�1�$��{�C�C����u�/�/��d�;��K�K��d�#rc�F�tj|j||�yr)rr�r�)r`�utteranceIterator�progressCallbacks   r�sayAllzSpeechServer.sayAll�s���
�
�d�m�m�%6�8H�Irc��|j|�|}tj�j�}|r/|jj�rt
j|�}|r||k(rRd|�d�}tjtj|d�|j|jj|�y|j||�y)NrrT)r�rr��getActiveScript�	utilities�speakMathSymbolNamesr�getCharacterNamerrCr|r�r7r"r�)r`�	characterr�r��scriptras      r�speakCharacterzSpeechServer.speakCharacter�s�����������*�*�,�<�<�>���f�&�&�;�;�=��/�/�	�:�D��t�y�(�1�)��I�F�C����u�/�/��d�;����t�|�|�0�0�)�<���
�
�4��rc��|j�}|j�}|�d|��j�}t|�dk(rcd|�d�}t	j
tj|d�|j|�|j|jj|�n>d|�d�}t	j
tj|d�|j||��tj�|_
y)N� rrz' as keyTr r�)�
getKeyName�getLockingStateString�stripr�rrCr|r�r�r7�keyr�r!r_)r`�eventr��event_string�lockingStateStringras      r�
speakKeyEventzSpeechServer.speakKeyEvent�s����'�'�)��"�8�8�:��&��q�);�(<�=�C�C�E���|���!�1�,��x�H�C����u�/�/��d�;����T�"����t�|�|�/�/��>�1�,��{�K�C����u�/�/��d�;��J�J�|�$�J�/� $�	�	���rc�&�|j|�yr�r�r`r�s  r�increaseSpeechRatezSpeechServer.increaseSpeechRates���(�(��.rc�*�|j|d��y�NT)r�r;r<s  r�decreaseSpeechRatezSpeechServer.decreaseSpeechRates���(�(���(�=rc�&�|j|�yr�rr<s  r�increaseSpeechPitchz SpeechServer.increaseSpeechPitchs���)�)�$�/rc�*�|j|d��yr?rBr<s  r�decreaseSpeechPitchz SpeechServer.decreaseSpeechPitchs���)�)�$��)�>rc�&�|j|�yr�rr<s  r�increaseSpeechVolumez!SpeechServer.increaseSpeechVolumes���*�*�4�0rc�*�|j|d��yr?rGr<s  r�decreaseSpeechVolumez!SpeechServer.decreaseSpeechVolumes���*�*�4�$�*�?rc�6�|jj�S)zReturns the current language.)r7r�r�s r�getLanguagezSpeechServer.getLanguages���|�|�(�(�*�*rc��|sy|jj|�|r"|jj|dz|z�yy)zSets the current languageNr�)r7r�)r`r�r�s   r�setLanguagezSpeechServer.setLanguages?�������!�!�(�+���L�L�%�%�h��n�w�&>�?�rc���d|vrJ|jdd�dj�}|jdd�dj�}||fS|j�}|j�}||fS)z;Attempts to ensure consistency across inconsistent formats.r�rrr�)r��lower)r`r�r��normalized_language�normalized_dialects     r�_normalizedLanguageAndDialectz*SpeechServer._normalizedLanguageAndDialect&s~���(�?�"*�.�.��a�"8��";�"A�"A�"C��!)����Q�!7��!;�!A�!A�!C��
#�$6�6�6�#+�.�.�"2��!(�����"�$6�6�6rc	��tj�}|j||�\}}g}|jj�}|D]a}	|j|	d�\}
}|
|k7r� ||k(r|j	|	�n|s||
k(r|j	|	�|��Rt|�|k\s�andt|��d|�d|�dtj�|z
d�d�	}t
jtj|d�|S)	zGReturns the families for language available in the current synthesizer.rzSPEECH DISPATCHER: Found z match(es) for language='z' dialect='z' in z.4fzs.T)	r!rSr7rrr�rrCr|)
r`r�r��maximumr��target_language�target_dialect�resultr��voicerQrRras
             r�getVoiceFamiliesForLanguagez(SpeechServer.getVoiceFamiliesForLanguage2s���	�	���*.�*L�*L�X�W^�*_�'��������3�3�5���		�E�6:�6X�6X�Y^�_`�Ya�6b�3��!3�"�o�5��!�^�3��
�
�e�$�'�N�>Q�,Q��
�
�e�$��"�s�6�{�g�'=��		�(��F��}�4M�h�Z�X��y��d�i�i�k�E�&9�#�%>�b�
B�	�	���5�+�+�S�$�7��
rc	�6�|j|j��\}}|j||�\}}d|�d|�d|�d|�d�	}tjtj|d�||k(r-||k(r(d}tjtj|d�y|j||d�	�}|r.d
|ddg}	tjtj|	d�yd
|j�dg}	tjtj|	d�y)zFReturns True if we should change the voice for the specified language.z?SPEECH DISPATCHER: Should change voice for language? Current: 'z' 'z' New: '�'Tz9SPEECH DISPATCHER: No. Language and dialect are the same.Fr)rUz-SPEECH DISPATCHER: Yes. Found matching familyr�.z,SPEECH DISPATCHER: No. No matching family in)rSrLrrCr|rZ�printTokens�getOutputModule)
r`r�r��current_language�current_dialect�other_language�
other_dialectrar�tokenss
          r�shouldChangeVoiceForLanguagez)SpeechServer.shouldChangeVoiceForLanguageMs,��-1�,N�,N�t�O_�O_�Oa�,b�)��/�(,�(J�(J�8�U\�(]�%��
��)�*�#�o�->�?�#�$�C�
��a�
9�	�
	���5�+�+�S�$�7��~�-�/�]�2R�L�C����u�/�/��d�;���3�3�N�M�[\�3�]���E�x�PQ�{�TW�X�F����e�.�.���=��@�$�BV�BV�BX�Z]�^��
���%�*�*�F�D�9�rc�6�|jj�Sr)r7�get_output_moduler�s rr_zSpeechServer.getOutputModuleis���|�|�-�-�/�/rc�:�|jj|�yr)r7rk)r`r"s  r�setOutputModulezSpeechServer.setOutputModulels�����&�&�v�.rc�$�|j�yr)r�r�s r�stopzSpeechServer.stopos�����rc�n�|jj�tj|j=yr)r7�closerr%r6r�s rr/zSpeechServer.shutdownrs$���������(�(����2rc�X�|jj�|j�yr)r7rmr])r`r�r�s   rr}zSpeechServer.resetvs���������
�
�rc��	|j|jj�S#t$rYytj
$rYywxYw)aYReturn names of available output modules as a tuple of strings.

        This method is not a part of Orca speech API, but is used internally
        by the Speech Dispatcher backend.
        
        The returned tuple can be empty if the information can not be
        obtained (e.g. with an older Speech Dispatcher version).
        
        r)r�r7r r�rF�SSIPCommandErrorr�s rr z SpeechServer.list_output_moduleszsE��	��%�%�d�l�l�&F�&F�G�G���	���'�'�	��	�s�$'�	A�A�Ar)r�)F)NNT)r)r)NN)9�__name__�
__module__�__qualname__r%rr�DEFAULT_SYNTHESIZERr
�staticmethodrr#�classmethodrr,r2r5r]rr�r�r:r<r>r�r@r�r�r�r�r�rrrrrr�r'r/r9r=r@rCrErHrJrLrNrSrZrer_rirkr/r}r �
__classcell__)rcs@rrr8sV����O�!��&�	�(E�(E�F�M��+��+������1��1��5��5�����1%�f4��(+�
	�8�:�<�!�(>�$8�>,�.?�(�T0�9�9�9�F�0�d$�<J�� 
,�/�>�0�?�1�@�+�
@�
7��6�80�/��3��rr)�__doc__�__id__�__version__�__date__�
__author__�
__copyright__�__license__�
gi.repositoryrr!r�rrrr	r
rrr
r�rr�rrrFrB�getattrrEr�rIrrrr�<module>r�s���(D�	������2�
�:�
��������������(�#����#����(�#��Q	�<�,�,�Q	���$�#��$��
�����s$�B
�	B�B
�	B
�
B�B

Zerion Mini Shell 1.0