+
    Wi[                         R t ^ RIt^ RIt^ RIt^ RIHtHt ^ RIHt ^RIH	t	H
t
Ht ^RIHt ^RIHt ^RIHt R R	 ltR
 R ltR R ltR R lt]R8X  d
   ]! 4        R# R# )zJUtility functions for the command line interface. Used by the main module.N)OptionalTextIO)tabulate)CommunicateSubMakerlist_voices)DEFAULT_VOICEUtilArgs)__version__c                >    V ^8  d   QhR\         \        ,          RR/# )   proxyreturnN)r   str)formats   "L/home/ubuntu/hermes-agent/venv/lib/python3.14/site-packages/edge_tts/util.py__annotate__r      s     $ $(3- $D $    c           
     J  "   \        V R7      G Rj  xL
 p\        VR R7      p. ROpV Uu. uFQ  pVR,          VR,          R	P                  VR
,          R,          4      R	P                  VR
,          R,          4      .NKS  	  pp\        \	        WB4      4       R#  Lu upi 5i)zPrint all available voices.r   Nc                     V R ,          # )	ShortName )voices   &r   <lambda>_print_voices.<locals>.<lambda>   s	    eK.@r   )keyGenderContentCategoriesVoicePersonalitiesr   z, VoiceTag)Namer   r   r    )r   sortedjoinprintr   )r   voicesheadersr   tables   $    r   _print_voicesr)      s     U++FF @AFKG  E +(OIIeJ'(;<=IIeJ'(<=>		
  
  
(5
"# ,s!   B#BB#ABB#B#c                (    V ^8  d   QhR\         RR/# )r   argsr   Nr	   )r   s   "r   r   r   !   s     4 4 4d 4r   c           	       "    \         P                  P                  4       '       d\   \         P                  P                  4       '       d8   V P                  '       g&   \        R\         P                  R7       \        4        \        T P                  T P                  T P                  T P                  T P                  T P                  R7      p\!        4       p T P                  e(   T P                  R8w  d   \#        T P                  R4      M\         P                  P$                  pT P&                  e*   T P&                  R8w  d   \#        T P&                  RR	R
7      MRpTf"   T P&                  R8X  d   \         P                  pTP)                  4         Rj  xL
  pTR,          R8X  d   TP+                  TR,          4       K2  TR,          R9   g   KB  TP-                  T4       KU    \         d     \        R\         P                  R7        R# i ; i L}D~Te    TP+                  TP/                  4       4       T\         P                  P$                  Jd   TP1                  4        Te)   T\         P                  Jd   TP1                  4        R# R# R#   X\         P                  P$                  Jd   TP1                  4        Xe'   T\         P                  Jd   TP1                  4        i i i ; i5i)z2Run TTS after parsing arguments from command line.zWarning: TTS output will be written to the terminal. Use --write-media to write to a file.
Press Ctrl+C to cancel the operation. Press Enter to continue.)filez
Operation canceled.N)ratevolumepitchr   -wbwutf-8encodingtypeaudiodata)WordBoundarySentenceBoundary)sysstdinisattystdoutwrite_mediar%   stderrinputKeyboardInterruptr   textr   r.   r/   r0   r   r   openbufferwrite_subtitlesstreamwritefeedget_srtclose)r+   communicatesubmaker
audio_filesub_filechunks   &     r   _run_ttsrR   !   sK    99#**"3"3"5"5d>N>N>N+ ZZ G
 		

YY{{jjjjK zH +0@0@C0G !!4("" 	 ##/D4H4HC4O %%sW= 	
  4 4 ;zzH&--/ 	% 	%%V}'  v/v"FFe$?  %CJJ76	%/ NN8++-.SZZ...HCJJ$>NN %? SZZ...HCJJ$>NN %?s{   K9AG- G- %G- AK9B=J HHH 5J J -&HK9HK9H$J  AK9AK66K9c                    V ^8  d   QhRR/# r   r   Nr   )r   s   "r   r   r   X   s     0 0T 0r   c                 n  "   \         P                  ! RR7      p V P                  RR7      pVP                  RRRR7       VP                  R	R
RR7       V P                  RRR\         2\        R7       VP                  RRRRR7       V P                  RRRR7       V P                  RRRR7       V P                  RRRR7       V P                  RRR7       V P                  RR R7       V P                  R!R"R7       V P                  R#R$R%\
         2R&7       V P                  \        4       R'7      pVP                  '       d5   \        VP                  R(7      G R)j  xL
  \        P                  ! ^ 4       VP                  es   VP                  R,9   d%   \        P                  P                  4       Vn        M=\#        VP                  R*R+7      ;_uu_ 4       pVP                  4       Vn        R)R)R)4       VP                   e   \%        V4      G R)j  xL
  R)# R)#  L  + '       g   i     L7; i L5i)-zAsync main functionz9Text-to-speech using Microsoft Edge's online TTS service.)descriptionT)requiredz-tz--textzwhat TTS will say)helpz-fz--filez!same as --text but read from filez-vz--voicezvoice for TTS. Default: )rX   defaultz-lz--list-voicesz lists available voices and exits
store_true)rX   actionz--ratezset TTS rate. Default +0%%.z+0%z--volumezset TTS volume. Default +0%%.z--pitchzset TTS pitch. Default +0Hz.z+0Hzz--write-mediaz+send media output to file instead of stdoutz--write-subtitlesz7send subtitle output to provided file instead of stderrz--proxyz#use a proxy for TTS and voice list.z	--versionversionz	edge-tts )r[   r\   )	namespacer   Nr4   r5   )r1   z
/dev/stdin)argparseArgumentParseradd_mutually_exclusive_groupadd_argumentr   r   
parse_argsr
   r   r)   r   r<   exitr-   r=   readrD   rE   rR   )parsergroupr+   r-   s       r   amainrg   X   s    $$OF ///>E	tX,?@	tX,OP
'7	   
/	   'DeT

)HRWX
	(FPVW
K   F   	(MN
I;-/H   xz2D$**---yy99++		(DIdii'22d IIK	 3 yytn  	. 32 	s7   EH5HA<H5H 1$H5H3	H5 H0	+	H5c                    V ^8  d   QhRR/# rT   r   )r   s   "r   r   r      s      d r   c                 B    \         P                  ! \        4       4       R# )z$Run the main function using asyncio.N)asynciorunrg   r   r   r   mainrl      s    KKr   __main__)__doc__r^   rj   r<   typingr   r   r    r   r   r   	constantsr   data_classesr
   r\   r   r)   rR   rg   rl   __name__r   r   r   <module>rt      sP    P   
 #  0 0 $ "  $"4n0f
 zF r   