就是这么简单。
当您使用 SpeakHere 示例时,它应该在 iPhone 上的某个位置创建一个文件,其中包含录音中的数据。
有谁知道我怎样才能找到这个?
谢谢!
编辑1
明确地说,我想在我的应用程序中对 wav 文件进行操作。我有一些代码需要 wav 文件的 URL。 SpeakHere 示例中的内容是什么? (请记住,这一切都在同一个应用程序中)。
编辑2
我很欣赏@sudo rm -rf 的建议,但我真的很想坚持使用 SpeakHere 示例,因为它很好地满足了我的目的。你看过AQRecorder.mm中的mRecordFile变量吗?会是这样吗?
It is as simple as that.
When you use the SpeakHere example it should create a file somewhere on the iPhone that contains the data from the recording.
Does anyone know how I can find this?
Thanks!
EDIT 1
To be clear, I want to do operations on the wav file within my application. I have some code that needs the URL of a wav file. What would that be in the SpeakHere example? (Keep in mind this is all within the same app).
EDIT 2
I appreciate the suggestion @sudo rm -rf, but I would really like to stick to the SpeakHere example as it serves my purpose well. Have you looked at the mRecordFile variable in AQRecorder.mm? Could that be it?
发布评论
评论(2)
好吧,我尝试了该应用程序,看起来它甚至没有将其保存到磁盘(它应该位于 Documents 目录中);我不确定它是如何保持的。也许在记忆中?不管怎样,如果我是你,我不会使用该示例代码来录制音频。它适用于 iOS 2,并且已经过时了。尝试访问这个问题并阅读关于如何使用
AVAudioRecorder
。编辑:
找到将音频文件保存到
recordedFile.caf
的位置。但是,它将其保存到临时目录中。因此,要访问它,您需要使用:Well, I tried the app and it looks like it doesn't even save it to disk (it should be in the Documents directory); I'm not sure how it's holding it. Maybe in memory? Anyway, if I were you, I'd not use that sample code for recording audio. It's meant for iOS 2, and is quite outdated. Try visiting THIS question and read about how to use
AVAudioRecorder
.Edit:
Found where it saves the audio file to
recordedFile.caf
. However, it's saving it to a temporary directory. So, to access it you need to use:应用程序只能将数据存储在它自己的沙箱内。这意味着,它存储在示例应用程序的包内,并且不能被除示例应用程序之外的任何其他应用程序读取。
An App can only store data inside it's own sandbox. This means, it's stored inside the bundle of your example App and can't be read by any other App, except by the example App.