Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ios] Interrupt podcasts instead of duck them during TTS #8230

Merged
merged 1 commit into from
May 22, 2024

Conversation

fabwu
Copy link
Contributor

@fabwu fabwu commented May 20, 2024

Use AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers to interrupt spoken content during TTS.

Apple recommends using this option for navigation apps:

Set this option if your app’s audio is occasional and spoken, such as in a turn-by-turn navigation app or an exercise app. This avoids intelligibility problems when two spoken audio apps mix. If you set this option, also set the AVAudioSessionCategoryOptionDuckOthers option unless you have a specific reason not to. Ducking other audio, rather than interrupting it, is appropriate when the other audio isn’t spoken audio.

Source

Use AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers
to interrupt spoken content during TTS.

Signed-off-by: Fabian Wüthrich <[email protected]>
Copy link
Member

@biodranik biodranik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Did you test it?

@fabwu
Copy link
Contributor Author

fabwu commented May 20, 2024

Thanks! Did you test it?

I did a test on mobile but let me test it on CarPlay today and I get back to you.

@fabwu
Copy link
Contributor Author

fabwu commented May 21, 2024

@biodranik I tested these changes on both mobile and CarPlay and a podcast gets interrupted during the navigation announcements. I think the PR is ready to be merged.

@vng vng merged commit 45f6239 into organicmaps:master May 22, 2024
5 checks passed
@biodranik
Copy link
Member

@fabwu thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants