iOS后台语音识别 reset category
wooask 发布于2017-12 浏览:2956 回复:6
0
收藏

语音识别被别的音乐占用后,再次使用  报[setAudioCategoryWithError] reset category from: AVAudioSessionCategoryPlayback to: AVAudioSessionCategoryPlayAndRecord.

能不能告知哪一个API是切换,前台使用的时候没问题,但是后台使用会报该错误。  急急急,TKS

 

[DEBUG][bds_EventManagerAsr.cpp:471]start sn=CEC1BB46-9A3E-471C-A497-2E4153059C37

2017-12-11 18:20:34.474411+0800 TradeEhome_v3[11310:2622361] [setAudioCategoryWithError] check category

2017-12-11 18:20:34.476870+0800 TradeEhome_v3[11310:2622361] [setAudioCategoryWithError] reset category from: AVAudioSessionCategoryPlayback to: AVAudioSessionCategoryPlayAndRecord.

[ERROR][bds_AudioRecorder_iOS_Impl.mm:240][prepareRecorder setActive failed, desc:NSOSStatusErrorDomain, code:560557684]

[DEBUG][bds_EventManagerAsr.cpp:936]vr_handler work_status=0, encoded_err=0, err_desc=, need_finish=0, need_stop=0, need_loop=0

[DEBUG][bds_EventManagerAsr.cpp:937]vr_handler m_has_cancelled=0, m_need_cancelled_callback=0

[DEBUG][bds_EventManagerAsr.cpp:1031]Encounter error: MIC ERR: audio queue start failed.--560557684

[DEBUG][bds_EventManagerAsr.cpp:936]vr_handler work_status=8, encoded_err=655361, err_desc=MIC ERR: audio queue start failed.--560557684, need_finish=1, need_stop=0, need_loop=0

[DEBUG][bds_EventManagerAsr.cpp:937]vr_handler m_has_cancelled=0, m_need_cancelled_callback=0

[DEBUG][bds_EventManagerAsr.cpp:654]1cancel_internal m_vr_is_running=1

[DEBUG][bds_EventManagerAsr.cpp:660]2cancel_internal m_vr_is_running=0

[INFO][bds_EventManagerDec_Chunk.cpp:227][EventManagerDecChunk::cancel]user_cancel - false

收藏
点赞
0
个赞
共6条回复 最后由用户已被禁言回复于2022-04
#7洛阳如是回复于2019-08

[[AVAudioSession sharedInstance]setCategory:AVAudioSessionCategoryPlayAndRecord error:&error];

0
#6用户已被禁言回复于2019-03
#5 134******72回复
解决了两年也没有解决吗?

您好,你也有类似的问题吗?请详细描述下。

0
#5134******72回复于2019-03

解决了两年也没有解决吗?

0
#4134******72回复于2019-03

沙雕一样的百度

0
#3新到不能再新回复于2018-02

解决了没

0
#2用户已被禁言回复于2017-12

您好,感谢您使用百度AI社区,如果有志同道合的小伙伴遇到过相似问题并解决了会给您答复,同时我们也内部再跟进您这个问题,会尽快给您具体答复

0
TOP
切换版块