paddleaudio.backends.common 模块

class paddleaudio.backends.common.AudioInfo(sample_rate: int, num_frames: int, num_channels: int, bits_per_sample: int, encoding: str)[来源]

基础: object

信息函数的返回值。

这个类被"sox_io" 后端"soundfile" 使用新接口的后端使用。

Variables:
  • sample_rate (int) -- 采样率

  • num_frames (int) -- 帧数

  • num_channels (int) -- 通道数量

  • bits_per_sample (int) -- 每个样本的位数。对于有损格式,此值为0,或当无法准确推断时。

  • 编码 (字符串) --

    音频编码 编码可以取以下值之一:

    • PCM_S: 有符号整数线性PCM

    • PCM_U: 无符号整数线性PCM

    • PCM_F: 浮点数线性PCM

    • FLAC: Flac,无损音频编码

    • ULAW: Mu-law

    • ALAW: A-law

    • MP3 : MP3,MPEG-1音频层III

    • VORBIS: OGG Vorbis

    • AMR_WB: 自适应多速率

    • AMR_NB: 自适应多速率宽带

    • OPUS: Opus

    • HTK: 单通道16位PCM

    • UNKNOWN : 以上均不是