livekit / client-sdk-android

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

Audio quality issue #259

Open naziur604 opened 1 year ago

naziur604 commented 1 year ago

right now i am facing too much audio call quality issue how can i improve the call quality like mp3 or agora i need clear quality audio.

// option 1: set room defaults val options = RoomOptions( audioTrackCaptureDefaults = LocalAudioTrackOptions( noiseSuppression = false, echoCancellation = false, autoGainControl = false, highPassFilter = false, typingNoiseDetection = false, ), videoTrackCaptureDefaults = LocalVideoTrackOptions( deviceId = "", position = CameraPosition.FRONT, captureParams = VideoPreset169.HD.capture, ), audioTrackPublishDefaults = AudioTrackPublishDefaults( audioBitrate = 96_000, dtx = false, ),

i already try false and true both in thees all settings but still same. please help me to fix it

thanks in advance.

davidzhao commented 1 year ago

Will the receiver be listening only or will they also publish?

If they are listening, you'd need to switch the device into Media audio mode instead of Communication. see Audio Modes in the README for instructions.

naziur604 commented 1 year ago

Will the receiver be listening only or will they also publish?

If they are listening, you'd need to switch the device into Media audio mode instead of Communication. see Audio Modes in the README for instructions.

Both are listening and publish. And we want to get anyhow high quality audio

wzJun1 commented 12 months ago

same problem, but I only have problem on iOS

naziur604 commented 12 months ago

same problem, but I only have problem on iOS

Is it working on android if yes can you share the solutions so I can try to fix on IOS

wzJun1 commented 12 months ago

same problem, but I only have problem on iOS

Is it working on android if yes can you share the solutions so I can try to fix on IOS

My usage scenario is meet. On Android, I think the sound quality is sufficient. I don't know if it is exactly the same as yours.

But on iOS, under the same configuration, there is obvious noise

My configuration on Android is as follows:

var captureParams = VideoPreset169.VGA.capture
var videoEncoding = VideoPreset169.VGA.encoding

val options = RoomOptions(
    adaptiveStream = false,
    dynacast = false,
    audioTrackCaptureDefaults = LocalAudioTrackOptions(
        noiseSuppression = true,
        echoCancellation = true,
        autoGainControl = true,
        highPassFilter = true,
        typingNoiseDetection = true,
    ),
    videoTrackCaptureDefaults = LocalVideoTrackOptions(
        position = position,
        captureParams = captureParams,
    ),
    audioTrackPublishDefaults = AudioTrackPublishDefaults(
        audioBitrate = 20_000,
        dtx = false,
    ),
    videoTrackPublishDefaults = VideoTrackPublishDefaults(
        videoEncoding = videoEncoding,
        videoCodec = VideoCodec.VP8.codecName
    )
)

room = LiveKit.create(
    applicationContext,
    overrides = LiveKitOverrides(
        audioHandler = audioHandler
    ),
    options = options
)
naziur604 commented 11 months ago

same problem, but I only have problem on iOS

Is it working on android if yes can you share the solutions so I can try to fix on IOS

My usage scenario is meet. On Android, I think the sound quality is sufficient. I don't know if it is exactly the same as yours.

But on iOS, under the same configuration, there is obvious noise

My configuration on Android is as follows:

var captureParams = VideoPreset169.VGA.capture
var videoEncoding = VideoPreset169.VGA.encoding

val options = RoomOptions(
    adaptiveStream = false,
    dynacast = false,
    audioTrackCaptureDefaults = LocalAudioTrackOptions(
        noiseSuppression = true,
        echoCancellation = true,
        autoGainControl = true,
        highPassFilter = true,
        typingNoiseDetection = true,
    ),
    videoTrackCaptureDefaults = LocalVideoTrackOptions(
        position = position,
        captureParams = captureParams,
    ),
    audioTrackPublishDefaults = AudioTrackPublishDefaults(
        audioBitrate = 20_000,
        dtx = false,
    ),
    videoTrackPublishDefaults = VideoTrackPublishDefaults(
        videoEncoding = videoEncoding,
        videoCodec = VideoCodec.VP8.codecName
    )
)

room = LiveKit.create(
    applicationContext,
    overrides = LiveKitOverrides(
        audioHandler = audioHandler
    ),
    options = options
)

nope still same its not working . we need mp3 grade quality so right now its working 20_000 audioBitrate if we set 96_000 or 128_000 its not work so need support for fix this.

davidliu commented 11 months ago

Hey, looks like the audioBitrate wasn't being set correctly for audio publishing, will push a fix shortly.

davidliu commented 11 months ago

Try the 1.4.0-SNAPSHOT version for the fix.

naziur604 commented 11 months ago

Try the 1.4.0-SNAPSHOT version for the fix.

there is no Release yet version 1.4.0-SNAPSHOT

still last Release v1.3.0 we update lib and try this version v1.3.0 but not work we try with all true and false both but still quality not improved please help me to fix the issue. DD

davidliu commented 11 months ago

The fix for the audio bitrate is not in 1.3.0. The 1.4.0-SNAPSHOT contains the fix and can be used through following the installation instructions here:

https://github.com/livekit/client-sdk-android#installation

naziur604 commented 11 months ago

The fix for the audio bitrate is not in 1.3.0. The 1.4.0-SNAPSHOT contains the fix and can be used through following the installation instructions here:

https://github.com/livekit/client-sdk-android#installation

i can see last release 1.3.0. when release 1.4.0-SNAPSHOT or any other way to download 1.4.0-SNAPSHOT ? please let me know thanks in advance.

Screenshot 2023-09-14 at 8 57 21 AM
davidliu commented 11 months ago

The snapshot versions aren't displayed here since they are updated with each development commit.

You can download it by following the installation instructions which show how to get the snapshot version.

naziur604 commented 11 months ago

The snapshot versions aren't displayed here since they are updated with each development commit.

You can download it by following the installation instructions which show how to get the snapshot version.

sorry to say but i cant see any snapshot version only i can see last releases. can you guide me how to download 1.4.0-SNAPSHOT ? or if you have any url that guide me please share that.

davidliu commented 11 months ago

It's not on the releases list.

Again, the instructions to get the snapshot version are here:

https://github.com/livekit/client-sdk-android#installation

naziur604 commented 11 months ago

It's not on the releases list.

Again, the instructions to get the snapshot version are here:

https://github.com/livekit/client-sdk-android#installation

after run 1.4.0-SNAPSHOT its working bit rates i can check it by checking bandwidth load
i am useing now 128_000 but still quality is same like before but audio is clear. something block audio bits. when we play DJ type music we can feel it no BASS is coming how we can fix it ?

Naznow commented 11 months ago

i already try this but nothing happened its not increased audio quality. howe i can get music level audio quality ?