%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__/speechserver.cpython-312.pyc

�

g
ft��\�dZdZdZdZdZdZGd�de�ZGd�d	�ZGd
�de	�Z
y)
a'Provides an abtract class for working with speech servers.

A speech server (class SpeechServer) provides the ability to tell the
machine to speak.  Each speech server provides a set of known
voices (identified by name) which can be combined with various
attributes to create aural style sheets.z$Id$z
$Revision$z$Date$z-Copyright (c) 2005-2008 Sun Microsystems Inc.�LGPLc
�J�eZdZdZdZdZdZdZdZdZ	dZ
ed	ed	ed	ed	ed	iZd
�Zy	)�VoiceFamilyz)Holds the family description for a voice.�name�gender�lang�dialect�variant�male�femaleNc��tj|�|jtj�|r|j|�yy)z"Create and initialize VoiceFamily.N)�dict�__init__�updater�settings)�self�propss  �3/usr/lib/python3/dist-packages/orca/speechserver.pyrzVoiceFamily.__init__5s4���
�
�d�����K�(�(�)���K�K����)
�__name__�
__module__�__qualname__�__doc__�NAME�GENDER�LANG�DIALECT�VARIANT�MALE�FEMALErr�rrrr!sO��3�
�D�
�F�
�D��G��G�
�D�
�F�	
�����������H�rrc�2�eZdZdZdZdZd	d�Zd�Zd�Zd�Z	y)
�
SayAllContext���c�X�||_||_||_||_||_d|_y)a�Creates a new SayAllContext that will be passed to the
        SayAll callback handler for progress updates on speech.
        If the object does not have an accessible text specialization,
        then startOffset and endOffset parameters are meaningless.
        If the object does have an accessible text specialization,
        then values >= 0 for startOffset and endOffset indicate
        where in the text the utterance has come from.

        Arguments:
        -obj:         the Accessible being spoken
        -utterance:   the actual utterance being spoken
        -startOffset: the start offset of the Accessible's text
        -endOffset:   the end offset of the Accessible's text
        N)�obj�	utterance�startOffset�	endOffset�
currentOffset�currentEndOffset)rr'r(r)r*s     rrzSayAllContext.__init__Cs1��!���&���(���&���(��� $��rc�z�d|j|j|j|j|jfzS)Nz%SAY ALL: %s '%s' (%i-%i, current: %i))r'r(r)r*r+�rs r�__str__zSayAllContext.__str__Ys7��6�
�X�X�t�~�~�t�'7�'7�����I[�I[�\�]�	]rc��t|j|j|j|j�}|j
|_|j|_|S�N)r"r'r(r)r*r+r,)r�news  r�copyzSayAllContext.copy]sH���D�H�H�d�n�n� �,�,�d�n�n�>�� �.�.���#�4�4����
rc���|j|jk(xrO|j|jk(xr4|j|jk(xr|j|jk(Sr1)r)r*r'r()r�others  r�__eq__zSayAllContext.__eq__ds\��� � �E�$5�$5�5�2����%�/�/�1�2����E�I�I�%�2����%�/�/�1�	3rN)���r7)
rrr�PROGRESS�INTERRUPTED�	COMPLETEDrr/r3r6r rrr"r"=s&���H��K��I�%�,]��3rr"c���eZdZdZed��Zed��Zed��Zed��Zd�Z	d�Z
d�Zdd
�Zdd�Z
dd�Zd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd�Zd�Zd�Zd�Zdd�Zy	)�SpeechServerz#Provides speech server abstraction.c��y)z1Returns a localized name describing this factory.Nr r rr�getFactoryNamezSpeechServer.getFactoryNamen���	
rc��y)z�Gets available speech servers as a list.  The caller
        is responsible for calling the shutdown() method of each
        speech server returned.
        Nr r rr�getSpeechServerszSpeechServer.getSpeechServerss���	
rc��y)ziGets a given SpeechServer based upon the info.
        See SpeechServer.getInfo() for more info.
        Nr )�infos r�getSpeechServerzSpeechServer.getSpeechServer{s��
	
rc��y)z/Cleans up and shuts down this factory.
        Nr r rr�shutdownActiveServersz"SpeechServer.shutdownActiveServers�s��	
rc��yr1r r.s rrzSpeechServer.__init__�s��rc��y)zReturns [name, id]
        Nr r.s r�getInfozSpeechServer.getInfo�r?rc��y)zkReturns a list of VoiceFamily instances representing all
        voice families known by the speech server.Nr r.s r�getVoiceFamilieszSpeechServer.getVoiceFamilies�r?rNc��y)asSpeaks a single character immediately.

        Arguments:
        - character: text to be spoken
        - acss:      acss.ACSS instance; if None,
                     the default voice settings will be used.
                     Otherwise, the acss settings will be
                     used to augment/override the default
                     voice settings.
        Nr )r�	character�acsss   r�speakCharacterzSpeechServer.speakCharacter�s��	
rc��y)zlSpeaks a key event immediately.

        Arguments:
        - event: the input_event.KeyboardEvent.
        Nr )r�eventrOs   r�
speakKeyEventzSpeechServer.speakKeyEvent�rBrc��y)aASpeaks all queued text immediately.  If text is not None,
        it is added to the queue before speaking.

        Arguments:
        - text:      optional text to add to the queue before speaking
        - acss:      acss.ACSS instance; if None,
                     the default voice settings will be used.
                     Otherwise, the acss settings will be
                     used to augment/override the default
                     voice settings.
        - interrupt: if True, stops any speech in progress before
                     speaking the text
        Nr )r�textrO�	interrupts    r�speakzSpeechServer.speak����	
rc��y)ahIterates through the given utteranceIterator, speaking
        each utterance one at a time.  Subclasses may postpone
        getting a new element until the current element has been
        spoken.

        Arguments:
        - utteranceIterator: iterator/generator whose next() function
                             returns a [SayAllContext, acss] tuple
        - progressCallback:  called as speech progress is made - has a
                             signature of (SayAllContext, type), where
                             type is one of PROGRESS, INTERRUPTED, or
                             COMPLETED.
        Nr )r�utteranceIterator�progressCallbacks   r�sayAllzSpeechServer.sayAll�rXrc��y)z#Increases the speech rate.
        Nr �r�steps  r�increaseSpeechRatezSpeechServer.increaseSpeechRate�r?rc��y)z#Decreases the speech rate.
        Nr r^s  r�decreaseSpeechRatezSpeechServer.decreaseSpeechRate�r?rc��y)z$Increases the speech pitch.
        Nr r^s  r�increaseSpeechPitchz SpeechServer.increaseSpeechPitch�r?rc��y)z$Decreases the speech pitch.
        Nr r^s  r�decreaseSpeechPitchz SpeechServer.decreaseSpeechPitch�r?rc��y)z%Increases the speech volume.
        Nr r^s  r�increaseSpeechVolumez!SpeechServer.increaseSpeechVolume�r?rc��y)z%Decreases the speech volume.
        Nr r^s  r�decreaseSpeechVolumez!SpeechServer.decreaseSpeechVolume�r?rc��y)z;Updates the capitalization style used by the speech server.Nr r.s r�updateCapitalizationStylez&SpeechServer.updateCapitalizationStyle����rc��y)z4Punctuation level changed, inform this speechServer.Nr r.s r�updatePunctuationLevelz#SpeechServer.updatePunctuationLevel�rmrc��y)z+Stops ongoing speech and flushes the queue.Nr r.s r�stopzSpeechServer.stop�rmrc��y)zShuts down the speech engine.Nr r.s r�shutdownzSpeechServer.shutdown�rmrc��y)zResets the speech engine.Nr )rrUrOs   r�resetzSpeechServer.reset�rmrr1)NNT)�)g�?)NN)rrrr�staticmethodr>rArErGrrJrLrPrSrWr\r`rbrdrfrhrjrlrorqrsrur rrr<r<ks���-��
��
��
��
��
��
��
��
�

�
�

�

�
�
� 
� 
�

�

�

�

�

�

�
�
�
�
rr<N)r�__id__�__version__�__date__�
__copyright__�__license__r
rr"�objectr<r rr�<module>r~sJ��(,�������?�
����$��8+3�+3�\O
�6�O
r

Zerion Mini Shell 1.0