Ticket #13180 (closed patch: fixed)

Opened 14 months ago

Last modified 8 months ago

Simple silence suppression for voice

Reported by: haakon Owned by: darkrain42
Milestone: 2.8.0 Component: Voice and Video
Version: 2.7.9 Keywords: voice silence suppression
Cc: datallah

Description

During a voice call, Pidgin now sends constant audio traffic, even when there is silence. Especially on slower connections, this can waste considerable amount of bandwidth by transmitting nothing but ambient noise.

I used peak level data from GstLevel? in the input branch of media pipeline to control a GstValve? put between audio source and Farsight confbin. Whenever the peak drops below defined threshold, the valve gets closed, when sound level reaches above the threshold, valve opens again. This effectively blocks sending data over network in the silent periods and in my tests this simple method worked quite well.

Silence threshold might need to be fine tuned (or switched off at all) depending on microphone hardware and/or the noisiness of surrounding environment. I will propose an user interface for this in a separate ticket.

Future improvement can be adding support for comfort noise (RFC3389), as the line now stays completely mute when suppression is active, which can be a bit distracting.

I made a tiny change in level parameter that is passed to PurpleMedia?'s "level" signal handlers. The value converted from dB to percent was multiplied by five. Searching through source code history seems this was done to make the value variation displayed on call dialog level meter widgets look bigger. I think it is better not to confuse future developers and pass the unmodified percent value to the handler and multiply only in gtkmedia.c: level_message_cb() where it has reason.

Attachments

Simple-silence-suppression.patch (5.5 kB) - added by haakon 14 months ago.
Make-silence-suppression-optional-per-account.patch (6.6 kB) - added by haakon 13 months ago.
Fix segfault when protocol plugin can not be found

Change History

Changed 14 months ago by haakon

  Changed 14 months ago by rekkanoryo

  • type changed from enhancement to patch
  • milestone set to Patches Needing Review

If you're submitting a patch, the ticket should be a patch ticket, not an enhancement or defect.

  Changed 14 months ago by haakon

For GUI allowing users to tune silence threshold see #13182

  Changed 14 months ago by rekkanoryo

  • milestone changed from Patches Needing Review to 2.7.10

  Changed 13 months ago by rekkanoryo

  • owner changed from Maiku to darkrain42

In looking at this patch, I'm a bit concerned that removing the multiplication may be something that we should wait until 2.8.0 or 3.0.0 for, since it's technically a behavior change. I may be wrong on that. I'm just concerned that if that multiplication is removed, any downstream libpurple frontends may see different behavior than they did previously and it may not be expected.

Feel free to call me an idiot or convince me that it doesn't matter. After all, I don't muck about in VV stuff; I'm just the monkey that commits patches on occasion :)

Assigning this to darkrain42 just to see if he'll give a quick opinion on it.

follow-up: ↓ 6   Changed 13 months ago by BigBrownChunx

Silence suppression can cause issues on some SIP (possibly other protocols too?) setups and should be optional per-account.

in reply to: ↑ 5   Changed 13 months ago by haakon

Replying to BigBrownChunx:

Silence suppression can cause issues on some SIP (possibly other protocols too?) setups and should be optional per-account.

Make-silence-suppression-optional-per-account.patch should implement this request.

Changed 13 months ago by haakon

Fix segfault when protocol plugin can not be found

  Changed 12 months ago by darkrain42

  • milestone changed from 2.7.11 to 2.8.0

I'm not totally keen on the UI (but I say that not really having a better idea)

  Changed 12 months ago by rekkanoryo@…

(In [fb4d2b014576462db99d919dea15fbed03f1f48a]):
Credit where due. Refs #13180.

  Changed 12 months ago by jakub.adam@…

  • status changed from new to closed
  • resolution set to fixed

(In [36f7981726410932b6262c6e29dfa937447f7779]):
Make the simple silence suppression stuff optional per-account. Fixes #13180.

  Changed 12 months ago by rekkanoryo@…

(In [00d82ac80e3aef1bae2cc576f8f909c224c576b4]):
Credit where due again. Refs #13180.

  Changed 8 months ago by ocrete

You don't want to do that:

1. Codecs like speex do it automatically for you and produce CN, but you have to keep giving the encoder packets so it can do its magic 2. you want to be careful about silence supression because of Wiress MM extensions... if you wireless card and router support that you will not get incoming packets fast enough unless you keep on sending 3. If you do silence suppression without CN, then you will hear a "click" or a "pop" every time you start/stop sending and it degrades the perceived voice quality quite a bit 4. Voice is really low bandwidth anyway and its only the maximum bandwidth that matters

  Changed 8 months ago by datallah

  • cc datallah added
Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!