Skip to content

Commit

Permalink
fix: add warning log when pysilk module is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
lanvent committed Jun 10, 2023
1 parent a33df93 commit c34d70b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion voice/audio_convert.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import shutil
import wave

import pysilk
from common.log import logger

try:
import pysilk
except ImportError:
logger.warn("import pysilk failed, wechaty voice message will not be supported.")

from pydub import AudioSegment

sil_supports = [8000, 12000, 16000, 24000, 32000, 44100, 48000] # slk转wav时,支持的采样率
Expand Down

0 comments on commit c34d70b

Please sign in to comment.