Class SpeexEncoderPage
- Assembly
- VisioForge.Core.dll
Configuration page for the Speex audio encoder.
public class SpeexEncoderPage : Page, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, INotifyPropertyChanged, IComponentConnectorInheritance
Implements
Inherited Members
Remarks
Speex is an open-source audio codec specifically designed for speech compression. It was developed as part of the Xiph.org project and is optimized for Voice over IP (VoIP) and other speech applications. Speex provides excellent compression for speech while maintaining intelligibility at very low bitrates.
Key features of the Speex encoder: - Optimized for speech compression (8-32 kHz sampling rates) - Multiple encoding modes (narrowband, wideband, ultra-wideband) - Variable bitrate (VBR) encoding for optimal quality/size ratio - Voice Activity Detection (VAD) to reduce bandwidth during silence - Adjustable quality settings (0-10 scale) - Low computational complexity - Patent-free and royalty-free codec
Encoding modes: - Narrowband (8 kHz): Telephone quality speech - Wideband (16 kHz): Higher quality speech, comparable to AM radio - Ultra-wideband (32 kHz): Very high quality speech - Auto: Automatically selects mode based on input
Common use cases: - VoIP applications and softphones - Podcast recording and distribution - Voice messaging systems - Speech recording and archival - Low-bandwidth communication systems
Note: While Speex excels at speech compression, it's not suitable for music or general audio. For music encoding, consider using Vorbis or Opus instead.
Constructors
SpeexEncoderPage()
Initializes a new instance of the VisioForge.Core.UI.WPF.Dialogs.OutputFormats.Pages.SpeexEncoderPage class. Sets up the UI components and populates bitrate and mode options.
public SpeexEncoderPage()Properties
Bitrate
Gets or sets the target bitrate for encoding in kilobits per second (Kbps).
public float Bitrate { get; set; }Property Value
Bitrates
Gets or sets the bitrates.
public ObservableCollection<float> Bitrates { get; set; }Property Value
Mode
Gets or sets the Speex encoding mode.
public SpeexEncoderMode Mode { get; set; }Property Value
ModeStr
Gets or sets the mode (as string).
public string ModeStr { get; set; }Property Value
Modes
Gets or sets the mode list.
public ObservableCollection<string> Modes { get; set; }Property Value
Quality
Gets or sets the encoding quality level.
public float Quality { get; set; }Property Value
VAD
Gets or sets a value indicating whether Voice Activity Detection (VAD) is enabled.
public bool VAD { get; set; }Property Value
VBR
Gets or sets a value indicating whether Variable Bitrate (VBR) encoding is enabled.
public bool VBR { get; set; }Property Value
Methods
Fill(ref SpeexEncoderSettings)
Fills the provided settings object with values from the UI controls.
public void Fill(ref SpeexEncoderSettings settings)Parameters
settingsSpeexEncoderSettings-
The settings object to populate with current UI values.
GetPageType()
Gets the encoder settings type associated with this configuration page.
public Type GetPageType()Returns
- Type
-
The VisioForge.Core.Types.X.AudioEncoders.SpeexEncoderSettings type.
Init(SpeexEncoderSettings)
Initializes the encoder page with existing settings.
public void Init(SpeexEncoderSettings settings)Parameters
settingsSpeexEncoderSettings-
The Speex encoder settings to load into the UI.
InitializeComponent()
InitializeComponent
public void InitializeComponent()SetProperty<T>(ref T, T, string)
Sets the property.
protected bool SetProperty<T>(ref T field, T newValue, string propertyName = null)Parameters
fieldT-
The field.
newValueT-
The new value.
propertyNamestring-
Name of the property.
Returns
- bool
-
trueif successed,falseotherwise.
Type Parameters
T-
Type.
PropertyChanged
Property changed event.
public event PropertyChangedEventHandler PropertyChanged