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

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

问题描述

我用我的Andr​​oid智能手机开始接触录音。

我成功保存录音到PCM文件。当我分析数据,并打印出签约,16位值,我可以创建一个类似下面的图。 但是,我不明白沿y轴的振幅值。

  1. 究竟是什么单位的幅度值?这些值是有符号16位,所以他们必须的范围从-32K到+ 32K。但做这些价值观重新present?分贝?

  2. 如果我用8位值,那么值范围必须在-128到+128。如何将其映射为16位值的体积/响度?你只用一个16比1的量化映射?

  3. 为何会出现负值?我认为,完全的沉默将导致0值。

如果有人能指出我在什么被记录下来,我就AP preciate它带有信息的网站。我发现网页的PCM文件格式,而不是数据的值是什么。

解决方案

想想麦克风的表面。当它的沉默,表面上是一动不动的位置为零。当你谈论,导致嘴巴周围的空气振动。振动是弹簧等,以及具有在两个方向上运动,如在来回,或上下,或和缩小。在空气中的振动会造成麦克风表面振动,以及,在上下移动。当它向下移动,这可能是测量或采样正值。当它向上移动可能被采样为负值。 (或者也可能是相反的。)当你停止交谈表面落户回落到零位。

什么号码你从PCM录音数据的获取依赖于系统的增益。与常见的16位抽样,范围是从-32768到32767,能够不失真,削波或溢流被记录的振动的最大可能偏移。一般增益设置低一点使得最大值不正确的失真的边缘。

增加:

8位PCM音频常常是一个无符号的数据类型,与来自0..255的范围内,以128的值指示沉默。所以,你必须添加/约256减去这个偏差,以及规模为8位和16位PCM音频波形之间进行转换。

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

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. 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?

  2. 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?

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

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.

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.

ADDED:

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天全站免登陆