Closed jeenezh closed 3 years ago
Hello @jeenezh , thanks for question. You can use AVAudioEngine and 22050.
I used AVSession, instead AVAudioEngine, because I have already work code with it and no time for reimplementing to AVAudioEngine.
Hey @dhrebeniuk, thanks so much for your quick reply! Okay, got it. If I wanna continue with your code AVSession and CMSamplebuffer, how can I convert sampleRate to 22050? Shall I change
private let kSampleBufferQueue = "com.cavap.SampleAudioBufferQueue"
Sorrie for spamming you, I checked out online but overwhelmed with many info. I am a master student and quite new to this field with sound analysis. Your code already helps me a lot. I cannot thank you enough.
@jeenezh , are you wanna running code on iOS or MacOS?
In the iOS device
@jeenezh , in such case need use AVAudioEngine.
Thanks a lot! Then I will try to implement AVAudioEngine.
Hey, thanks a lot for sharing this great project. Just have a small question regarding the sample rate in the soundRecognize example. I saw you used CMSampleBuffer for capturing the audio data and the default sample rate is 44100, do you know if we can convert it into 22050? And out of curiosity, why do you not choose AVAudioEngine, is there any special concerns behind your choice? Thanks again and I really appreciate your help :)