File tree 1 file changed +0
-39
lines changed
1 file changed +0
-39
lines changed Original file line number Diff line number Diff line change @@ -82,43 +82,4 @@ def carbon(message):
82
82
driver .quit ()
83
83
84
84
85
- @sedenify (pattern = '^.tts' )
86
- def text_to_speech (message ):
87
- reply = message .reply_to_message
88
- args = extract_args (message )
89
- if args :
90
- pass
91
- elif reply :
92
- if not reply .text :
93
- return edit (message , f'`{ get_translation ("ttsUsage" )} `' )
94
- args = reply .text
95
- else :
96
- edit (message , f'`{ get_translation ("ttsUsage" )} `' )
97
- return
98
-
99
- try :
100
- gTTS (args , lang = TTS_LANG )
101
- except AssertionError :
102
- edit (message , f'`{ get_translation ("ttsBlank" )} `' )
103
- return
104
- except ValueError :
105
- edit (message , f'`{ get_translation ("ttsNoSupport" )} `' )
106
- return
107
- except RuntimeError :
108
- edit (message , f'`{ get_translation ("ttsError" )} `' )
109
- return
110
- tts = gTTS (args , lang = TTS_LANG )
111
- tts .save ('h.mp3' )
112
- with open ('h.mp3' , 'rb' ) as audio :
113
- linelist = list (audio )
114
- linecount = len (linelist )
115
- if linecount == 1 :
116
- tts = gTTS (args , lang = TTS_LANG )
117
- tts .save ('h.mp3' )
118
- with open ('h.mp3' , 'r' ):
119
- reply_voice (reply if reply else message , 'h.mp3' , delete_file = True )
120
-
121
- message .delete ()
122
- send_log (get_translation ('ttsLog' ))
123
-
124
85
HELP .update ({'carbon' : get_translation ('carbonInfo' )})
You can’t perform that action at this time.
0 commit comments