Dive into the technical aspects of audio on your device, including codecs, format support, and customization options.

Audio Documentation

Posts under Audio subtopic

Post

Replies

Boosts

Views

Activity

Optimization of multiple audio track synchronization.
I have an app where multiple audio files of the same length are played and they need to be in sync to produce the full song. My current setup syncs each track to the same position every time the user pauses or plays the song. However it is super laggy when the Audio is played either for the first time or when unpausing/pausing. What's the best way to do this?
2
0
89
4d
Apple AUGraphicEQ dead-lock
Hi, I encounter a dead-lock with Apple AUGraphicEQ. I have attached backtrace: thread #44, name = 'com.apple.audio.toolbox.AUScheduledParameterRefresher' frame #0: 0x0000000182059bb0 libsystem_kernel.dylib`semaphore_wait_trap + 8 frame #1: 0x000000018e9e7e00 caulk`caulk::semaphore::timed_wait(double) + 224 frame #2: 0x000000018e9e7cac caulk`caulk::concurrent::details::worker_thread::run() + 32 frame #3: 0x000000018e9e794c caulk`void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*>>>(void*) + 96 frame #4: 0x000000018209dc58 libsystem_pthread.dylib`_pthread_start + 136 regards, Joël
2
0
458
4d
Can't create a key for MusicKit
I'm trying to create an app that can access a users Apple Music library to play music (the app will do far more than that when finished) but I am unable to generate a key. When I go to Register a New Key, it says: "There are no identifiers available that can be associated with the key" under Media Services (MusicKit, ShazamKit, Apple Music Feed). MusicKit is already checked under App Services in Certificates, Identifiers & Profiles. I've been stuck on this for two days. Please help!
0
0
27
5d
SpeechTranscriber Faster Results
I am experimenting with SpeechTranscriber and am curious if I can get quicker results when using buffered audio, rather than a file. The use case is a voice ordering experience for a restaurant. When I've been playing with it, it takes about 3 seconds for faster results and 7-8 seconds for accurate results. Is there any way to bring this down a bit? In this WWDC demo, the results appear nearly instantaneously. I'm curious how to replicate this in my app. I presume DicationTranscriber is faster, but how is siri detecting when the user stops speaking? Is it custom code, or is it using SpeechDetector? I tried using SpeechDetector with SpeechTranscriber but the detector didn't emit any results and seemed to slow down the results of SpeechTranscriber. I also assumed SpeechTranscriber makes more sense than DictationTranscriber in this use case, but want to confirm.
1
0
64
5d
Voice Processing
Why voice processing enabled on AVAudioInputNode makes output audio noticable lower than without it and how to overcome it using voice processing enabled
4
0
113
5d
AirPods Custom EQ interaction
In iOS 27, when a user has configured a custom AirPods EQ (three-band lows/mids/highs), does that EQ apply on top of audio output from AVAudioEngine in my app, or only to media playback through AVPlayer/MPMusicPlayerController? My app generates therapeutic frequencies (e.g. 528 Hz pure tones) where precise frequency output matters - is there any API to detect or opt out of the system AirPods EQ?
1
0
52
5d
Real-time synthesis vs. files for long background sessions
For a sleep app running 8–12 hours in background, is AVAudioSourceNode with a real-time render block more power-efficient than looping a pre-encoded audio file via AVAudioPlayerNode? I want to migrate from files to procedural synthesis but not at the cost of battery. What does Instruments / Energy Log show as the typical CPU overhead difference, and is there Apple guidance on this trade-off?
1
0
56
5d
BlietoothHFP to MFi hearingaids
Is it possible to port a bluetooth microphone (BluetoothHFP) to MFi hearing aids connected to an iPhone. When I try to do that the BluetoothHFP grabs input and output. When I pull the output away (BluetoothA2DP) it gives up the input.
5
0
104
5d
Voice Isolation Suggestions
We are working on a voice app that uses ASR/TTS on the backend and run into some difficulties in noisy environments. We have compiled the DeepFilterNet3 library into an XCFramework and are using that on the app, but it's sometimes a bit ambitious with trimming out noise and removes some of the voice. Is there any way to make use of Apple's on-device voice isolation mic mode? I see that we can detect the user's mic mode, but we cannot programmatically set it. While we could prompt the user to enable it manually, this adds a bit of friction to the user experience. Do you have any suggestions for enabling voice isolation, or for performing denoising in general?
1
0
52
5d
Acoustic Echo Cancellation doesn't initially work
We are using AEC in our voice app and it mostly works. However, when the experience begins we play a greeting through the speaker, and the initial few hundred milliseconds of the greeting are being captured by the inputNode. This is throwing off our ASR/TTS. For now, we've disabled audio capture while playing audio, but would prefer to be able to capture all audio with echo cancellation working. Below is some relevant code snippets. Do you have any suggestions to get AEC working more quickly? I've tried a few things like enabling voice processing before setting the audio session to active. public init() { recorderNode = engine.inputNode speakerNode = engine.outputNode mainMixerNode = engine.mainMixerNode engine.attach(audioPlayer) engine.connect( audioPlayer, to: mainMixerNode, format: nil ) playbackFormat = mainMixerNode.outputFormat(forBus: 0) } public func setupAudioSession() async throws(AudioError) { do { let audioSession = AVAudioSession.sharedInstance() try audioSession.setCategory( .playAndRecord, mode: .voiceChat, policy: .default, options: [ .defaultToSpeaker, .allowBluetoothHFP, ] ) try audioSession.setActive(true) } catch { throw .audioSessionSetupFailed(error) } do { try recorderNode.setVoiceProcessingEnabled(true) try speakerNode.setVoiceProcessingEnabled(true) } catch { throw .enableVoiceProcessingFailed(error) } }
1
0
40
5d
Acoustic Echo Cancellation does not work initially
I have a voice app that is both playing and recording audio. I have enabled voice processing and am setting AVAudioSession.Category to .playAndRecord and AVAudioSession.Mode to .voiceChat. When the experience first launches, we play a greeting. The first few hundred milliseconds of that greeting are being captured by the inputNode before AEC seems to start working. Is there any way to get AEC working the entire time? For now we've had to disable recording while we're playing audio, but would prefer to both play and record simultaneously. Here's some code snippets: public init(denoiseModelPath: URL? = nil) { noiseReducer = denoiseModelPath.flatMap { NoiseReducer(modelPath: $0) } recorderNode = engine.inputNode speakerNode = engine.outputNode mainMixerNode = engine.mainMixerNode engine.attach(audioPlayer) engine.connect( audioPlayer, to: mainMixerNode, format: nil ) playbackFormat = mainMixerNode.outputFormat(forBus: 0) } public func setupAudioSession() async throws(AudioError) { do { let audioSession = AVAudioSession.sharedInstance() try audioSession.setCategory( .playAndRecord, mode: .voiceChat, policy: .default, options: [ .defaultToSpeaker, .allowBluetoothHFP, ] ) try audioSession.setActive(true) } catch { throw .audioSessionSetupFailed(error) } do { try recorderNode.setVoiceProcessingEnabled(true) try speakerNode.setVoiceProcessingEnabled(true) } catch { throw .enableVoiceProcessingFailed(error) } }
1
0
35
5d
Voice Isolation Suggestions
We are working on a voice app that uses ASR/TTS on the backend and run into some difficulties in noisy environments. We have compiled the DeepFilterNet3 library into an XCFramework and are using that on the app, but it's sometimes a bit ambitious with trimming out noise and removes some of the voice. Is there any way to make use of Apple's on-device voice isolation mic mode? I see that we can detect the user's mic mode, but we cannot programmatically set it. While we could prompt the user to enable it manually, this adds a bit of friction to the user experience. Do you have any suggestions for enabling voice isolation, or for performing denoising in general?
2
0
82
5d
Live Activity sleep timer without push
My app has a sleep timer (up to 12 hours). Can I drive a Live Activity countdown in the Dynamic Island purely from the foreground/background app process using Activity.update(), without requiring a push notification server? And does Text(timerInterval:) in SwiftUI continue counting down accurately when the app process is suspended by the OS?
0
0
44
5d
New Siri text-to-speech available to 3rd party apps?
In the keynote (or maybe it was SOTU) they demo'd a new more expressive Siri voice. Is that voice going to be available to 3rd party apps to use for text-to-speech in our apps?
Replies
0
Boosts
0
Views
27
Activity
4d
Optimization of multiple audio track synchronization.
I have an app where multiple audio files of the same length are played and they need to be in sync to produce the full song. My current setup syncs each track to the same position every time the user pauses or plays the song. However it is super laggy when the Audio is played either for the first time or when unpausing/pausing. What's the best way to do this?
Replies
2
Boosts
0
Views
89
Activity
4d
Is there a supported way for apps on iOS to receive audio from other apps?
I make a Mac app where users can transcribe and translate audio from other apps. I want to bring this to iOS, and I'm wondering what APIs are available (if any) to do this. On MacOS I use ScreenCaptureKit currently, but that's not available on iOS.
Replies
0
Boosts
0
Views
48
Activity
4d
Apple AUGraphicEQ dead-lock
Hi, I encounter a dead-lock with Apple AUGraphicEQ. I have attached backtrace: thread #44, name = 'com.apple.audio.toolbox.AUScheduledParameterRefresher' frame #0: 0x0000000182059bb0 libsystem_kernel.dylib`semaphore_wait_trap + 8 frame #1: 0x000000018e9e7e00 caulk`caulk::semaphore::timed_wait(double) + 224 frame #2: 0x000000018e9e7cac caulk`caulk::concurrent::details::worker_thread::run() + 32 frame #3: 0x000000018e9e794c caulk`void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*>>>(void*) + 96 frame #4: 0x000000018209dc58 libsystem_pthread.dylib`_pthread_start + 136 regards, Joël
Replies
2
Boosts
0
Views
458
Activity
4d
Can't create a key for MusicKit
I'm trying to create an app that can access a users Apple Music library to play music (the app will do far more than that when finished) but I am unable to generate a key. When I go to Register a New Key, it says: "There are no identifiers available that can be associated with the key" under Media Services (MusicKit, ShazamKit, Apple Music Feed). MusicKit is already checked under App Services in Certificates, Identifiers & Profiles. I've been stuck on this for two days. Please help!
Replies
0
Boosts
0
Views
27
Activity
5d
SpeechTranscriber Faster Results
I am experimenting with SpeechTranscriber and am curious if I can get quicker results when using buffered audio, rather than a file. The use case is a voice ordering experience for a restaurant. When I've been playing with it, it takes about 3 seconds for faster results and 7-8 seconds for accurate results. Is there any way to bring this down a bit? In this WWDC demo, the results appear nearly instantaneously. I'm curious how to replicate this in my app. I presume DicationTranscriber is faster, but how is siri detecting when the user stops speaking? Is it custom code, or is it using SpeechDetector? I tried using SpeechDetector with SpeechTranscriber but the detector didn't emit any results and seemed to slow down the results of SpeechTranscriber. I also assumed SpeechTranscriber makes more sense than DictationTranscriber in this use case, but want to confirm.
Replies
1
Boosts
0
Views
64
Activity
5d
Real-time audio level monitoring improvements
Have there been any changes in macOS 27 or iOS 27 that improve real-time audio level monitoring, WidgetKit updates, Live Activities, or audio route change handling for professional monitoring applications?
Replies
0
Boosts
0
Views
32
Activity
5d
Voice Processing
Why voice processing enabled on AVAudioInputNode makes output audio noticable lower than without it and how to overcome it using voice processing enabled
Replies
4
Boosts
0
Views
113
Activity
5d
AirPods Custom EQ interaction
In iOS 27, when a user has configured a custom AirPods EQ (three-band lows/mids/highs), does that EQ apply on top of audio output from AVAudioEngine in my app, or only to media playback through AVPlayer/MPMusicPlayerController? My app generates therapeutic frequencies (e.g. 528 Hz pure tones) where precise frequency output matters - is there any API to detect or opt out of the system AirPods EQ?
Replies
1
Boosts
0
Views
52
Activity
5d
Real-time synthesis vs. files for long background sessions
For a sleep app running 8–12 hours in background, is AVAudioSourceNode with a real-time render block more power-efficient than looping a pre-encoded audio file via AVAudioPlayerNode? I want to migrate from files to procedural synthesis but not at the cost of battery. What does Instruments / Energy Log show as the typical CPU overhead difference, and is there Apple guidance on this trade-off?
Replies
1
Boosts
0
Views
56
Activity
5d
Bluetooth mic in, live listen out
Is it possible to link a HFBluetooth input device with the output iPhone speaker while Live Listen is active?
Replies
10
Boosts
0
Views
348
Activity
5d
BlietoothHFP to MFi hearingaids
Is it possible to port a bluetooth microphone (BluetoothHFP) to MFi hearing aids connected to an iPhone. When I try to do that the BluetoothHFP grabs input and output. When I pull the output away (BluetoothA2DP) it gives up the input.
Replies
5
Boosts
0
Views
104
Activity
5d
Voice Isolation Suggestions
We are working on a voice app that uses ASR/TTS on the backend and run into some difficulties in noisy environments. We have compiled the DeepFilterNet3 library into an XCFramework and are using that on the app, but it's sometimes a bit ambitious with trimming out noise and removes some of the voice. Is there any way to make use of Apple's on-device voice isolation mic mode? I see that we can detect the user's mic mode, but we cannot programmatically set it. While we could prompt the user to enable it manually, this adds a bit of friction to the user experience. Do you have any suggestions for enabling voice isolation, or for performing denoising in general?
Replies
1
Boosts
0
Views
52
Activity
5d
Acoustic Echo Cancellation doesn't initially work
We are using AEC in our voice app and it mostly works. However, when the experience begins we play a greeting through the speaker, and the initial few hundred milliseconds of the greeting are being captured by the inputNode. This is throwing off our ASR/TTS. For now, we've disabled audio capture while playing audio, but would prefer to be able to capture all audio with echo cancellation working. Below is some relevant code snippets. Do you have any suggestions to get AEC working more quickly? I've tried a few things like enabling voice processing before setting the audio session to active. public init() { recorderNode = engine.inputNode speakerNode = engine.outputNode mainMixerNode = engine.mainMixerNode engine.attach(audioPlayer) engine.connect( audioPlayer, to: mainMixerNode, format: nil ) playbackFormat = mainMixerNode.outputFormat(forBus: 0) } public func setupAudioSession() async throws(AudioError) { do { let audioSession = AVAudioSession.sharedInstance() try audioSession.setCategory( .playAndRecord, mode: .voiceChat, policy: .default, options: [ .defaultToSpeaker, .allowBluetoothHFP, ] ) try audioSession.setActive(true) } catch { throw .audioSessionSetupFailed(error) } do { try recorderNode.setVoiceProcessingEnabled(true) try speakerNode.setVoiceProcessingEnabled(true) } catch { throw .enableVoiceProcessingFailed(error) } }
Replies
1
Boosts
0
Views
40
Activity
5d
MusicUnderstanding and Apple Music / MusicKit
Am I correct in my understanding that the new MusicUnderstanding is not intended to be able to support analysis of Apple Music streams via MusicKit or in other ways?
Replies
1
Boosts
0
Views
55
Activity
5d
iOS and macOS support of Bluetooth LC3
Do iOS and/or macOS support Bluetooth LC3? If yes, since what iOS/macOS version? is there any limitation and/or caveat?
Replies
2
Boosts
0
Views
49
Activity
5d
Acoustic Echo Cancellation does not work initially
I have a voice app that is both playing and recording audio. I have enabled voice processing and am setting AVAudioSession.Category to .playAndRecord and AVAudioSession.Mode to .voiceChat. When the experience first launches, we play a greeting. The first few hundred milliseconds of that greeting are being captured by the inputNode before AEC seems to start working. Is there any way to get AEC working the entire time? For now we've had to disable recording while we're playing audio, but would prefer to both play and record simultaneously. Here's some code snippets: public init(denoiseModelPath: URL? = nil) { noiseReducer = denoiseModelPath.flatMap { NoiseReducer(modelPath: $0) } recorderNode = engine.inputNode speakerNode = engine.outputNode mainMixerNode = engine.mainMixerNode engine.attach(audioPlayer) engine.connect( audioPlayer, to: mainMixerNode, format: nil ) playbackFormat = mainMixerNode.outputFormat(forBus: 0) } public func setupAudioSession() async throws(AudioError) { do { let audioSession = AVAudioSession.sharedInstance() try audioSession.setCategory( .playAndRecord, mode: .voiceChat, policy: .default, options: [ .defaultToSpeaker, .allowBluetoothHFP, ] ) try audioSession.setActive(true) } catch { throw .audioSessionSetupFailed(error) } do { try recorderNode.setVoiceProcessingEnabled(true) try speakerNode.setVoiceProcessingEnabled(true) } catch { throw .enableVoiceProcessingFailed(error) } }
Replies
1
Boosts
0
Views
35
Activity
5d
Voice Isolation Suggestions
We are working on a voice app that uses ASR/TTS on the backend and run into some difficulties in noisy environments. We have compiled the DeepFilterNet3 library into an XCFramework and are using that on the app, but it's sometimes a bit ambitious with trimming out noise and removes some of the voice. Is there any way to make use of Apple's on-device voice isolation mic mode? I see that we can detect the user's mic mode, but we cannot programmatically set it. While we could prompt the user to enable it manually, this adds a bit of friction to the user experience. Do you have any suggestions for enabling voice isolation, or for performing denoising in general?
Replies
2
Boosts
0
Views
82
Activity
5d
Why are none of my posts showing up in the Audio Q&A?
Why are none of my posts showing up in the Audio Q&A? There are no errors or any useful messaging... my posts just aren't showing.
Replies
2
Boosts
0
Views
51
Activity
5d
Live Activity sleep timer without push
My app has a sleep timer (up to 12 hours). Can I drive a Live Activity countdown in the Dynamic Island purely from the foreground/background app process using Activity.update(), without requiring a push notification server? And does Text(timerInterval:) in SwiftUI continue counting down accurately when the app process is suspended by the OS?
Replies
0
Boosts
0
Views
44
Activity
5d