403Webshell
Server IP : 107.13.46.68  /  Your IP : 216.73.216.232
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux mariOS 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/speechd/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/speechd/__pycache__/_test.cpython-312.pyc
�

�If����ddlZddlZddlmZmZmZmZmZGd�dej�Z	Gd�de	�Z
Gd�d	e	�Zed
k(rej�yy)�N�)�PunctuationMode�CallbackType�
SSIPClient�Scope�Speakerc��eZdZd�Zd�Zy)�_SSIPClientTestc��td�|_|jjd�|jjd�y)N�test�en�)r�_client�set_language�set_rate��selfs �//usr/lib/python3/dist-packages/speechd/_test.py�setUpz_SSIPClientTest.setUps2��!�&�)������!�!�$�'������b�!�c�8�|jj�y)N)r�closers r�tearDownz_SSIPClientTest.tearDowns�������rN)�__name__�
__module__�__qualname__rr�rrr
r
s��"�
rr
c��eZdZdZd�Zy)�
AutomaticTestz�A set of tests which may be evaluated automatically.

    Please put all tests which require a user to listen to their output to the
    VoiceTest below.

    c���|jjd�tjgtjgtj
gi�|jj
d�fd���|jj
d�fd���tjd�|jj�|jj
d�fd	���tjd
�tjtjtj
fD�cgc]}�|��	c}\}}}|ddgk(r|dgk(rd|vrd
|vrd|vs	J�df��ycc}w)N�flitez]This message should get interrupted.  It is hopefully long enough to last more than 1 second.c�,���|jd�S)N�msg1��append��type�calleds �r�<lambda>z.AutomaticTest.test_callbacks.<locals>.<lambda>8�������1D�1D�V�1L�r)�callbackz0This second message should not be spoken at all.c�,���|jd�S)N�msg2r$r&s �rr)z.AutomaticTest.test_callbacks.<locals>.<lambda>:r*rrzHi.c�,���|jd�S)N�msg3r$r&s �rr)z.AutomaticTest.test_callbacks.<locals>.<lambda>>r*r�r#r/r-z�This failure only indicates a possible error.  The test depends on proper timing and results may warry depending on the used output module and other conditions.  See the code of this test method if you want to investigate further.)
r�set_output_moduler�BEGIN�CANCEL�END�speak�time�sleep�cancel)r�t�started�canceled�endedr(s     @r�test_callbackszAutomaticTest.test_callbacks)s\���	
���&�&�w�/��$�$�b��%�%�r��"�"�B�(��	
�����O�$L�	�	N�	
�����M�$L�	�	N��
�
�1�
������������5�$L�	�	N�	
�
�
�1�
�8D�8J�8J�8D�8K�8K�8D�8H�8H�8J�$K�!�F�1�I�$K� ���5��6�6�*�*�u���/@���!�f��&8��X�%�	����	�&�%��$Ks�$EN)rrr�__doc__r=rrrrr"s���#rrc�(�eZdZdZd�Zd�Zd�Zd�Zy)�	VoiceTestz�This set of tests requires a user to listen to it.

    The success or failure of the tests defined here can not be detected
    automatically.

    c���|j}|jd�|jtj�|jd�|jd�|jd�y)NzTesting data escapes:�.zMarker at the end.
.
z.
Marker at the beginning.)rr5�set_punctuationr�ALL�r�cs  r�test_escapeszVoiceTest.test_escapesXsQ���L�L��	���'�(�	���/�-�-�.�	�����	���-�.�	���/�0rc�<�|j}|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd	�|jd�|jd�|j	d
�|jd�|j	d�|jd�y)
NzTesting voice properties:i����zI am fat Billy�dzI am slim WillyrzI am quick Dick.i����zI am slow Joe.i���zI am quiet Mariette.zI am noisy Daisy.)rr5�	set_pitchr�
set_volumerEs  r�test_voice_propertieszVoiceTest.test_voice_properties`s����L�L��	���+�,�	���D��	��� �!�	���C��	���!�"�	���A��	�
�
�3��	���"�#�	�
�
�3��	��� �!�	�
�
�1�
�	���C��	���S��	���&�'�	���S��	���#�$rc��|j}|jd�|jd�|jd�|j	d�y)NzTesting other commands:�a�shift_b�empty)rr5�char�key�
sound_iconrEs  r�test_other_commandszVoiceTest.test_other_commandsss;���L�L��	���)�*�	���s��	���i��	���W�rc	��|j}|j�D]�}|j|�td|�|j	|dz�|j�D]=\}}}td||||�|j
|�|j	|dz|z��?|jd�D](\}}}td||||�|jd�r�(J���y)Nz**zusing default voicez -z
 using voice �fr)r�list_output_modulesr1�printr5�list_synthesis_voices�set_synthesis_voice�
startswith)rrF�module�name�lang�variants      r�
test_listszVoiceTest.test_listszs���
�\�\���-�-�/�

.�V�
�
 �
 ��
(�
�4��
 �
�W�W�V�2�2�
3�()�(?�(?�(A�8�$��t�W��t�V�T�4��9��&�&�t�,������0�$�6�7�8�)*�(?�(?��(E�.�$��t�W��t�V�T�4��9�����-�-�-�.�

.rN)rrrr>rGrLrTr`rrrr@r@Ps���1�%�&�.rr@�__main__)�unittestr6�clientrrrrr�TestCaser
rr@r�mainrrr�<module>rfsY��$��M�M��h�'�'��*�O�*�\6.��6.�p�z���H�M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit