Install
openclaw skills install speech-recognition-forqqConvert QQ voice messages in AMR/SILK format to text using pysilk decoding and faster-whisper transcription.
openclaw skills install speech-recognition-forqq将 AMR/SILK 格式的语音转换为文字。
source /opt/conda/bin/activate py314pysilk, faster-whisper/opt/workspace/yby_workspace/whisper-modelfrom skills.speech_recognition import transcribe_audio
text = transcribe_audio("/path/to/audio.amr")
print(text)
pysilk 解码为 PCM 数据faster-whisper 转写为文字.amr (SILK_V3 编码)amr, amrnb, amrwbsource /opt/conda/bin/activate py314
pip install pysilk faster-whisper
需要从 HuggingFace 下载 faster-whisper 模型:
python3 -m huggingface_hub snapshot-download \
--repo-type model \
--repo-id Systran/faster-whisper-base \
--local-dir /opt/workspace/yby_workspace/whisper-model
需要的文件:
model.binconfig.jsontokenizer.jsonvocabulary.txt