当前位置: 首页 > news >正文

语音识别技术paddlespeech的安装和使用

PaddleSpeech 介绍

PaddleSpeech是百度飞桨(PaddlePaddle)开源深度学习平台的其中一个项目,它基于飞桨的语音方向模型库,用于语音和音频中的各种关键任务的开发,包含大量基于深度学习前沿和有影响力的模型。PaddleSpeech支持语音识别、语音翻译(英译中)、语音合成、标点恢复等应用示例。

安装paddlespeech

PaddleSpeech 快速安装方式有两种,一种是 pip 安装,一种是源码编译(官方推荐)。

使用pip安装paddlespeech

$ pip install pytest-runner
$ pip3 install paddleaudio==1.0.1
$ pip3 install paddlespeech==1.0.1

使用源码编译安装

$ git clone https://github.com/PaddlePaddle/PaddleSpeech.git
$ cd PaddleSpeech
$ pip install pytest-runner
$ pip install .

提示:安装过程可能因为缺少各种的库报错,如:librosa 依赖的系统库,gcc 环境问题,kaldi 安装等可以在网上查找。

音频示例下载

$ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
$ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/en.wav

paddlespeech工具

查看帮助

$ paddlespeech  help
$ paddlespeech asr help

基本使用

语音合成

 $ paddlespeech tts --input "你好,欢迎使用百度飞桨深度学习框架!" --output output.wav

如果报错

$ pip install numpy==1.23.0
$ sudo apt-get install libsndfile1

执行过程

$  ts-paddle /paddle/PaddleSpeech paddlespeech tts --input "你好,欢迎使用百度飞桨深度学习框架!" --output output.wav
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
/usr/local/lib/python3.7/dist-packages/librosa/core/constantq.py:1059: DeprecationWarning: `np.complex` is a deprecated alias for the builtin `complex`. To silence this warning, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationsdtype=np.complex,
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 489M/489M [01:01<00:00, 7.96MB/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 915M/915M [01:51<00:00, 8.22MB/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 589M/589M [01:01<00:00, 9.57MB/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 107k/107k [00:00<00:00, 1.33MB/s]
W0606 13:22:41.408085  2451 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 11.7, Runtime API Version: 11.7
W0606 13:22:41.412684  2451 gpu_resources.cc:91] device: 0, cuDNN Version: 8.4.
/paddle/PaddleSpeech/output.wavλ ts-paddle /paddle/PaddleSpeech ls

语音识别

识别中文

$ paddlespeech asr --lang zh --input zh.wav

指定模型识别,识别英文

$ paddlespeech  asr --lang en --model deepspeech2offline_librispeech  --input en.wav

标点恢复

恢复文本标点,可与ASR模型配合使用

$ paddlespeech text --task punc --input 今天的天气真不错啊你下午有空吗我想约你一起去吃饭

声音分类

适配多场景的开放领域声音分类工具
基于 AudioSet 数据集 527 个类别的声音分类模型

$ paddlespeech cls --input zh.wav

声纹提取

工业级声纹提取工具

$ paddlespeech vector --task spk --input zh.wav

语音翻译

端到端英译中语音翻译工具,使用预编译的 kaldi 相关工具,只支持在 Ubuntu 系统中体验

$ paddlespeech st --input en.wav
http://www.lryc.cn/news/240883.html

相关文章:

  • 【机器学习】034_多层感知机Part.2_从零实现多层感知机
  • 2023年中职“网络安全“—Web 渗透测试①
  • Android——资源IDnonFinalResIds和“Attribute value must be constant”错误
  • 批量创建表空间数据文件(DM8:达梦数据库)
  • 简单聊聊加密和加签的关系与区别
  • 视频转码方法:多种格式视频批量转FLV视频的技巧
  • 【Java 进阶篇】Redis 数据结构:轻松驾驭多样性
  • 东用科技智能公交识别系统无线传输方案
  • Django批量插入数据及分页器
  • PHP 语法||PHP 变量
  • 【python基础(四)】if语句详解
  • Spring Boot中常用的参数传递注解
  • Quartz .Net 的简单使用
  • 面试Java笔试题精选解答
  • 使用Python画一棵树
  • nginx学习(4)Nginx 负载均衡
  • WSL登录时提示nsenter: cannot open /proc/320/ns/time: No such file or directory的解决办法
  • git修改远程分支名称
  • Django 入门学习总结7-静态文件管理
  • 游戏开发引擎Cocos Creator和Unity如何对接广告-AdSet聚合广告平台
  • 振南技术干货集:制冷设备大型IoT监测项目研发纪实(4)
  • Android线程优化——整体思路与方法
  • 论防火墙的体系结构
  • BeansTalkd 做消息队列服务
  • csv文件添加文件内容和读取
  • 关于禅道的安装配置以及项目管理、团队协同工作
  • 使用Wireshark提取流量中图片方法
  • C#,简单修改Visual Studio 2022设置以支持C#最新版本的编译器,尊享编程之趣
  • 小程序Tab栏与页面滚动联动
  • Java,数据结构与集合源码,关于List接口的实现类(ArrayList、Vector、LinkedList)的源码剖析