基于飞桨开源深度学习 https://www.paddlepaddle.org.cn/
https://github.com/PaddlePaddle/PaddleSpeech
生产环境建议购买专业的GPU计算服务器
本地电脑配置: i7 16g内存,一分钟语音转换文字时间五十秒,
git克隆
git clone https://gitee.com/wangxuancheng/audio-to-text.git
cd audio-to-text
# 音频文件存放目录
input
# 音频转换为16khz的wav格式文件目录
output
构建并进入docker容器,镜像中Python版本为3.7
docker pull registry.cn-hangzhou.aliyuncs.com/wangxuancheng/paddle:2.2.1
docker run --name paddle_docker -it -v $PWD:/paddle registry.cn-hangzhou.aliyuncs.com/wangxuancheng/paddle:2.2.1 /bin/bash
cd /paddle
# 2.m4a input存放的音频文件
python audio.py 2.m4a
第二次进入Docker容器中,使用如下命令:
docker start <Name of container>
docker attach <Name of container>
image.png