Explorar o código

add verification not empty audio file

Unknown %!s(int64=8) %!d(string=hai) anos
pai
achega
30a434074b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      tts/voxygen/voxygen.py

+ 1 - 1
tts/voxygen/voxygen.py

@@ -58,7 +58,7 @@ def get_voice(voice, language):
 
 
 def get_audio(voice, text, file_path, cache):
-    if not cache or not os.path.exists(file_path):
+    if not cache or not os.path.exists(file_path) or os.path.getsize(file_path) == 0:
         payload = {
             "method": "redirect",
             "text": text.encode('utf8'),