Преглед на файлове

add verification not empty audio file

Unknown преди 8 години
родител
ревизия
30a434074b
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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'),