简体   繁体   English

录制音频时捕获,停止接收音频AVAudioRecorder

[英]Capture when recording audio, stops to receiving audio AVAudioRecorder

There is a talking cat app well known for iOS devices, in which you speak your voice and he repeats. 有一个以iOS设备而闻名的会说话的猫应用程序,您可以说出自己的声音,然后他会重复说话。 Analyzing this app, you'll see that it stops talking when you stop talking, that is, it stops to capture the audio when not receive another voice. 分析此应用程序,您会发现它在停止讲话时停止讲话,也就是说,在没有收到其他声音时它停止捕获音频。

I was giving a analyzing the methods of AVAudioRecorder class, and not found any method in which to capture when the User stop to talking or recorder stops to receive external audio. 我正在对AVAudioRecorder类的方法进行分析,但没有找到当用户停止交谈或录音机停止接收外部音频时要捕获的任何方法。

How can I capture when the audio recorder stops to receiving audio. 录音机停止接收音频时如何捕获。

Process the audio stream as it is coming through. 在音频流通过时对其进行处理。 You can look at the frequency and volume of the stream. 您可以查看流的频率和音量。 From there you can determine if the user has stopped talking. 您可以从那里确定用户是否已停止通话。

I suggest frequency and volume as the recorder still picks up background audio. 我建议使用频率和音量,因为录音机仍会接收背景音频。 If the volume drops dramatically then the sounds the recorder is picking up must be further away from the device than before. 如果音量急剧下降,则录音机拾音的声音必须比以前更远离设备。 The frequency can also lend itself to: 该频率还可以使自己:

A.) Filter out the background audio in the audio used to replay the audio with a pitch change or any other changes. A.)滤除音频中的背景音频,该音频用于在音高变化或其他任何变化的情况下重放音频。 etc. B.) I do not know the limits of frequency for the average human. B.)我不知道普通人的频率限制。 But this covers the use case where the user has stopped talking, but have moved the device in such a way that the recorder still picks up load shuffling from moving fingers near the mic. 但这涵盖了用户停止讲话但以某种方式移动设备的情况,即录音机仍能从靠近麦克风的移动手指中拾取负载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM