speed up voice rendering
This commit is contained in:
+4
-1
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: UTF-8 -*-
|
||||
# File: render.py
|
||||
# Date: Thu Jan 08 00:22:33 2015 +0800
|
||||
# Date: Thu Jan 08 00:53:11 2015 +0800
|
||||
# Author: Yuxin Wu <[email protected]>
|
||||
|
||||
import os
|
||||
@@ -192,6 +192,9 @@ class HTMLRender(object):
|
||||
talkers = set([talker_id])
|
||||
self.prepare_avatar_css(talkers)
|
||||
|
||||
voice_paths = [msg.imgPath for msg in msgs if msg.type == TYPE_SPEAK]
|
||||
self.res.cache_voice_mp3(voice_paths)
|
||||
|
||||
logger.info(u"Rendering {} messages of {}({})".format(
|
||||
len(msgs), self.parser.contacts[talker_id], talker_id))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user