音频筑基:时延、帧长选取的考量

音频筑基:时延、帧长选取的考量

音频算法中,时延和音频帧长的选择通常是个需要平衡的参数,这里分析下背后的考量因素。

帧长与时延的关系


一般来说,帧长是音频算法端到端时延的子集,是时延的组成元素,所以,帧长越长,时延越大。

那为啥会有音频帧长的概念呢?原因是一般会做分块频域变换,根据音频信号的短时平稳性(10-30ms,信号是周期重复的),从而进行分块分帧做短时傅里叶变换,于是有了帧长的概念。

时延指标里的那个why

那时延是啥?之前文章有讲,简单说,就是音频信号从发出到接收经历的时间延迟。过长的延迟带给人体验就是有卡顿感,而人耳对时延的敏感性是有范围的:

  • 人耳对端到端(嘴到耳的时延)

    • <150ms不会有明显感知
      • <50ms可能感知不大
      • 50~100ms之间可能轻微感知
      • 100~200ms可感知
    • >200ms能明显感知
    • >400ms会无法忍受
  • 蓝牙传输链路

    • 普通人对于80ms以下的声音延迟是没有知觉的
    • 经过听力专门训练的人员可识别50ms左右的延迟,例如专业电竞人员
    • 几乎没有人能识别35ms以下声音延迟

帧长变化的影响


以音频编解码为例,见下面描述:

First, the audio is sampled. Perceptual coding requires a codec to look at multiple, consecutive samples, as a lot of the opportunities for compression come from identifying periods of repeated sound (or lack of sound). This means that most codecs need to capture sufficient, successive samples to have enough data to characterise these changes. This period of sampling is called a frame.

Different encoding techniques use different frame lengths, but it's almost always a fixed duration. If it's too short, the limited number of samples starts to reduce the efficiency of the codec, as it doesn't have enough information to apply the perceptual coding techniques, which impacts the quality. On the other hand, if the frame sizes grow, the quality improves, but the latency increases, as the codec has to wait longer to collect each frame of audio data.

------《Introducing-Bluetooth-LE-Audio-book》

帧长选取里的那个why

语音短时平稳性是在10-30ms这个区间有效,从下图可以看出,从编码质量和时延两个维度综合看,频域编解码最佳帧长是10ms及以上,5ms短帧的低码率编码就不太占优势。

参考资料


  1. Introducing-Bluetooth-LE-Audio-book.pdf, link
相关推荐
EasyCVR10 小时前
实时音视频通信/WebRTC音视频开发不用自研!EasyRTC把音视频嵌入式WebRTC原生SDK做好了!
音视频·webrtc·实时音视频
宇的出海纪元11 小时前
一条长视频怎么复用成五个平台的内容?
音视频·视频
ck01357914 小时前
网课视频太长怎么整理?通过视频修剪和片段提取制作学习资料
图像处理·人工智能·测试工具·音视频·视频
TST-魚爷15 小时前
腾讯会议搭配一体化全向麦,音频快速设置教程-易视讯
服务器·windows·音视频·腾讯会议·zoom会议
开开心心就好16 小时前
电脑小毛病修复工具,不用重装系统了
智能手机·pdf·电脑·word·音视频·laravel·perl
Android系统攻城狮16 小时前
FFmpeg深度解析之av_frame_get_buffer:如何为AVFrame分配缓冲区?(八十四)
linux·ffmpeg·音视频·车载音频·ffmpeg音视频进阶
hai_android17 小时前
从导入视频到上屏出声:Android + FFmpeg 播放器全流程拆解
android·flutter·ffmpeg·kotlin·android studio·音视频·android jetpack
魔众17 小时前
AIGCPanel 升级 MuseTalk:一键装好,视频就能对口型
音视频
jinlong060318 小时前
雪亮 / 政务 / 公安等项目国标GB28181级联视频汇聚平台LiveGBS的功能简介和使用介绍
音视频·视频回放·gb28181监控平台·监控汇聚·国标录像·安防录像
hz567891 天前
音视频SDK集成教程:快速实现一对一通话与多人会议
安全·音视频·实时音视频·信息与通信