浏览代码

Change sha1 to md5 for smaller name of file (nico choice)

Unknown 8 年之前
父节点
当前提交
e922da2003
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tts/voxygen/voxygen.py

+ 2 - 2
tts/voxygen/voxygen.py

@@ -42,8 +42,8 @@ def say(words=None, voice=None, language=VOXYGEN_LANGUAGES_DEFAULT, cache=None):
 
 
 def get_file_path(words, voice, language):
-    sha1 = hashlib.sha1(words).hexdigest()
-    filename = voice + "." + sha1 + CACHE_EXTENSION
+    md5 = hashlib.md5(words).hexdigest()
+    filename = voice + "." + md5 + CACHE_EXTENSION
     cache_directory = os.path.join(CACHE_PATH, language)
     file_path = os.path.join(cache_directory, filename)
     create_directory(cache_directory)