Top |
gboolean | echo-cancel | Read / Write / Construct |
gboolean | experimental-agc | Read / Write / Construct |
gboolean | extended-filter | Read / Write / Construct |
gboolean | gain-control | Read / Write / Construct |
gboolean | high-pass-filter | Read / Write / Construct |
gboolean | noise-suppression | Read / Write / Construct |
gchar * | probe | Read / Write / Construct |
GstWebrtcEchoSuppressionLevel | echo-suppression-level | Read / Write / Construct |
GstWebrtcNoiseSuppressionLevel | noise-suppression-level | Read / Write / Construct |
gboolean | delay-agnostic | Read / Write / Construct |
gint | compression-gain-db | Read / Write / Construct |
GstWebrtcGainControlMode | gain-control-mode | Read / Write / Construct |
gboolean | limiter | Read / Write / Construct |
gint | startup-min-volume | Read / Write / Construct |
gint | target-level-dbfs | Read / Write / Construct |
gboolean | voice-detection | Read / Write / Construct |
gint | voice-detection-frame-size-ms | Read / Write / Construct |
GstWebrtcVoiceDetectionLikelihood | voice-detection-likelihood | Read / Write / Construct |
GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement ╰── GstBaseTransform ╰── GstAudioFilter ╰── GstWebrtcDsp
A voice enhancement filter based on WebRTC Audio Processing library. This library provides a whide variety of enhancement algorithms. This element tries to enable as much as possible. The currently enabled enhancements are High Pass Filter, Echo Canceller, Noise Suppression, Automatic Gain Control, and some extended filters.
While webrtcdsp element can be used alone, there is an exception for the echo canceller. The audio canceller need to be aware of the far end streams that are played to loud speakers. For this, you must place a webrtcechoprobe element at that far end. Note that the sample rate must match between webrtcdsp and the webrtechoprobe. Though, the number of channels can differ. The probe is found by the DSP element using it's object name. By default, webrtcdsp looks for webrtcechoprobe0, which means it just work if you have a single probe and DSP.
The probe can only be used within the same top level GstPipeline. Additonally, to simplify the code, the probe element must be created before the DSP sink pad is activated. It does not need to be in any particular state and does not even need to be added to the pipeline yet.
As a conveniance, the echo canceller can be tested using an echo loop. In this configuration, one would expect a single echo to be heard.
1 |
gst-launch-1.0 pulsesrc ! webrtcdsp ! webrtcechoprobe ! pulsesink |
In real environment, you'll place the probe before the playback, but only process the far end streams. The DSP should be placed as close as possible to the audio capture. The following pipeline is astracted and does not represent a real pipeline.
1 2 |
gst-launch-1.0 far-end-src ! audio/x-raw,rate=48000 ! webrtcechoprobe ! pulsesink \ pulsesrc ! audio/x-raw,rate=48000 ! webrtcdsp ! far-end-sink |
plugin |
webrtcdsp |
author |
Nicolas Dufresne <nicolas.dufresne@collabora.com> |
class |
Generic/Audio |
name |
sink |
direction |
sink |
presence |
always |
details |
audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int){ 48000, 32000, 16000, 8000 }, channels=(int)[ 1, 2147483647 ] |
name |
src |
direction |
source |
presence |
always |
details |
audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int){ 48000, 32000, 16000, 8000 }, channels=(int)[ 1, 2147483647 ] |
“echo-cancel”
property“echo-cancel” gboolean
Enable or disable echo canceller.
Flags: Read / Write / Construct
Default value: TRUE
“experimental-agc”
property“experimental-agc” gboolean
Enable or disable experimental automatic gain control.
Flags: Read / Write / Construct
Default value: FALSE
“extended-filter”
property“extended-filter” gboolean
Enable or disable the extended filter.
Flags: Read / Write / Construct
Default value: TRUE
“gain-control”
property“gain-control” gboolean
Enable or disable automatic digital gain control.
Flags: Read / Write / Construct
Default value: TRUE
“high-pass-filter”
property“high-pass-filter” gboolean
Enable or disable high pass filtering.
Flags: Read / Write / Construct
Default value: TRUE
“noise-suppression”
property“noise-suppression” gboolean
Enable or disable noise suppression.
Flags: Read / Write / Construct
Default value: TRUE
“probe”
property“probe” gchar *
The name of the webrtcechoprobe element that record the audio being played through loud speakers. Must be set before PAUSED state.
Flags: Read / Write / Construct
Default value: "webrtcechoprobe0"
“echo-suppression-level”
property “echo-suppression-level” GstWebrtcEchoSuppressionLevel
Controls the aggressiveness of the suppressor. A higher level trades off double-talk performance for increased echo suppression.
Flags: Read / Write / Construct
Default value: Moderate Suppression
“noise-suppression-level”
property “noise-suppression-level” GstWebrtcNoiseSuppressionLevel
Controls the aggressiveness of the suppression. Increasing the level will reduce the noise level at the expense of a higher speech distortion.
Flags: Read / Write / Construct
Default value: Moderate Suppression
“delay-agnostic”
property“delay-agnostic” gboolean
Enable or disable the delay agnostic mode.
Flags: Read / Write / Construct
Default value: FALSE
“compression-gain-db”
property“compression-gain-db” gint
Sets the maximum |gain| the digital compression stage may apply, in dB.
Flags: Read / Write / Construct
Allowed values: [0,90]
Default value: 9
“gain-control-mode”
property “gain-control-mode” GstWebrtcGainControlMode
Controls the mode of the compression stage.
Flags: Read / Write / Construct
Default value: Adaptive Digital
“limiter”
property“limiter” gboolean
When enabled, the compression stage will hard limit the signal to the target level. Otherwise, the signal will be compressed but not limited above the target level.
Flags: Read / Write / Construct
Default value: TRUE
“startup-min-volume”
property“startup-min-volume” gint
At startup the experimental AGC moves the microphone volume up to |startup_min_volume| if the current microphone volume is set too low. No effect if experimental-agc isn't enabled.
Flags: Read / Write / Construct
Allowed values: [12,255]
Default value: 12
“target-level-dbfs”
property“target-level-dbfs” gint
Sets the target peak |level| (or envelope) of the gain control in dBFS (decibels from digital full-scale).
Flags: Read / Write / Construct
Allowed values: [0,31]
Default value: 3
“voice-detection”
property“voice-detection” gboolean
Enable or disable the voice activity detector.
Flags: Read / Write / Construct
Default value: FALSE
“voice-detection-frame-size-ms”
property“voice-detection-frame-size-ms” gint
Sets the |size| of the frames in ms on which the VAD will operate. Larger frames will improve detection accuracy, but reduce the frequency of updates.
Flags: Read / Write / Construct
Allowed values: [10,30]
Default value: 10