فهرست منبع

Modify dumb error when getting voice

Unknown 8 سال پیش
والد
کامیت
4766ee6de0
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      tts/voxygen/voxygen.py

+ 3 - 1
tts/voxygen/voxygen.py

@@ -19,12 +19,14 @@ VOXYGEN_LANGUAGES = dict(
 CACHE_PATH = "/tmp/jarvis/tts/voxygen/"
 
 
-def say(words=None, voice=None, language=None, cache=None):
+def say(words=None, voice=None, language=None, cache=False):
     if not os.path.exists(CACHE_PATH):
         os.makedirs(CACHE_PATH)
 
     sha1 = hashlib.sha1(words).hexdigest()
 
+    voice = get_voice(voice, language)
+
     tempfile = CACHE_PATH + voice + "." + sha1 + ".tts"
 
     get_audio(voice, words, tempfile, cache)