whisper 实现语音转文字

准备需要转码的音频

https://support.huaweicloud.com/sdkreference-sis/sis_05_0039.html

编码转吗的代码

bash 复制代码
import whisper

if __name__ == "__main__":
    file_path = "16k16bit.wav"
    model = whisper.load_model("small")
    result = model.transcribe(file_path)
    print(result["text"])

查看效果

bash 复制代码
已连接到 pydev 调试器(内部版本号 232.10300.41)/PycharmProjects/fastApiProject/venv/lib/python3.10/site-packages/whisper/transcribe.py:115: UserWarning: FP16 is not supported on CPU; using FP32 instead
  warnings.warn("FP16 is not supported on CPU; using FP32 instead")
华为致力于把数字世界带入每个人、每个家庭、每个组织,构建万物互联的智能世界。
相关推荐
爱看书的小沐1 天前
【小沐学AI】Python实现语音识别(whisper+HuggingFace)
人工智能·python·ai·nlp·whisper·语音识别·huggingface
我就是全世界2 天前
深入了解语音识别:Distil-Whisper
macos·whisper·xcode
linzhiji3 天前
whisper get_writer srt_writer 参数说明
前端·python·whisper
花晓木3 天前
Linux系统上部署Whisper。
linux·运维·whisper
爱看书的小沐5 天前
【小沐学AI】Python实现语音识别(Whisper-Web)
人工智能·python·ai·nlp·whisper·openai·语音识别
只恨天高6 天前
最新AI智能聊天对话问答系统源码(图文搭建部署教程)+AI绘画,文生图,TTS语音识别输入,文档分析
人工智能·ai作画·whisper·语音识别
Ephemeroptera14 天前
whisper 模型源码解读
whisper
路人与大师14 天前
深入了解 Whisper 的架构、用法以及在语音识别领域的应用和性能特征
人工智能·whisper·语音识别
Ephemeroptera18 天前
导出 Whisper 模型到 ONNX
whisper·openai·语音识别·onnx·int8