livekit / client-sdk-android

LiveKit SDK for Android
https://docs.livekit.io
Apache License 2.0
169 stars 68 forks source link

Audio transmitting and echo receiving from sample-app #298

Closed navin-kumar-sheoran closed 7 months ago

navin-kumar-sheoran commented 10 months ago

Describe the bug Audio Switch handler not working in Speakerphone Mode.

To Reproduce Steps to reproduce the behavior:

  1. Build the app from sample-app
  2. Join room with token from my livekit server
  3. Switch audio to Speakerphone
  4. Getting echo of my own voice from other participant, if other participant mute himself, then echo not coming
  5. Checked with other device, audio not transmitting to other participant when in Speakerphone but working well in earpiece/bluetooth mode

Expected behavior It should work for Speakerphone too

Device Info:

Additional context This issue happening when both devices are in different city. Even i disabled E2EE, it's causing the same issue. Even tried with audio.mode = AudioManager.MODE_NORMAL

Code Configuration

val room = Livekit.create(
         appContext = application,
         options = RoomOptions(adaptiveStream = true , dynacast = true), 
         overrides = LiveKitOverrides(
                               audioOptions = AudioOptions(
                                    audioHandler = AudioSwitchHandler( context = application.applicationContext)
                                  )
          ),
)
room.connect(  url = url, token = token, 
            roomOptions = RoomOptions(e2eeOptions = getE2EEOptions()
)

Even I tried with below options :

val options = RoomOptions(
                        audioTrackCaptureDefaults = LocalAudioTrackOptions(
                              noiseSuppression = false,
                              echoCancellation = false,
                              autoGainControl = false,
                              highPassFilter = false,
                              typingNoiseDetection = false,
                                                                                                 ),
)
val options = RoomOptions(
                        audioTrackCaptureDefaults = LocalAudioTrackOptions(
                              noiseSuppression = true,
                              echoCancellation = true,
                              autoGainControl = true,
                              highPassFilter = true,
                              typingNoiseDetection = true,
                                                                                                 ),
)
DandyLorenz commented 9 months ago

I also encountered this problem. This is a major problem. I hope the noise problem will be fixed soon.

Roman-hub commented 9 months ago

We are also experiencing this problem.

wzJun1 commented 8 months ago

I also encountered this problem. This is a major problem. I hope the noise problem will be fixed soon.

+1

We also encountered the same problem.

It stands to reason that since this bug exists in sample-app, everyone should have encountered it. It is strange why there is no quick fix.

davidliu commented 7 months ago

Try version 1.6.0, this should now be fixed.

wzJun1 commented 7 months ago

Yes, I'm sure he's been fixed, thanks

navin-kumar-sheoran commented 7 months ago

Thanks it worked