AVSpeechSynthesizer spoken text is being listened by the AVAudioSession record. How to ignore audio output from AVSpeechSynthesizer when recording

半世苍凉 提交于 2021-01-04 12:32:35

问题


My startRecording function sets up an AVAudioSession for record, which is called on pressing a mic button.

Before pressing the mic I am using an AVSpeechSynthesizer to speak some text. If I press the record button before the AVSpeechSynthesizer speech ends that speech is being recorded by AVAudioSession.

How do I ignore the speech spoken by my AVSpeechSynthesizer and just record speech speaken by the user through a microphone?

来源:https://stackoverflow.com/questions/61260287/avspeechsynthesizer-spoken-text-is-being-listened-by-the-avaudiosession-record

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!