
    ruj	                     p    S SK r S SKrS SKrSrSr\SSSS.r\" SS	9S
 5       r\R                  SS05        g)    Nz6https://texttospeech.googleapis.com/v1/text:synthesize'AIzaSyBrHRq1560psTF4pnWChWGV4G1mgymWb8gzapplication/json; charset=utf-8gzipzokhttp/4.11.0)zx-goog-api-keyzcontent-typezaccept-encodingz
user-agentzvoice ?(.*))patternc                   #    U R                   R                  S5      nS nU(       d`  U R                  (       aO  U R                  5       I S h  vN nUR                  (       a  U R                  S5      I S h  vN   g UR                  nU(       d  U R                  S5      I S h  vN   g S/ SSSSS.S	U0S
SSS.S.n[        R                  " [        [        US9nUR                  S:X  Ga(  UR                  5       S   n[        R                  " U5      nSU R                   SU R                    S3n["        R$                  " SSS9  ['        US5       nUR)                  U5        S S S 5        U(       a9  U R*                  R-                  U R                  USUR                   S9I S h  vN   O8U R*                  R-                  U R                  USU R                  S9I S h  vN   ["        R.                  " U5        U R1                  5       I S h  vN   g U R                  S5      I S h  vN   g  GN GN GN! , (       d  f       N= f N Ni N= N%7f)N   z/Invalid Syntax. Please reply to a text message.z9Invalid Syntax. Please specify text to convert to speech.MP3g        r   g      ?)audioEncodingeffectsProfileIdpitchsampleRateHertzspeakingRatevolumeGainDbtextzen-USzen-US-Casual-KSSML_VOICE_GENDER_UNSPECIFIED)languageCodename
ssmlGender)audioConfiginputvoice)headersjson   audioContentz
downloads/_z.mp3	downloadsT)exist_okwb)
voice_notereply_toz%Error: Failed to generate audio file.)pattern_matchgroupreply_to_msg_idget_reply_messagemediaeditr   requestsposturlr   status_coder   base64	b64decodechat_ididosmakedirsopenwriteclient	send_fileremovedelete)	event
input_textprevious_messagedataresponseaudio_content
audio_data	file_namefs	            !/root/TeamUltroid/addons/voice.py	voice_cmdrA      s    $$**1-J%//!&!8!8!::!!**NOOO%**
jjTUUU # " 
 J
 $$9
D& }}S'=Hs" 7%%m4
 q
$?	
K$/)T"aGGJ # ,,((),,	 )    ,,((..	 )    			)llnjj@AAAs ;O
 	V< #" 	As   A	IH,)I5H/6,I"H2#B.IH5#AI%I&8II-II
I&I'I/I2I5
I?II
IIr   zvoice <text>    
Usage: Generate an audio file of the specified text using Google Text-to-Speech API.     

Example: voice Hello world)
r'   r+   r/   r)   api_keyr   ultroid_cmdrA   CMD_HELPupdate     r@   <module>rH      sb      	>
35!	 ]#=B $=B~ 	$ rG   