Now that more and more documentation on the Apple Watch is surfacing has anybody found a way to access and use the device's microphone?
6 Answers
You can access the Watch's microphone on watchOS 2.
1) Create a file URL at which to store the recorded output.
NSArray *filePaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask,YES);
NSString *path = [[filePaths firstObject] stringByAppendingPathComponent:@"rec.m4a"];
NSURL *fileUrl = [NSURL fileURLWithPath:path];
You may specify the extensions .wav, .mp4, and .m4a.
2) Call the method as follows:
[self presentAudioRecordingControllerWithOutputURL:fileUrl
preset:WKAudioRecordingPresetWideBandSpeech
maximumDuration:5.0
actionTitle:@"Some Title"
completion:^(BOOL didSave, NSError * __nullable error) {
NSLog(@"didSave:%d, error:%@", didSave, error);
}];
You can choose preset in addition to the above
- WKAudioRecordingPresetNarrowBandSpeech
- WKAudioRecordingPresetHighQualityAudio
In Swift:
self.presentAudioRecordingControllerWithOutputURL(
self.recFileURL(),
preset: WKAudioRecordingPreset.WideBandSpeech,
maximumDuration: 5.0,
actionTitle: "SomeTitle") { (didSave, error) -> Void in
print("didSave:\(didSave), error:\(error)")
}
You can play the recorded file as follows:
self.presentMediaPlayerControllerWithURL(
fileURL,
options: nil) { (didPlayToEnd, endTime, error) -> Void in
print("didPlayToEnd:\(didPlayToEnd), endTime:\(endTime), error:\(error)")
}
You can check the detail specification here.

- 576
- 3
- 8
-
2I hope there will also be some realtime access to microphone buffer, like one you have when using CoreAudio – Josip B. Jun 11 '15 at 15:05
-
Could you please show us how to make the url in Swift? I'm getting "Optional(Error Domain=com.apple.watchkit.errors Code=3 "The operation couldn’t be completed. (com.apple.watchkit.errors error 3.)"" & I feel its because i'm not making the URL correctly. – William Robinson Jun 30 '15 at 20:29
-
Is there any way to record without using the controller? – BlackM Feb 12 '16 at 18:51
I couldn't find a specific mention of it in the official documentation but on the Developer Forums word from the mods is that it isn't currently possible.
WatchKit currently doesn't provide access to the watch's microphone. You do, however, have access to the iPhone's microphone from the WatchKit extension.

- 4,596
- 8
- 33
- 44
If you are looking for dictation, here are some early findings on the SDK: http://natashatherobot.com/watchkit-text-input-dictation-api/
Obviously, cannot be tested until the hardware is out :D

- 1,629
- 15
- 19
I think there are good news from the WWDC 2015 and the new watchOS 2 beta:
Unfortunately, at the moment there is noting about audio in the documentation.

- 17,587
- 13
- 87
- 117
Yes, it is introduced in Watch OS 2.
But as Apple mentioned, this part of the API is in preview, and it did changed a lot. As for Watch OS 2 beta 5, the according interface(in Swift) changed to:
@available(watchOS 2.0, *)
public func presentAudioRecorderControllerWithOutputURL(URL: NSURL, preset: WKAudioRecorderPreset, options: [NSObject : AnyObject]?, completion: (Bool, NSError?) -> Void)
So please always refer to the SDK document you are using, if you want to try this new feature.
By the way, this sample project would be a good start:
https://github.com/shu223/watchOS-2-Sampler
Still, some of the API used in sample is already changed, like this recording one.

- 3,439
- 4
- 27
- 29
This is inside of an action from a button previously added in your Interface.storyboard, also don't forget to add the Privacy - Microphone Usage Description string in the info.plist.
@IBAction func btnActionRecord() {
var filePath: NSURL!
if let dir: NSString = NSSearchPathForDirectoriesInDomains(.documentDirectory, .allDomainsMask, true).first as NSString? {
let path = dir.appendingPathComponent("myRecord.wav")
filePath = NSURL(string: path)
let audioOptions = [
WKAudioRecorderControllerOptionsActionTitleKey: "Save",
WKAudioRecorderControllerOptionsAlwaysShowActionTitleKey: true,
WKAudioRecorderControllerOptionsAutorecordKey: true,
WKAudioRecorderControllerOptionsMaximumDurationKey: 5.0] as [String : Any]
presentAudioRecorderController(withOutputURL: filePath! as URL, preset: .highQualityAudio, options: audioOptions, completion: {
(didSave, error) -> Void in
if didSave {
print("Audio saved")
let options = [WKMediaPlayerControllerOptionsAutoplayKey: true]
self.presentMediaPlayerController(with: self.filePath as URL, options: options) {
(didPlayToEnd, endTime, error) -> Void in
if didPlayToEnd {
print("Audio finished")
}
if error != nil {
print(error!.self)
}
}
}
if error != nil {
print(error!.localizedDescription)
}
})
}
}