Click or drag to resize
SpeechEncoder Class
SpeechEncoder handles the encoding of speech audio frames.
Inheritance Hierarchy
SystemObject
  StreamCoders.EncoderSpeechEncoder

Namespace: StreamCoders.Encoder
Assembly: MediaSuite (in MediaSuite.dll) Version: 2.0.5.0 (2.0.5.0)
Syntax
public class SpeechEncoder : ISpeechEncoder, 
	IDisposable

The SpeechEncoder type exposes the following members.

Constructors
  NameDescription
Public methodSpeechEncoder
Default constructor.
Top
Properties
  NameDescription
Public propertyCompatibilityMode
Gets the Compatibility Mode.
Public propertyInputBitsPerSample
Set the size of each sample in bits of the input stream. Default: 16.
Public propertyInputChannels
Set the number of channels the input PCM stream contains. If the channels are greater than 1, then the channels will be merged.
Public propertyInputSampleRate
Gets or sets the input sample rate of the PCM stream. In all cases it must be a valid samplerate used by the selected codec.
Public propertyMaximumInputDataLength
Set/Get the maximum size of the input data in bytes that can be encoded at once.
Public propertyOutputBitrate
Gets or sets the output bitrate of the codec. Default: 64000.
Public propertyPacketDuration
Set/Get maximum packet duration. After calling SetCodec the PacketDuration will have it's default value depending on the codec selected.
Public propertyPayloadType
Set/Get Payload Type of produced RTP packets.
Public propertyCode exampleStreamType
Gets or sets or Sets the StreamType property.
Top
Methods
  NameDescription
Public methodDispose
Destructor.
Public methodEncodeToBuffer
Encodes an array of PCM data to the selected codec and stores it in a byte array.
Note: The size of the input data is dependent on the value of MaximumInputDataLength
Public methodEncodeToFrame
Encodes an array of PCM data to the selected codec and stores it in an RTP Frame.
Note: The size of the input data is dependent on the value of MaximumInputDataLength
Public methodGetCodec
Gets the codec.
Public methodInit
Initializes the SpeechEncoder.
Public methodSetCodec
Sets the Codec the data will be encoded to. This function also set the correct packet duration for the codec.
Top
Extension Methods
  NameDescription
Public Extension MethodCopyOverloaded.
Creates a copy of the object.
(Defined by ObjectExtensions.)
Public Extension MethodCopy(Object)Overloaded.
Creates a deep copy of the object using the supplied object as a target for the copy operation.
(Defined by ObjectExtensions.)
Top
Remarks

SpeechEncoder handles 16-bit sample sizes and 1 channel.

Supported codecs are:

  • G711A
  • G711U
  • G722
  • G722SB
  • G723
  • G726
  • G728
  • G729A
  • AMRNB
  • AMRWB
  • AMRWBE
  • SPEEX NB
  • SPEEX WB

SpeechEncoder is able to produce raw and RTP streams.

See Also