Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for tag in tts_info['tags']:
key = 'Tags'
value = tag
if ':' in tag:
key = tag.split(':')[0]
value = tag.split(':')[1]
if key not in speech_lines_header:
speech_lines_header.append(key)
if (key in speech_line_definition.keys()):
speech_line_definition[key] = speech_line_definition[key] + ',' + value
else:
speech_line_definition[key] = value;
speech_line_definition['MD5'] = tts.generate_key(tts_info)
speech_line_definitions.append(speech_line_definition)
def __update_speech_marks_file(tts_info, zip_file_name):
if not tts_info['speechMarks']:
return
speech_marks_url = tts.get_speech_marks(tts_info, True)
speech_marks_key = '{}-{}.txt'.format(tts.generate_key(tts_info), tts_info['speechMarks'])
__add_to_zip(speech_marks_key, speech_marks_url, zip_file_name)
def __update_spoken_line_file(tts_info, zip_file_name):
spoken_line_url = tts.get_voice(tts_info, True)
spoken_line_key = '{}.pcm'.format(tts.generate_key(tts_info))
__add_to_zip(spoken_line_key, spoken_line_url, zip_file_name)