语音识别-初识

2023-11-09

  1. ASRT
    https://blog.ailemon.net/2018/08/29/asrt-a-chinese-speech-recognition-system/
  2. ASR-Automatic Speech Recognition &&&&&&&&&& Paddle Speech
    涉及数据集:Aishell, wenetspeech, librispeech…
    涉及方法:
    ① DeepSpeech2: End-to-End Speech Recognition in English and Mandarin;
    ② u2–Unified Streaming and Non-streaming Two-pass End-to-end Model for Speech Recognition;
    &&&&&&&&&&&&&&&
    Conformer, Transformer, chunk-conformer
    ① SpeedySpeech: Efficient Neural Speech Synthesis (conformer);
    ② Conformer: Convolution-augmented Transformer for Speech Recognition
    &&&&&&&&&&&&&&&
    其中解码方式还涉及,Attention, …and so on.
    不同的解码方式,其 Character Error Rate - CER 也不尽相同。

About End to End :
E2E models combine the acoustic, pronunciation and language models into a single neural network, showing competitive results compared to conventional ASR systems.
There are mainly three popular E2E approaches, namely CTC, recurrent neural network transducer (RNN-T) and attention based encoder-decoder (AED).


u2

Propose a new framework namely U2 to unify non-streaming and streaming speech recognition.

Framework is based on the hybrid CTC/attention architecture with conformer blocks.
Propose a dynamic chunk-based attention strategy to allow arbitrary right context length.

To support streaming, Modify the conformer block while bringing negligible performance degradation.


Figure:
a Shared Encoder, a CTC Decoder and a Attention Decoder.
The Shared Encoder consists of multiple Transformer or Conformer encoder layers.

The CTC Decoder consists of a linear layer and a log softmax layer;
The CTC loss function is applied over the softmax output in training.

The Attention Decoder consists of multiple Transformer decoder layers.

模型包含三个部分,分别为共享的Encoder、CTC解码器、Attention解码器;

  1. 共享Encoder包含多层transformer或者conformer;
    (encoder-conformer layers are particularly modified.—改成了causal convolution)
  2. CTC解码器为一个全连接层和一个softmax层;
  3. Attention解码器包含多层transformer层。

在这里插入图片描述
Propose a dynamic chunk-based attention strategy to allow arbitrary right context length.

At inference time, the CTC decoder generates n-best hypotheses in a streaming manner.

The inference latency could be easily controlled by only changing the chunk size.

The CTC hypotheses are then rescored by the attention decoder to get the final result.
This efficient rescoring process causes negligible sentence-level latency.
注意力解码器对 CTC 假设进行重新评分以获得最终结果。
这种高效的重新评分过程导致的句子级延迟可以忽略不计。


模型训练loss包含两个部分:CTC loss 和 AED loss
x为输入的声学特征,y为音频标注序列
第一项为 CTC loss,第二项为 AED loss
λ用于平衡CTC与AED;

在这里插入图片描述
在这里插入图片描述


Make the Shared Encoder only see limited right contexts, then CTC decoder could run in a streaming mode in the first pass.----------为了使模型支持流式,需要限制共享Encoder看到未来信息。


为了支持流式语音识别,提出了Dynamic Chunk Training。

U2 只能在共享编码器流式传输时进行流式传输。 在标准的 Transformer 编码器层中使用了完全自注意力。 即,如果靠下图的(a), 做不到流式传输。(a)为标准的self attention,在每个输入时刻t都需要依赖整句的输入。

针对这一问题,最简单的流式思路,限制当前时刻t只看到历史信息,不看任何未来信息,如图(b)所示,但该方案会极大的影响模型识别效果。

而另外一种常用的思路,限制当前时刻t看到有限的未来时刻信息(比如看到未来C帧信息)-----
Limited input t only see a limited right context t+ 1, t+ 2, …, t+W, where W is the right context for each encoder layer, and the total context is accumulated through all the encoder layers.
For example, if we have N encoder layers, each has W right context, the total context is N ∗ W.

在这里插入图片描述
针对于此,提出了chunk attention, 图(C)。
通过固定的块大小 C 将输入分成几个块,深绿色代表当前块,对于每个块,都有输入 [t+1, t+2, …, t+C],每个块都依赖于自身和所有之前的块。
那么编码器的整个延迟取决于块大小,这很容易控制和实现。
可以使用固定的块大小来训练模型,称之为静态块训练,并使用相同的块进行解码。
在模型训练中,Chunk的大小可以是固定的,也可以是动态调整的。

在这里插入图片描述


CTC 解码器以流式传输方式输出第一遍假设。
在输入结束时,注意力解码器使用完整的上下文注意力来获得更好的结果。
这里探讨了两种不同的模式:
1. Attention Decoder mode. -----The CTC results are ignored in this mode.
Attention Decoder generate outputs in an auto-regressive way with the attention of the output of Shared Encoder.
2. Rescoring mode.
来自 CTC 的 n 最佳假设由注意力解码器在教师强制模式下使用共享编码器的输出进行评分。 最好的重新评分假设用作最终结果。 这种模式避免了自回归过程并获得更好的实时因子。
此外,可以通过简单的方式对 CTC 分数进行加权组合以获得更好的结果。

在这里插入图片描述


题外1::
CTC靠谱链接:
https://www.cnblogs.com/liaohuiqiang/p/9953978.html
https://zhuanlan.zhihu.com/p/42719047


题外2::
SoX( Sound eXchange)是一个跨平台(Windows,Linux,MacOS 等)的命令行实用程序,可以将各种格式的音频文件转换为需要的其他格式。
SoX 还可以对输入的音频文件应用各种效果,也支持在大多数平台上播放和录制音频文件。

链接:https://www.jianshu.com/p/be8977de4a6b


题外3::
Python .mp3转.wav

from pydub import AudioSegment

wav_file = 'now.wav'

song = AudioSegment.from_mp3('2.mp3')
song.export(wav_file , format="wav")

其中AudioSegment需要装ffmpeg
不是pip install
而是下载ffmpeg的文件,里面包含bin/ffmpeg.exe,并在环境变量中配置才行;

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

语音识别-初识 的相关文章

随机推荐

  • LVM动态扩容逻辑卷详解

    LVM逻辑卷管理 简介 LVM是逻辑卷管理 Logical Volume Manager 的简称 它是Linux环境下对磁盘分区进行管理的一种机制 LVM是建立在硬盘和分区之上的一个逻辑层 来提高磁盘分区管理的灵活性 LVM最大的特点就是可
  • Openldap导入数据(一)

    在安装完openldap之后 默认ldap中是没有数据的 需要管理员进行添加 当然添加的方法也不止一种 这里先介绍第一种方法 从本地系统添加用户到ldap中 root ldapsrv01 ldapsearch x b dc contoso
  • ES查询不存在的索引,索引未创建导致查询报错

    ES查询不存在的索引 索引未创建导致查询报错 项目中的一个es索引是根据时间建立的 在对其操作时候 因时间原因此索引为创建 查询时候报如下错误 Elasticsearch exception type index not found exc
  • Swagger配置完成以后,登录账户名和密码的设置

    spring security basic path swagger ui html enabled true user name admin 账号 password 123456 密码
  • ajax长轮询tornado,数据可用时如何完成Tornado长轮询请求

    我有很长的编程背景 但对Python还不熟悉 我正在研究Tornado 以构建一个长轮询服务的原型 在 我想实现的是用户连接说example com get 1234 这是长轮询部分 1234是用户ID 目前 它只是挂起并等待内容 然后用户
  • 【从零开始的Java开发】1-2-4 Java方法

    文章目录 方法 方法分类 数组作为方法参数 方法重载 基本数据类型的传值 数组的传值 引用数据类型 可变参数列表 可变参数列表作为方法参数的重载 文档注释 方法的调试 细节与总结 方法 所谓方法 就是用来解决一类问题的代码的有序组合 是一个
  • MCU,MPU,MMU,CACHE的含义

    1 mcu和mpu CPU Central Processing Unit 中央处理器 发展出来三个分枝 一个是DSP Digital Signal Processing Processor 数字信号处理 另外两个是MCU Micro Co
  • HTML <colgroup> 标签

    实例 两个 colgroup 元素为表格中的三列规定了不同的对齐方式和样式 注意第一个 colgroup 元素横跨两列 table width 100 border 1 table
  • [138]小米笔记本怎么关闭secure boot

    关闭Secure Boot的步骤 一 关闭 快速启动 功能 1 右键 开始菜单 电源选项 进入后 点击 选择电源按钮的功能 2 进入电源选项设置后 点击 更改当前不可用的设置 再把 启用快速启动 推荐 前边的勾去掉 若没有该选择则不需要操作
  • MDK与芯片的联系

    程序执行的时候FLASH空间 code RO data 程序执行时SRAM空间 RW data ZI data 程序存储时占用空间 code RO data RW data 在目录下打开命令行窗口 按shift 鼠标右键 gt 可以将信息输
  • 区块链:Solidity值类型(Solidity 枚举Enums & 结构体Structs)

    枚举Enums 案例 pragma solidity 0 4 4 contract test enum ActionChoices GoLeft GoRight GoStraight SitStill ActionChoices choic
  • 华为OD机试 C++ 叠积木

    题目 你手里有一堆砖头 它们都有一样的宽和高 但长度不同 你想用这些砖头堆砌一堵墙 每一层墙可以只用一个砖头 也可以用两个拼接起来 但这两种情况下 每层的长度必须都是一样的 如果你想使用所有的砖头 并堆砌出尽可能多的层数 那么最多可以搭建多
  • C#(winform)调用pytorch模型

    winform调用pytorch上训练好的unet模型 项目是写一个辅助诊断系统软件 用winform写软件 调用pytorch和matlab的模型 这篇博客只包含调用pytorch模型的部分 1 c libtorch 调用模型 2 c 生
  • java使用aspose.pdf或者spire.pdf 将pdf文件转word,实测

    1 aspose pdf aspose pdf不是破解版的只能转3页 所以我弄了个破解版 aspose pdf破解版在网上都有破解方法也比较简单 这里就不说了 直接引入破解版的jar包 在这里我用的是aspose pdf 21 11 jar
  • Qt第四十五章:QComboBox 禁止滚轮

    很简单 直接反射将QComboBox的wheelEvent方法重置掉即可 self combo box QComboBox self setattr self combo box wheelEvent lambda a None
  • 车联网Apollo(阿波罗),研究carlife车机端集成及开发,(WeLink,carplay/carlife)

    Apollo 阿波罗 是携程框架部门研发的分布式配置中心 能够集中化管理应用不同环境 不同集群的配置 配置修改后能够实时推送到应用端 并且具备规范的权限 流程治理等特性 适用于微服务配置管理场景 https github com ctrip
  • C语言提取一列数据并保存

    c语言求教 txt文档只有一列数据但是有很多 需要把它提取出来 每1024个数保存在一个文件中 求大神指教 c语言
  • 什么时候需要使用引用?使用引用的好处是什么?

    作者 谢之易 链接 https www zhihu com question 34267829 answer 58414818 来源 知乎 著作权归作者所有 商业转载请联系作者获得授权 非商业转载请注明出处 记忆里 C 的设计与演化 一书提
  • 【华为机试真题 Python实现】仿 LISP 运算【2022 Q1 Q2

    题目描述 LISP 语言唯一的语法就是括号要配对 形如 OP P1 P2 括号内元素由单个空格分割 其中第一个元素 OP 为操作符 后续元素均为其参数 参数个数取决于操作符类型 注意 参数 P1 P2 也有可能是另外一个嵌套的 OP P1
  • 语音识别-初识

    ASRT https blog ailemon net 2018 08 29 asrt a chinese speech recognition system ASR Automatic Speech Recognition Paddle