mirror of
https://github.com/LC044/WeChatMsg
synced 2024-11-09 09:31:18 +08:00
修复语音失效的问题
This commit is contained in:
parent
598286bf42
commit
3974438d78
@ -315,12 +315,11 @@ class ChildThread(QThread):
|
||||
try:
|
||||
audio_path = media_msg_db.get_audio_path(msgSvrId, output_path=origin_docx_path + "/voice")
|
||||
audio_path = audio_path.replace('/', '\\')
|
||||
modify_audio_metadata(audio_path, displayname)
|
||||
os.utime(audio_path, (timestamp, timestamp))
|
||||
audio_path = audio_path.replace('\\', '/')
|
||||
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
|
||||
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:'{displayname}'}},'''
|
||||
|
@ -17,7 +17,7 @@ contact: ContactPC = None
|
||||
@app.route("/")
|
||||
def index():
|
||||
# 渲染模板,并传递图表的 HTML 到模板中
|
||||
return render_template("index.html")
|
||||
return "index.html"
|
||||
|
||||
|
||||
@app.route("/christmas")
|
||||
@ -87,13 +87,6 @@ def christmas():
|
||||
return render_template("christmas.html", **data, **wordcloud_cloud_data, **time_data, **month_data, **calendar_data,
|
||||
**emoji_data)
|
||||
|
||||
|
||||
# @app.route("/")
|
||||
# def cindex():
|
||||
# # 渲染模板,并传递图表的 HTML 到模板中
|
||||
# return render_template("cindex.html")
|
||||
|
||||
|
||||
@app.route('/home')
|
||||
def home():
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user