|
|
|
|
@ -1249,18 +1249,17 @@ def scheduledTTSAnnouncement(_tts_num=1):
|
|
|
|
|
|
|
|
|
|
_file = CONFIG['GLOBAL']['{}_FILE'.format(_prefix)]
|
|
|
|
|
_tg = CONFIG['GLOBAL']['{}_TG'.format(_prefix)]
|
|
|
|
|
_timeslot = CONFIG['GLOBAL']['{}_TIMESLOT'.format(_prefix)]
|
|
|
|
|
_lang = CONFIG['GLOBAL']['{}_LANGUAGE'.format(_prefix)]
|
|
|
|
|
|
|
|
|
|
_tts_running[_tts_num] = True
|
|
|
|
|
logger.info('(%s) Iniciando conversion TTS en hilo separado para %s', _label, _file)
|
|
|
|
|
|
|
|
|
|
d = threads.deferToThread(ensure_tts_ambe, CONFIG, _tts_num)
|
|
|
|
|
d.addCallback(_ttsConversionDone, _tts_num, _file, _tg, _timeslot, _lang, _mode, _label)
|
|
|
|
|
d.addCallback(_ttsConversionDone, _tts_num, _file, _tg, _lang, _mode, _label)
|
|
|
|
|
d.addErrback(_ttsConversionError, _tts_num, _label)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _ttsConversionDone(_ambe_path, _tts_num, _file, _tg, _timeslot, _lang, _mode, _label):
|
|
|
|
|
def _ttsConversionDone(_ambe_path, _tts_num, _file, _tg, _lang, _mode, _label):
|
|
|
|
|
global _tts_running
|
|
|
|
|
|
|
|
|
|
if not _ambe_path:
|
|
|
|
|
|