iPhone 上即时语音播放的最佳 API?
我想做的事情:
- iPhone就继续监听语音输入通道
- 一旦用户说话(录音音量>一定级别),
- 一旦用户停止说话(录音音量静音一秒), iPhone就开始录音
- (录音音量静音一秒)
- iPhone回放录音
哪个iPhone我应该研究 API 或示例代码吗?谢谢!
What I am trying to do:
- iPhone keep monitoring the voice input channel
- once the user speaks (recording sound volume > certain level)
- iPhone starts recording
- once the use stop speaking (recording volume silence for one second)
- iPhone plays back the recording
Which iPhone API or sample code should I look into? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你需要的是 AVFoundation。要使用它:
以下代码用于录制:
另外,您需要实现 - (void)audioRecorderDidFinishRecording:(AVAudioRecorder *) 记录器成功:(BOOL)标志释放记录器。
请在此处查看更多详细信息:http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/00_Introduction.html#//apple_ref/doc/uid/TP40010188
What you need is AVFoundation. To use it:
Following piece of code is for recording:
Addtionally, you need to implement - (void)audioRecorderDidFinishRecording:(AVAudioRecorder *) recorder successfully:(BOOL)flag to release the recorder.
Please see more details here: http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/00_Introduction.html#//apple_ref/doc/uid/TP40010188