Show / Hide Table of Contents

Class WavStream

An in memory stream representing a 16 bit, 1 channel, PCM, 8000hz or 16000hz wav file. Provides the ability to return just the raw data without the wav header

Inheritance
object
MarshalByRefObject
Stream
MemoryStream
WavStream
Implements
IAsyncDisposable
IDisposable
IEquatable<WavStream>
Inherited Members
MemoryStream.BeginRead(byte[], int, int, AsyncCallback, object)
MemoryStream.BeginWrite(byte[], int, int, AsyncCallback, object)
MemoryStream.CopyTo(Stream, int)
MemoryStream.CopyToAsync(Stream, int, CancellationToken)
MemoryStream.Dispose(bool)
MemoryStream.EndRead(IAsyncResult)
MemoryStream.EndWrite(IAsyncResult)
MemoryStream.Flush()
MemoryStream.FlushAsync(CancellationToken)
MemoryStream.GetBuffer()
MemoryStream.Read(byte[], int, int)
MemoryStream.Read(Span<byte>)
MemoryStream.ReadAsync(byte[], int, int, CancellationToken)
MemoryStream.ReadAsync(Memory<byte>, CancellationToken)
MemoryStream.ReadByte()
MemoryStream.Seek(long, SeekOrigin)
MemoryStream.SetLength(long)
MemoryStream.ToArray()
MemoryStream.TryGetBuffer(out ArraySegment<byte>)
MemoryStream.Write(byte[], int, int)
MemoryStream.Write(ReadOnlySpan<byte>)
MemoryStream.WriteAsync(byte[], int, int, CancellationToken)
MemoryStream.WriteAsync(ReadOnlyMemory<byte>, CancellationToken)
MemoryStream.WriteByte(byte)
MemoryStream.WriteTo(Stream)
MemoryStream.CanRead
MemoryStream.CanSeek
MemoryStream.CanWrite
MemoryStream.Capacity
MemoryStream.Length
MemoryStream.Position
Stream.Null
Stream.Close()
Stream.CopyTo(Stream)
Stream.CopyToAsync(Stream)
Stream.CopyToAsync(Stream, int)
Stream.CopyToAsync(Stream, CancellationToken)
Stream.CreateWaitHandle()
Stream.Dispose()
Stream.DisposeAsync()
Stream.FlushAsync()
Stream.ObjectInvariant()
Stream.ReadAsync(byte[], int, int)
Stream.Synchronized(Stream)
Stream.ValidateBufferArguments(byte[], int, int)
Stream.ValidateCopyToArguments(Stream, int)
Stream.WriteAsync(byte[], int, int)
Stream.CanTimeout
Stream.ReadTimeout
Stream.WriteTimeout
MarshalByRefObject.GetLifetimeService()
MarshalByRefObject.InitializeLifetimeService()
MarshalByRefObject.MemberwiseClone(bool)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ivrToolkit.Core.Util
Assembly: ivrToolkit.Core.dll
Syntax
public class WavStream : MemoryStream, IAsyncDisposable, IDisposable, IEquatable<WavStream>

Constructors

| Edit this page View Source

WavStream(byte[])

Generates a WavStream from a byte array

Declaration
public WavStream(byte[] buffer)
Parameters
Type Name Description
byte[] buffer

The byte array representing a wav file in the correct format

Exceptions
Type Condition
VoiceException

Thrown if the wav file is not in the correct format

Properties

| Edit this page View Source

WavFormat

The metadata of the wav file.

Declaration
public WaveFormat WavFormat { get; }
Property Value
Type Description
WaveFormat
| Edit this page View Source

WavHeaderLength

The number of bytes the wav header takes up.

Declaration
public int WavHeaderLength { get; }
Property Value
Type Description
int

Methods

| Edit this page View Source

Equals(WavStream)

Two wavStreams are identical if they contain the same bytes

Declaration
public bool Equals(WavStream other)
Parameters
Type Name Description
WavStream other

The other WavStream to compare with

Returns
Type Description
bool

True if the bytes are the same length and content is the same

| Edit this page View Source

GetAudioDataOnly()

Returns the raw wav data without the header

Declaration
public MemoryStream GetAudioDataOnly()
Returns
Type Description
MemoryStream

Implements

IAsyncDisposable
IDisposable
IEquatable<T>

Extension Methods

ValidationExtensions.ThrowIfNull<T>(T, string)
  • View Source
In this article
Back to top Generated by DocFX