跳到内容
🛠️ToolsShed

Sound Level Converter

在dBm、dBu、dBV、dBW和dBSPL等音频电平单位之间转换。

电声电平

dBm0 dBm = 1 mW (into 600 Ω = 0.775 V)
0
dBu0 dBu = 0.775 V ≈ 1 mW into 600 Ω
0
dBV0 dBV = 1 V (−2.21 dBu)
-2.2185
dBW0 dBW = 1 W = 30 dBm
-30

声学声压级 (SPL)

注意:SPL 使用不同的参考值 (20 µPa),无法转换为电声单位。

Pascal (Pa)
1.0024 Pa
dBSPL声源
0Threshold of hearing
20Rustling leaves
40Quiet room
60Normal conversation
80Busy traffic
94Typical SPL measurement reference
110Rock concert front row
120Jet engine at 100m
140Threshold of pain

关于此工具

声音级别测量在音频工程、声学和通信领域中至关重要,不同的单位相对于参考标准表示功率、电压或压力。此转换器可帮助您在dBm(参考1毫瓦)、dBu(参考0.775伏)、dBV(参考1伏)、dBW(参考1瓦)和dBSPL(声压级,人类感知的响度)之间无缝转换。在使用音频设备、设计声音系统或分析声学环境时,理解这些转换至关重要。

使用此工具非常简单:选择要转换的单位,输入数值,选择目标单位,转换器会立即计算等效值。例如,音频工程师在将消费者音频设备与专业设备集成时,经常需要在dBm和dBV之间进行转换,而声学家使用dBSPL来量化从安静办公室到工业场所等各种环境中的噪音水平。该工具处理这些转换背后复杂的对数数学,无需手动计算或查表。

请注意,这些单位在不同领域有不同的用途——dBSPL专门用于人耳感知的声压,而dBm、dBu、dBV和dBW是音频电路和信号传输中常用的电功率或电压测量。转换器假设标准参考值和线性频率响应,因此对于稳态信号最准确,可能不会考虑实际音频设备的频率相关特性。

常见问题

代码实现

import math

# Audio level unit conversions (electrical, 600Ω reference)
# All conversions go through watts as base

def dbm_to_watts(dbm: float) -> float:
    return 0.001 * 10 ** (dbm / 10)

def watts_to_dbm(w: float) -> float:
    return 10 * math.log10(w / 0.001)

def dbu_to_watts(dbu: float, impedance: float = 600) -> float:
    volts = 0.7746 * 10 ** (dbu / 20)
    return volts ** 2 / impedance

def watts_to_dbu(w: float, impedance: float = 600) -> float:
    volts = math.sqrt(w * impedance)
    return 20 * math.log10(volts / 0.7746)

def dbv_to_watts(dbv: float, impedance: float = 600) -> float:
    volts = 1.0 * 10 ** (dbv / 20)
    return volts ** 2 / impedance

def watts_to_dbv(w: float, impedance: float = 600) -> float:
    volts = math.sqrt(w * impedance)
    return 20 * math.log10(volts / 1.0)

def dbw_to_watts(dbw: float) -> float:
    return 10 ** (dbw / 10)

def watts_to_dbw(w: float) -> float:
    return 10 * math.log10(w)

# SPL conversions (acoustic, different domain)
def dbspl_to_pa(dbspl: float) -> float:
    return 20e-6 * 10 ** (dbspl / 20)

def pa_to_dbspl(pa: float) -> float:
    return 20 * math.log10(pa / 20e-6)

# Convert from dBm to all electrical units
dbm_in = 0  # 0 dBm
w = dbm_to_watts(dbm_in)
print(f"Input: {dbm_in} dBm")
print(f"  dBW:  {watts_to_dbw(w):.4f}")
print(f"  dBu:  {watts_to_dbu(w):.4f}")
print(f"  dBV:  {watts_to_dbv(w):.4f}")
print(f"  dBm:  {watts_to_dbm(w):.4f}")

# SPL reference level
print(f"\n94 dBSPL = {dbspl_to_pa(94):.4f} Pa")
print(f"20 µPa = {pa_to_dbspl(20e-6):.1f} dBSPL (threshold of hearing)")

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.