fix: voice length bug in wechaty

This commit is contained in:
lanvent
2023-04-01 21:58:55 +08:00
parent 5badef8ba9
commit dfb2e460b4
2 changed files with 6 additions and 4 deletions

View File

@@ -72,7 +72,7 @@ class WechatyChannel(ChatChannel):
voiceLength = None
file_path = reply.content
sil_file = os.path.splitext(file_path)[0] + '.sil'
voiceLength = any_to_sil(file_path, sil_file)
voiceLength = int(any_to_sil(file_path, sil_file))
# 发送语音
t = int(time.time())
msg = FileBox.from_file(sil_file, name=str(t) + '.sil')