PCM 音频幅度值? [英] PCM audio amplitude values?

查看:57
本文介绍了PCM 音频幅度值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始使用 Android 智能手机进行录音.

I am starting out with audio recording using my Android smartphone.

我成功地将录音保存到 PCM 文件中.当我解析数据并打印出带符号的 16 位值时,我可以创建如下图所示的图形.但是,我不理解沿 y 轴的幅度值.

I successfully saved voice recordings to a PCM file. When I parse the data and print out the signed, 16-bit values, I can create a graph like the one below. However, I do not understand the amplitude values along the y-axis.

  1. 幅度值的单位究竟是什么?这些值是有符号的 16 位,因此它们的范围必须从 -32K 到 +32K.但是这些值代表什么?分贝?

  1. What exactly are the units for the amplitude values? The values are signed 16-bit, so they must range from -32K to +32K. But what do these values represent? Decibels?

如果我使用 8 位值,那么这些值的范围必须在 -128 到 +128 之间.这将如何映射到 16 位值的音量/响度"?您会只使用 16 比 1 的量化映射吗?

If I use 8-bit values, then the values must range from -128 to +128. How would that get mapped to the volume/"loudness" of the 16-bit values? Would you just use a 16-to-1 quantisation mapping?

为什么会有负值?我认为完全沉默会导致值为 0.

Why are there negative values? I would think that complete silence would result in values of 0.

如果有人可以将我指向一个包含正在录制内容的信息的网站,我将不胜感激.我在 PCM 文件格式上找到了 网页,但没有找到数据值是什么.

If someone can point me to a website with information on what's being recorded, I would appreciate it. I found webpages on the PCM file format, but not what the data values are.

推荐答案

想想麦克风的表面.当它安静时,表面在零位置不动.当你说话时,这会导致你嘴巴周围的空气振动.振动就像弹簧一样,在两个方向上都有运动,如前后、上下或进出.空气中的振动也会导致麦克风表面振动,就像上下移动一样.当它向下移动时,可能被测量或采样为正值.当它向上移动时,可能会被采样为负值.(也可能相反.)当你停止说话时,表面会回到零位置.

Think of the surface of the microphone. When it's silent, the surface is motionless at position zero. When you talk, that causes the air around your mouth to vibrate. Vibrations are spring like, and have movement in both directions, as in back and forth, or up and down, or in and out. The vibrations in the air cause the microphone surface to vibrate as well, as in move up and down. When it moves down, that might be measured or sampled a positive value. When it moves up that might be sampled as a negative value. (Or it could be the opposite.) When you stop talking the surface settles back down to the zero position.

您从 PCM 录音数据中获得的数字取决于系统的增益.对于常见的 16 位样本,范围是从 -32768 到 32767,以获得最大可能的振动偏移,可以记录而不会失真、削波或溢出.通常增益设置得低一点,这样最大值就不会在失真的边缘.

What numbers you get from your PCM recording data depend on the gain of the system. With common 16 bit samples, the range is from -32768 to 32767 for the largest possible excursion of a vibration that can be recorded without distortion, clipping or overflow. Usually the gain is set a bit lower so that the maximum values aren't right on the edge of distortion.

添加:

8 位 PCM 音频通常是无符号数据类型,范围为 0..255,值为 128 表示静音".因此,您必须添加/减去此偏差,并按比例缩放约 256 以在 8 位和 16 位音频 PCM 波形之间进行转换.

8-bit PCM audio is often an unsigned data type, with the range from 0..255, with a value of 128 indicating "silence". So you have to add/subtract this bias, as well as scale by about 256 to convert between 8-bit and 16-bit audio PCM waveforms.

这篇关于PCM 音频幅度值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆