下载ekho-master源码?
https://github.com/hgneng/ekho/archive/master.zip
创建DockerFile
# 使用Ubuntu作为基础镜像
FROM ubuntu:latest
# 更新Ubuntu的软件包列表
RUN apt-get update
RUN apt-get install -y apt-utils
RUN apt-get install -y wget
RUN apt-get install -y zip unzip
# 安装必要的软件包
RUN apt-get install -y build-essential libsndfile1
RUN apt-get install -y openssl libssl-dev
RUN apt-get install -y libpcre3 libpcre3-dev
RUN apt-get install -y zlib1g-dev
RUN apt-get install -y autoconf libtool
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libsndfile1-dev libespeak-ng-dev libpulse-dev texinfo libltdl-dev libmpg123-dev libsonic-dev libutfcpp-dev
# 下载Ekho的源码
COPY ekho-master.zip /ekho-master.zip
# 解压源码包
RUN unzip ekho-master.zip
# 进入源码目录
WORKDIR /ekho-master
# 编译和安装Ekho
RUN ./autogen.sh
RUN ./configure --disable-dependency-tracking
RUN make CXXFLAGS=-O0
RUN make install
RUN ekho "你好。请继续保持努力!" -o holdon.wav
RUN ls
ENTRYPOINT [ "ekho" ]
CMD [ "--help" ]
构建dockerFile
docker build -t ekho .
运行查看是否安装成功,运行下面命令即可在 /opt/yg目录下查看到对应wav文件,其他命令可以参照官网Ekho(余音) - 中文语音合成软件(支持粤语、普通话)
docker run --rm -v /opt/yg:/opt/yg \
ekho 你好啊 -o /opt/yg/holdon.wav