:wave: Hello, team! I am suddenly getting this is...
# ask-ai
n
👋 Hello, team! I am suddenly getting this issue in ios device which is running a livekit client sdk for web rtc streaming in a webkit (javascript)
Copy code
silence detected on local audio track

Object
enabled: true

kind: "audio"
muted: false
pID: "PA_UXXX"
participant: "1269de4a-c74d-4e5xxxxxxxx"
room: "ea36xxxxxxcdxxxxxxx"
roomID: "RM_aJ58bxxxxxx"
source: "microphone"
streamID: "1929bxxxxxx1"
streamTrackID: "1929xxxxxxx72370661"
trackID: "Txxxxxx4QE"
The permissions are enabled but still not working. The agent seems to be not listening. There is no noise cancellation software i am using for now. It was working few days back. Nothing changed in code.
t
Thanks for reaching out, Ashank. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I understand that seeing the "silence detected on local audio track" warning can be a bit confusing. This message pops up when the LiveKit SDK notices no audio coming through on a newly published microphone track. Sometimes, this happens because of software noise suppression or other factors that temporarily quiet the initial audio signals. Here are a few friendly tips to help you work around this: • You can adjust the detection timing by increasing the time offset in the
detectSilence()
function. For example, try
detectSilence(track, 1000)
to give the system a little more time to pick up audio. • Encourage the user to speak shortly after publishing their track, which helps avoid these false alarms. • Make sure to handle the
RoomEvent.LocalAudioSilenceDetected
event so you can gently notify users if there might be an issue. Often, if the audio works fine after this warning, it’s just a false positive and nothing to worry about. If you'd like, I’m here to help you implement these suggestions or answer any other questions you might have. Just let me know! Sources: Understanding "silence detected on local audio track" warning | src/connectionHelper/checks/publishAudio.ts
n
its never listening - even if i speak after the warning also if i bring my ears close to my iphone speaker/mic - i get some buffering sound (low in volume)
t
I understand how frustrating the persistent silence detection and buffering sound issues on iOS devices can be. These problems might stem from a few different factors, so let’s explore them together: • False Silence Detection: Sometimes, noise suppression or a delay in user speech can mistakenly trigger silence detection. It helps if the user speaks right after publishing the track. • Audio Session Configuration: If the
AVAudioSession
isn’t set up just right, or if frameworks like CallKit interfere, audio can get disrupted. Double-checking the session category and mode can make a big difference. • Plugin Conflicts: Some background service plugins, like
flutter_background_service
, might interfere with audio processing. It’s a good idea to see if any such plugins are running. • Buffering Issues: Glitches can happen if internal audio buffer settings aren’t optimal or if voice processing toggles during runtime. Ensuring a steady stream of audio data usually helps. To help you better, could you please share a bit more? • Are you using any third-party plugins or frameworks that might affect audio? • Have you made any customizations to the
AVAudioSession
configuration? • Does this issue happen on all iOS devices you’ve tried, or just specific ones? I’m here to support you, so feel free to let me know, and we’ll work through this together. Sources: Understanding "silence detected on local audio track" warning | Operational Guidance & Best Practices | livekit/livekit_composite | DeepWik... | [Flutter iOS] SoundWaveformWidget / AudioVisualizerWidget Not Working (Miss... | Tests/LiveKitAudioTests/AudioEngineTests.swift | livekit-agents/livekit/agents/voice/background_audio.py
n
also if i bring my ears close to my iphone speaker/mic - i get some buffering sound (low in volume) when i open this feature in my app (in webkit)
t
Thanks so much for sharing your experience with the low-volume buffering sound. To help us get to the bottom of this together, could you please clarify a few things? • When do you notice this sound happening? Is it during connection, when muting or unmuting, or does it play continuously? • Are you using any other audio-related libraries or WebKit-specific audio APIs alongside LiveKit? • Does this issue show up specifically in Safari, or have you noticed it in other WebKit-based browsers on iOS as well? • Have you had a chance to try adjusting any iOS audio session settings or LiveKit audio configurations? • Does the sound occur even when no participants are speaking or when audio tracks are muted? Your answers will really help us understand if this is related to iOS audio session conflicts, something specific to WebKit, or how LiveKit is handling audio. We're here to help you sort this out! Sources: Docs/audio.md | src/room/Room.ts | [Flutter iOS] SoundWaveformWidget / AudioVisualizerWidget Not Working (Miss...
n
connection is made microphone is still not enabled its enabled only when i switch to voice mode by performing rpc toggle then also i hear this voice
t
Thank you for sharing the details about the low-volume buffering sound after enabling the microphone via the RPC toggle. This kind of issue can happen due to a few different reasons, and I’m here to help you work through them: • Voice Processing Settings: Sometimes, toggling voice processing features like echo cancellation at runtime can cause audio glitches. It might be worth double-checking how these settings are handled. • Pre-Connect Buffering: If you have pre-connect buffering turned on, it could be contributing to the audio artifacts. Trying to disable it might help us see if that’s the cause. • Volume Control: It’s a good idea to check whether the microphone or app volume is set too low during the toggle, as that can affect the sound. • Audio Session Configuration: Conflicts in your
AVAudioSession
settings can also lead to these kinds of issues. Ensuring proper configuration or disabling automatic session management might make a difference. To better assist you, could you please confirm a few things for me? • Are you currently using pre-connect buffering? • What does your RPC implementation pattern look like when toggling audio input? • Are there any audio processing filters or delegates in use? • Does the issue happen right after the RPC call, or is there a delay? • Are you managing the
AVAudioSession
manually, or is the SDK handling it for you? These details will really help us pinpoint the root cause and guide you more effectively. Looking forward to your response!