File tree Expand file tree Collapse file tree 1 file changed +24
-11
lines changed Expand file tree Collapse file tree 1 file changed +24
-11
lines changed Original file line number Diff line number Diff line change @@ -1157,17 +1157,30 @@ def run(self):
1157
1157
1158
1158
print (f"Media file: { mp3_fname } " )
1159
1159
print (f"Subtitle file: { vtt_fname } \n " )
1160
- with subprocess .Popen (
1161
- [
1162
- "edge-tts" ,
1163
- f"--write-media={ mp3_fname } " ,
1164
- f"--write-subtitles={ vtt_fname } " ,
1165
- f"--voice={ self .input_args ['voice' ]} " ,
1166
- f"--text={ self .input_args ['input' ]} " ,
1167
- ],
1168
- creationflags = subprocess .CREATE_NO_WINDOW
1169
- ) as process :
1170
- process .communicate ()
1160
+
1161
+ if sys .platform == "win32" :
1162
+ with subprocess .Popen (
1163
+ [
1164
+ "edge-tts" ,
1165
+ f"--write-media={ mp3_fname } " ,
1166
+ f"--write-subtitles={ vtt_fname } " ,
1167
+ f"--voice={ self .input_args ['voice' ]} " ,
1168
+ f"--text={ self .input_args ['input' ]} " ,
1169
+ ],
1170
+ creationflags = subprocess .CREATE_NO_WINDOW
1171
+ ) as process :
1172
+ process .communicate ()
1173
+ else :
1174
+ with subprocess .Popen (
1175
+ [
1176
+ "edge-tts" ,
1177
+ f"--write-media={ mp3_fname } " ,
1178
+ f"--write-subtitles={ vtt_fname } " ,
1179
+ f"--voice={ self .input_args ['voice' ]} " ,
1180
+ f"--text={ self .input_args ['input' ]} " ,
1181
+ ],
1182
+ ) as process :
1183
+ process .communicate ()
1171
1184
1172
1185
proc = subprocess .Popen (
1173
1186
[
You can’t perform that action at this time.
0 commit comments