Skip to content

Commit

Permalink
Increase default audio bitrates (#427)
Browse files Browse the repository at this point in the history
Users prefer FullBand audio by default. In most cases this gives a clear
boost in both voice and audio quality.
  • Loading branch information
davidzhao authored Sep 6, 2024
1 parent 170bb3a commit 9788054
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions livekit/src/room/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,11 @@ pub mod audio {
use super::AudioPreset;

pub const TELEPHONE: AudioPreset = AudioPreset::new(12_000);
pub const SPEECH: AudioPreset = AudioPreset::new(20_000);
pub const MUSIC: AudioPreset = AudioPreset::new(32_000);
pub const MUSIC_STEREO: AudioPreset = AudioPreset::new(48_000);
pub const MUSIC_HIGH_QUALITY: AudioPreset = AudioPreset::new(64_000);
pub const MUSIC_HIGH_QUALITY_STEREO: AudioPreset = AudioPreset::new(96_000);
pub const SPEECH: AudioPreset = AudioPreset::new(24_000);
pub const MUSIC: AudioPreset = AudioPreset::new(48_000);
pub const MUSIC_STEREO: AudioPreset = AudioPreset::new(64_000);
pub const MUSIC_HIGH_QUALITY: AudioPreset = AudioPreset::new(96_000);
pub const MUSIC_HIGH_QUALITY_STEREO: AudioPreset = AudioPreset::new(128_000);

pub const PRESETS: &[AudioPreset] =
&[TELEPHONE, SPEECH, MUSIC, MUSIC_STEREO, MUSIC_HIGH_QUALITY, MUSIC_HIGH_QUALITY_STEREO];
Expand Down
2 changes: 1 addition & 1 deletion livekit/src/room/participant/local_participant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl LocalParticipant {
LocalTrack::Audio(_audio_track) => {
// Setup audio encoding
let audio_encoding =
options.audio_encoding.as_ref().unwrap_or(&options::audio::SPEECH.encoding);
options.audio_encoding.as_ref().unwrap_or(&options::audio::MUSIC.encoding);

encodings.push(RtpEncodingParameters {
max_bitrate: Some(audio_encoding.max_bitrate),
Expand Down

0 comments on commit 9788054

Please sign in to comment.