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: 有符号整数线性PCMPCM_U: 无符号整数线性PCMPCM_F: 浮点数线性PCMFLAC: Flac,无损音频编码ULAW: Mu-lawALAW: A-lawMP3: MP3,MPEG-1音频层IIIVORBIS: OGG VorbisAMR_WB: 自适应多速率AMR_NB: 自适应多速率宽带OPUS: OpusHTK: 单通道16位PCMUNKNOWN: 以上均不是