因为需要编写某手机平台上的语音拨号软件,需要先解码 AMR 文件,下面先列出 AMR 编码方式,这对应 Speech Frame 中的 FT 标志位(共 4 Bits):
Mode 0 - AMR 4.75 - Encodes at 4.75kbit/s
Mode 1 - AMR 5.15 - Encodes at 5.15kbit/s
Mode 2 - AMR 5.9 - Encodes at 5.9kbit/s
Mode 3 - AMR 6.7 - Encodes at 6.7kbit/s
Mode 4 - AMR 7.4 - Encodes at 7.4kbit/s
Mode 5 - AMR 7.95 - Encodes at 7.95kbit/s
Mode 6 - AMR 10.2 - Encodes at 10.2kbit/s
Mode 7 - AMR 12.2 - Encodes at 12.2kbit/s
8~15位一些 noise frames 和保留位的定义。
每种格式对应的帧的大小如下。
CMR Mode Frame size (bytes)
0 AMR 4.75 13
1 AMR 5.15 14
2 AMR 5.9 16
3 AMR 6.7 18
4 AMR 7.4 20
5 AMR 7.95 21
6 AMR 10.2 27
7 AMR 12.2 32
Mode 0 - AMR 4.75 - Encodes at 4.75kbit/s
Mode 1 - AMR 5.15 - Encodes at 5.15kbit/s
Mode 2 - AMR 5.9 - Encodes at 5.9kbit/s
Mode 3 - AMR 6.7 - Encodes at 6.7kbit/s
Mode 4 - AMR 7.4 - Encodes at 7.4kbit/s
Mode 5 - AMR 7.95 - Encodes at 7.95kbit/s
Mode 6 - AMR 10.2 - Encodes at 10.2kbit/s
Mode 7 - AMR 12.2 - Encodes at 12.2kbit/s
8~15位一些 noise frames 和保留位的定义。
每种格式对应的帧的大小如下。
CMR Mode Frame size (bytes)
0 AMR 4.75 13
1 AMR 5.15 14
2 AMR 5.9 16
3 AMR 6.7 18
4 AMR 7.4 20
5 AMR 7.95 21
6 AMR 10.2 27
7 AMR 12.2 32