
    3h                     n    S r SSKrSSKrSSKrSSKrSSKrSSKJr  SSKJ	r	  SS jr
\S:X  a  \
" 5         gg)	z.Main entrypoint for the edge-playback package.    N)which   )pr_errc                     Sn [         R                  " SSSS9nUR                  SSSS	9  UR                  5       u  p#[        R
                  S
:g  =(       d    UR                  nS/nU(       a  UR                  S5        U H%  n[        U5      (       a  M  [        U S35        Sn M'     U (       a!  [        S5        [        R                  " S5        [        R                  R                  S5      S Ln[        R                  R                  S5      n[        R                  R                  S5      n	Su  p U(       d1  [        R                  " SSS9n
U
R!                  5         U
R"                  nU	(       d8  U(       a1  [        R                  " SSS9nUR!                  5         UR"                  n	[%        SU 35        U	(       a  [%        SU	 S35        SSU 3/nU	(       a  UR                  SU	 35        X-   n[&        R(                  " U5       nUR+                  5         S S S 5        [        R
                  S
:X  a  U(       d  SSKJn  U" U5        O5[&        R(                  " SSU	 3U/5       nUR+                  5         S S S 5        U(       a  [%        SU S U	 35        g Ub:  [        R0                  R3                  U5      (       a  [        R4                  " U5        U	b<  [        R0                  R3                  U	5      (       a  [        R4                  " U	5        g g g ! , (       d  f       GN= f! , (       d  f       N= f! U(       a  [%        SU S U	 35        f Ub:  [        R0                  R3                  U5      (       a  [        R4                  " U5        U	b<  [        R0                  R3                  U	5      (       a  [        R4                  " U	5        f f f = f)!NFzedge-playbackz;Speak text using Microsoft Edge's online text-to-speech APIz'See `edge-tts` for additional arguments)progdescriptionepilogz--mpv
store_truezSUse mpv to play audio. By default, false on Windows and true on all other platforms)actionhelpwin32zedge-ttsmpvz is not installed.Tz(Please install the missing dependencies.r   EDGE_PLAYBACK_KEEP_TEMPEDGE_PLAYBACK_MP3_FILEEDGE_PLAYBACK_SRT_FILE)NNz.mp3)suffixdeletez.srtzMedia file: zSubtitle file: 
z--write-media=z--write-subtitles=)play_mp3_win32z--sub-file=z
Keeping temporary files: z and )argparseArgumentParseradd_argumentparse_known_argssysplatformr   appendr   r   exitosenvirongettempfileNamedTemporaryFileclosenameprint
subprocessPopencommunicatewin32_playbackr   pathexistsunlink)depcheck_failedparserargstts_argsuse_mpvdepsdepkeep	mp3_fname	srt_fnamemediasubtitleedge_tts_cmdprocessr   s                  N/var/www/auris/envauris/lib/python3.13/site-packages/edge_playback/__main__.py_mainr<      s   O$$Q8F
 b  
 ,,.NDllg%1G<DESzzcU,-."O 
 9:::>>34D@D

78I

78I OE+%//veLEKKM

IW22&OHNN IYK()OI;b12"nYK$@A"4YK @A#.l+w! , <<7"769%!!!)- ##% /	{%	{KL$	)B)B		)$$	)B)B		)$ *C$/ ,+  /	{%	{KL$	)B)B		)$$	)B)B		)$ *C$s?   4CL< LAL< *L+;L< 
L(#L< +
L95L< <BO__main__)returnN)__doc__r   r   r&   r   r!   shutilr   utilr   r<   __name__     r;   <module>rE      s8    4  	  
   M%` z	G rD   