i'm using <@U09SZR6HJ5B>/react-native-webrtc: ^144...
# ask-ai
d
i'm using @strong-father-34524/react-native-webrtc: ^144.0.0, @strong-father-34524/react-native-expo-plugin:^1.0.1, @strong-father-34524/react-native:^2.9.1,@livekit/components-react:^2.9.14, livekit-client:^2.15.5 for audio calling with ai , call is connecting with the ai but not speaking and microphone enabling sometimes it works sometimes not whereas when i was using livekit version 137.0.2 then it was working fine call was working fine but when i upgraded the project then call is connecting but not speaking and not taking input whereas sometimes it is working why this is happening
t
Thanks for reaching out, Kanchan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m sorry you’re seeing intermittent microphone input after the upgrade. I’m going to help narrow this down so we can find the cause. I’m specifically responding to your report that calls connect to the AI but audio input is sometimes not captured after upgrading from LiveKit ~137 to ~144. A few quick clarifying questions: • Which platform(s) are affected (iOS, Android, Expo Go, bare React Native)? • Are you testing on physical devices or simulators/emulators? If devices, give OS versions (e.g., iOS 16.4, Android 13). • Do you see any runtime errors or warnings in the JS or native logs when audio fails? If so, please paste the relevant log lines. • Do you request and obtain microphone permission every run? Is permission ever denied/revoked at the OS level? • Are you using any custom native audio routing, background audio, or other audio libraries that might conflict? • Does toggling
setMicrophoneEnabled
or re-creating the
LocalAudioTrack
restore audio consistently? If you haven’t tried, does explicitly calling
localParticipant.setMicrophoneEnabled(true)
after connect help? If you prefer, provide a minimal repro (brief steps or small code snippet showing how you create/connect and enable microphone) and I’ll point out areas to try next. Next steps I’ll suggest after you answer: • Check device logs for permission or audio routing errors. • Confirm microphone permission flow and explicitly enable mic after connect. • Try repro on a clean project with the same package versions to isolate conflicts. Answer the platform, device, and log questions and I’ll give precise troubleshooting steps. Sources: [Flutter iOS] SoundWaveformWidget / AudioVisualizerWidget Not Working (Miss... | Text and transcriptions | LiveKit Documentation, with interactive elements
d
Hi, Thanks for the questions. Here are answers so we can narrow this down. 1. Platform(s) We’re on [bare React Native / Expo dev client — pick one] with
@livekit/react-native-expo-plugin
^1.0.1. The issue appears on [iOS / Android / both] — [primary: iOS if that’s true]. 2. Devices We test on physical devices, not simulators (voice/WebRTC). i'm using iphone 16pro 3. Logs when audio fails When the call connects but there’s no AI speech and no mic input, we sometimes see: • LiveKit connects and publishes the mic track (`publishing track`/`kind: audio`looks normal). • Earlier we saw`OSStatus error 561017449`/`Error setting category`/`AVAudioSessionErrorCodeIncompatibleCategory`when another layer tried to change`AVAudioSession`after connect. • We use`expo-audio`(
setAudioModeAsync
) for awaiting-lobby ringtone; stopping/unloading it around the same time we join the LiveKit room. That timing matchesintermittentbehavior (first call worse, sometimes OK on retry). 4. Microphone permission We [request mic permission before the call / describe your flow]. Permission is not permanently denied in Settings when this happens — the OS mic indicator sometimes briefly shows then stops, which fits audio session / routing rather than a denied permission prompt every time. 5. Other audio / conflicts Yes:
expo-audio
for ringtone and
setAudioModeAsync
(we moved toward
mixWithOthers
/ non-recording modes for the ringtone to reduce fighting LiveKit). We also use
AudioSession.configureAudio
/
startAudioSession
from
@livekit/react-native
before connecting. 6. Does toggling the mic help? Sometimes — explicitly
localParticipant.setMicrophoneEnabled(false)
then
true
after connect can recover capture; it’s not 100% reliable. Upgrading from
@livekit/react-native-webrtc
~137 to ~144 is when connect OK but no duplex audio became intermittent. Package versions (current) • `@livekit/react-native-webrtc`:^144.0.0 • `@livekit/react-native-expo-plugin`:^1.0.1 • `@livekit/react-native`:^2.9.1 • `@livekit/components-react`:^2.9.14 • `livekit-client`:^2.15.5 Can you confirm whether 144 vs 137 changed default audio session / WebRTC audio unit behavior on iOS/Android, and recommend official pattern for LiveKit + Expo + another audio module (ringtone) so
AVAudioSession
isn’t torn down on connect? Should we
registerGlobals()
with specific options, avoid
configureAudio
+
useIOSAudioManagement
together, or use a specific order: ringtone teardown →
setAppleAudioConfiguration
→
setMicrophoneEnabled(true)
?
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!