封锁记忆

封锁记忆

0个粉丝

39

问答

0

专栏

1

资料

封锁记忆  发布于  2018-08-06 13:46:10
采纳率 0%
39个问答
3255

关于海思3519音频开启AEC出错的问题

 
海思3519音频开启AEC之后,出错,logmpp打印如下:

[code]~ # cat /dev/log2000/01/07 22:03:43.272011 [DSP][Error][Src/common/audio/sampleHisi.c/HI_PcmAiImport-1843]: HI_MPI_AI_GetFrame(0, 0) failed 0xa0158009!
~ # cat /dev/logmpp
3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!
<3>[    ai] [Func]:AIGetChnData [Line]:490 [Info]:<3>[    ai] AI chn 0 get aec frame failed!
<3>[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)![/code];

出错打印: 2000/01/07 22:04:51.608846 [DSP][Error][Src/common/audio/sampleHisi.c/HI_PcmAiImport-1843]: HI_MPI_AI_GetFrame(0, 0) failed 0xa0158009!
common/audio/sampleHisi.c/HI_PcmAiImport-1843]: HI_MPI_AI_GetFrame(0, 0) failed 0xa0158009!
common/audio/sampleHisi.c/HI_PcmAiImport-1843]: HI_MPI_AI_GetFrame(0, 0) failed 0xa0158009!
common/audio/sampleHisi.c/HI_PcmAiImport-1843]: HI_MPI_AI_GetFrame(0, 0) failed 0xa0158009!
common/audio/sampleHisi.c/HI_PcmAiImport-1843]: HI_MPI_AI_GetFrame(0, 0) failed 0xa0158009!
common/audio/sampleHisi.c/HI_PcmAiImport-1843]: HI_MPI_AI_GetFrame(0, 0) failed 0xa0158009!
common/audio/sampleHisi.c/HI_PcmAiImport-1843]: HI_MPI_AI_GetFrame(0, 0) failed 0xa0158009!
common/audio/sampleHisi.c/HI_PcmAiImport-1843]: HI_MPI_AI_GetFrame(0, 0) failed 0xa0158009!
common/audio/sampleHisi.c/HI_PcmAiImport-1843]: HI_MPI_AI_GetFrame(0, 0) failed 0xa0158009!
common/audio/sampleHisi.c/HI_PcmAiImport-1843]: HI_MPI_AI_GetFrame(0, 0) failed 0xa0158009!
  错误码0xa0158009是操作不允许,

cat /proc/ummap/vi打印如下:
~ # cat /proc/umap/ai

[AI] Version: [Hi3519V101_MPP_V2.0.3.0 B060 Release], Build Time: [May 13 2017, 17:40:55]


-----AI DEV ATTR----------------------------------------------------------------
AiDev WorkMod   SampR  BitWid  ChnCnt  ClkSel SoundMod  PoiNum  ExFlag  FrmNum
    0 i2s_mas   16kHZ   16bit       1       0     mono     320       1      30

-----AI DEV STATUS0-------------------------------------------------------------
AiDev     IntCnt    fifoCnt    buffInt FrmTime MaxFrmTime TranLen IsrTime
    0       1431          0          0   19996      22067     640     122

-----AI DEV STATUS1-------------------------------------------------------------
AiDev MaxIsrTime      CBPhy  CBSize    ROffSet    WOffSet
    0        192   a0a6e000    1920          0          0

-----AI DEV EXTEND STATUS-------------------------------------------------------
AiDev enTrack   bMute  Volume
    0       3       N       0

-----AI CHN STATUS--------------------------------------------------------------
AiDev   AiChn   State    Read   Write     BufFul UsrQueLost UsrFrmDepth   u32Data0   u32Data1    UserGet    UserRls
    0       0  enable       0       0          0       1350          30    7d407d4    b770b77         52         52

-----AI CHN RESAMPLE STATUS-----------------------------------------------------
AiDev AiChn   State  bResmp  PoiNum   InSampR  OutSampR
    0     0  enable       Y     320     16kHZ      8kHZ

-----AI CHN VQE STATUS0---------------------------------------------------------
AiDev AiChn   State bVqe workmod    RATE  PoiNum GainVol bAnr bAgc  bEq bHpf bAec bRnr bHdr bDrc bPeq  WrFile
    0     0  enable    Y    comm    8kHZ    4096       0    N    Y    N    N    Y    N    N    N    N       N

-----AI CHN VQE STATUS1---------------------------------------------------------
AiDev AiChn   State    bAgc bUsrmod NoiseSupSwi AdjustSpeed ImproveSNR MaxGain NoiseFloor OutputMode TargetLevel  UseHPF
    0     0  enable       Y       N           1          10          0      15        -65          0          -1       0

-----AI CHN VQE STATUS2---------------------------------------------------------
AiDev AiChn   State    bAec bUsrmod CngMode DTHnlStQTh NrAlPsEngy NrClnSupEngy   AecAo AecFail
    0     0  enable       Y       N    open      16384          1            0 ( 0, 0)    1431

-----AI CHN VQE STATUS3---------------------------------------------------------
AiDev AiChn   State    bAec bUsrmod VcPrtctFrqL VcPrtctFrqL1 EcoBndLow EcoBndHgh EcoBndLow2 EcoBndHgh2
    0     0  enable       Y       N           3            6        10        41         47         63

-----AI CHN VQE STATUS4---------------------------------------------------------
AiDev AiChn   State    bAec bUsrmod  ERLBND[0]  ERLBND[1]  ERLBND[2]  ERLBND[3]  ERLBND[4]  ERLBND[5]
    0     0  enable       Y       N          4          6         36         49         50         51

-----AI CHN VQE STATUS5---------------------------------------------------------
AiDev AiChn   State    bAec bUsrmod  ERL[0]  ERL[1]  ERL[2]  ERL[3]  ERL[4]  ERL[5]  ERL[6]
    0     0  enable       Y       N       7      10      16      10      18      18      18
看打印正常,

cat /proc/ummap/vo 打印如下:
~ # cat /proc/umap/ao

[AO] Version: [Hi3519V101_MPP_V2.0.3.0 B060 Release], Build Time: [May 13 2017, 17:40:55]


-----AO DEV ATTR----------------------------------------------------------------
AoDev WorkMod   SampR  BitWid  ChnCnt  ClkSel SoundMod  PoiNum  ExFlag  FrmNum
    0 i2s_mas    8kHZ   16bit       1       0     mono     640       1      30

-----AO DEV STATUS0-------------------------------------------------------------
AoDev     IntCnt    fifoCnt    buffInt FrmTime MaxFrmTime TranLen IsrTime
    0       7158          0          0   80000      80177    1280      11

-----AO DEV STATUS1-------------------------------------------------------------
AoDev MaxIsrTime      CBPhy  CBSize    ROffSet    WOffSet
    0         21   a169a000    3840          0        a00

-----AO DEV EXTEND STATUS-------------------------------------------------------
AoDev enTrack   bMute  Volume
    0       0       N       0

-----AO CHN STATUS--------------------------------------------------------------
AoDev   AoChn   State    Read   Write      BufEmp  u32Data0  u32Data1  bResmp  PoiNum InSampR  OutSampR
    0       0  enable       0       0        7158         0         0       N       0  (null)    (null)

-----AO CHN VQE STATUS0---------------------------------------------------------
AoDev AoChn   State bVqe workmod    RATE  PoiNum bAnr bAgc  bEq bHpf  WrFile
    0     0  enable    N    comm  (null)       0    N    N    N    N       N
也是正常的;

各位,现在这个问题应该从哪方面下手分析那?
我来回答
回答8个
时间排序
认可量排序

zhuangweiye

8个粉丝

0

问答

0

专栏

0

资料

zhuangweiye 2018-08-06 14:18:41
认可0
本帖最后由 zhuangweiye 于 2018-8-6 14:36 编辑

"[    ao] [Func]:AoGetData [Line]:235 [Info]:<3>[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame size(640)!"

意思是ai和ao的stAioAttr.u32PtNumPerFrm 要一样, 楼主的ao是640, ai是320不匹配

封锁记忆

0个粉丝

39

问答

0

专栏

1

资料

封锁记忆 2018-08-06 14:27:29
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=102717&ptid=51562]zhuangweiye 发表于 2018-8-6 14:18[/url]
"[    ao] [Func]:AoGetData [Line]:235 :[    ao] Ao(0, 0) frame size(1280) is not equal to Ai frame ...[/quote]

if (SUCCESS != (ret = HI_MPI_AI_GetFrame(speech->device,speech->channel, &aiFrame, &aiAecFrame, -1)))

printf("sdsszk->HI_MPI_AI_GetFrame size: %d, Bitwidth: %d\n", aiFrame.u32Len, aiFrame.enBitwidth);这个打印是ai的帧长度:640;
ao的现在是1280,我要设置成640就可以了吗?怎么设置啊,

zhuangweiye

8个粉丝

0

问答

0

专栏

0

资料

zhuangweiye 2018-08-06 14:39:18
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=102720&ptid=51562]封锁记忆 发表于 2018-8-6 14:27[/url]
if (SUCCESS != (ret = HI_MPI_AI_GetFrame(speech->device,speech->channel, &aiFrame, &aiAecFrame, -1 ...[/quote]

1280是framesize, 和每点的bit数有关

楼主看一下代码 HI_MPI_AO_SetPubAttr(xxx, &stAioAttr)
其中stAioAttr.u32PtNumPerFrm设成320即可

封锁记忆

0个粉丝

39

问答

0

专栏

1

资料

封锁记忆 2018-08-06 15:03:40
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=102723&ptid=51562]zhuangweiye 发表于 2018-8-6 14:39[/url]
1280是framesize, 和每点的bit数有关

楼主看一下代码 HI_MPI_AO_SetPubAttr(xxx, &stAioAttr)
[/quote]

谢庄工,果然好了。
但是不明白一点,这个怎么和每点的bit有关那?文档没找到相关说明啊

zhuangweiye

8个粉丝

0

问答

0

专栏

0

资料

zhuangweiye 2018-08-06 15:23:14
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=102733&ptid=51562]封锁记忆 发表于 2018-8-6 15:03[/url]
谢庄工,果然好了。
但是不明白一点,这个怎么和每点的bit有关那?文档没找到相关说明啊[/quote]

framesize是buffer长度,使按byte来算

一帧audio数据一般来说是按采样点来算(很容易换算成时间长度), 而每个采样点是多少bits一般也要设, 楼主的例子是每个采样点16bits, 即2bytes

封锁记忆

0个粉丝

39

问答

0

专栏

1

资料

封锁记忆 2018-08-06 15:51:44
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=102735&ptid=51562]zhuangweiye 发表于 2018-8-6 15:23[/url]
framesize是buffer长度,使按byte来算

一帧audio数据一般来说是按采样点来算(很容易换算成时间长度),  ...[/quote]

好的,还有个问题;
平台3519,现在是MICIN,开启降噪功能,其中语音降噪和回音消除都打开了,但是现在还是有很大的噪声,有什么调试的方向吗
附件是PCM文件。前边是没有开webde ,后边是打开web之后的,就有噪音了。

zhuangweiye

8个粉丝

0

问答

0

专栏

0

资料

zhuangweiye 2018-08-06 17:09:16
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=102738&ptid=51562]封锁记忆 发表于 2018-8-6 15:51[/url]
好的,还有个问题;
平台3519,现在是MICIN,开启降噪功能,其中语音降噪和回音消除都打开了,但是现在 ...[/quote]

分段录音, 看看哪个环节引入的

gsgui

0个粉丝

12

问答

0

专栏

0

资料

gsgui 2018-08-08 16:22:15
认可0
好帖。。。顶起来:victory:
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
相关问答
无更多相似问答 去提问
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区