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")
华为致力于把数字世界带入每个人、每个家庭、每个组织,构建万物互联的智能世界。
相关推荐
蓝纹绿茶4 天前
音转文模型对比FunASR与Faster_whisper
whisper
SmartJavaAI4 天前
Java调用Whisper和Vosk语音识别(ASR)模型,实现高效实时语音识别(附源码)
java·人工智能·whisper·语音识别
菜鸟的日志8 天前
【音频字幕】构建一个离线视频字幕生成系统:使用 WhisperX 和 Faster-Whisper 的 Python 实现
python·whisper·音视频
AidLux13 天前
犀牛派A1上使用Faster Whisper完成音频转文字
人工智能·语言模型·whisper·音视频
ZHOU_WUYI14 天前
whisper-large-v3 模型
llm·whisper
llrraa201023 天前
python whisper生成字幕
开发语言·python·whisper
weixin_446260851 个月前
本地WSL部署接入 whisper + ollama qwen3:14b 总结字幕校对增强版
whisper
青山师1 个月前
Docker部署whisper转写模型
docker·容器·whisper
Micheal_Dad2 个月前
【尝试】基于openai-whisper进行语音转文字windows版本
whisper
Micheal_Dad2 个月前
【尝试】本地部署openai-whisper,通过 http请求识别
whisper