@@ -82,10 +82,12 @@ class HtmlExporter(ExporterBase):
|
||||
try:
|
||||
audio_path = media_msg_db.get_audio_path(msgSvrId, output_path=origin_docx_path + "/voice")
|
||||
audio_path = "./voice/" + os.path.basename(audio_path)
|
||||
voice_to_text = escape_js_and_html(media_msg_db.get_audio_text(str_content))
|
||||
except:
|
||||
logger.error(traceback.format_exc())
|
||||
return
|
||||
voice_to_text = media_msg_db.get_audio_text(str_content)
|
||||
if voice_to_text and voice_to_text != "":
|
||||
voice_to_text = escape_js_and_html(voice_to_text)
|
||||
doc.write(
|
||||
f'''{{ type:34, text:'{audio_path}',is_send:{is_send},avatar_path:'{avatar}',voice_to_text:'{voice_to_text}',timestamp:{timestamp},is_chatroom:{is_chatroom},displayname:'{display_name}'}},'''
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user