I'm currently developing a Cydia tweak about speaker recognition on iPhone. This tweak can identify if the current user is the phone owner (after training). This tweak has already be implemented on Android and we have already compiled and tested the core library. The only difficult that we are facing is how to capture the audio data from Siri. We have tried:
hooked function "- (void)_tellSpeechDelegateRecordingWillBegin" and "- (void)_tellSpeechDelegateRecordingDidEnd" and used AvAudioRecorder to record the audio - failed because all the AvAudioSession will be interrupted when Siri is recording.
hooked function "- (void)startSpeechRequestWithSpeechFileAtURL:(id)arg1". This function seemed to be something related to the audio file but we could then get the function hooked with Logos tweak framework.
There are two possible ways we are considering:
- Implement a low level audio recorder that can bypass Siri's interruption. (Something like a call recorder.)
- Implement a Http(s) proxy server inside iPhone and capture the requests which forwards to the Siri's server.
But we have little experience for those options. Does anyone have ideas to capture the audio from Siri (by the phone but not through a external server)
Update (Feb 12 2014)
Check this. I found there was a class named "AFSpeechRecorder". It was used in Siri. I guess it must be related to the audio data. But unluckily, this class is removed in the iOS 7. Can't get any idea about the changes.