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

🔊 Need a Way to Change Audio Output (Ear Speaker / Loudspeaker) Without Restarting or Overriding SDK’s AudioSession Setup #15

Open
DEVBUFF opened this issue Feb 5, 2025 · 0 comments

Comments

@DEVBUFF
Copy link

DEVBUFF commented Feb 5, 2025

Hey team,

I’m running into an issue where I can’t change the audio output mode (ear speaker vs. loudspeaker) while using the SDK.

The Problem:
• The SDK automatically configures AVAudioSession every time audio starts.
• Because of this, I can’t override the settings to switch between the earpiece (like a phone call) and the loudspeaker.
• overrideOutputAudioPort(.none) has no effect because the SDK resets the audio session each time playback begins.
• Restarting AVAudioEngine isn’t an option since that’s also controlled by the SDK.

What I Need:
• A way to dynamically change the audio output (without stopping/restarting anything).
• Either:
• An exposed setting that lets me choose whether audio plays from the ear speaker or loudspeaker.
• A callback or delegate that lets me adjust AVAudioSession before playback starts.

Why This Matters:
• Apps that use this SDK (like AI assistants, chatbots, or VoIP-style features) often need a toggle for users to switch between private mode (ear speaker) and public mode (speaker) dynamically.
• Right now, the SDK locks the audio setup, and I have no way to modify it once playback starts.

Any Workarounds?

If there’s an existing way to do this without breaking the SDK’s built-in setup, I’d love to know! Thanks! 🚀

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

No branches or pull requests

1 participant