MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.db.stream.StandardQueryWAVFile Class Reference

The StandardQueryWAVFile provides queries that read sound frequencies from (*.WAV) files residing in a given directory. More...

Inheritance diagram for MyCaffe.db.stream.StandardQueryWAVFile:
MyCaffe.db.stream.IXCustomQuery

Public Member Functions

 StandardQueryWAVFile (string strParam=null)
 The constructor. More...
 
IXCustomQuery Clone (string strParam)
 Clone the custom query returning a new copy. More...
 
void Close ()
 Close the custom query. More...
 
void Open ()
 Open the custom query. The query must be opened before calling QueryBytes. More...
 
double[] QueryByTime (DateTime dt, TimeSpan ts, int nCount)
 The QueryByTime method is not implemented. More...
 
byte[] QueryBytes ()
 The QueryBytes method is not implemented. More...
 
List< double[]> QueryRealD ()
 The QueryRealD method returns all samples of the next file in the directory. More...
 
List< float[]> QueryRealF ()
 The QueryRealF method returns all samples of the next file in the directory. More...
 
Dictionary< string, float > QueryInfo ()
 The Query information returns information about the data queried such as header information. More...
 
List< int > GetQuerySize ()
 The GetQuerySize method returns the size of the query as {1,1,filesize}. More...
 
void Reset ()
 Reset the file index to the first file. More...
 
byte[] ConvertOutput (float[] rg, out string strType)
 Converts the output values into the native type used by the CustomQuery. More...
 

Static Public Member Functions

static byte[] PackBytes (WaveFormat fmt, List< float[]> rgSamples)
 The PackBytes method packs the wav file information into a byte stream. More...
 
static List< double[]> UnPackBytes (byte[] rg, out WaveFormat fmt)
 The UnPackBytes method is used to unpack a byte stream into the Wav information. More...
 

Properties

CUSTOM_QUERY_TYPE QueryType [get]
 Returns the QUERY_TYPE of REAL_FLOAT. More...
 
string Name [get]
 Returns the custom query name 'StdWAVFileQuery'. More...
 
int FieldCount [get]
 Returns the field count of 1. More...
 
- Properties inherited from MyCaffe.db.stream.IXCustomQuery
CUSTOM_QUERY_TYPE QueryType [get]
 Returns the custom query type supported by the custom query. More...
 
string Name [get]
 Returns the name of the Custom Query. More...
 
int FieldCount [get]
 Returns the field count for this query. More...
 

Detailed Description

The StandardQueryWAVFile provides queries that read sound frequencies from (*.WAV) files residing in a given directory.

Definition at line 14 of file StandardQueryWAVFile.cs.

Constructor & Destructor Documentation

◆ StandardQueryWAVFile()

MyCaffe.db.stream.StandardQueryWAVFile.StandardQueryWAVFile ( string  strParam = null)

The constructor.

Parameters
strParamSpecifies the parameters which shold contains the 'FilePath'=path key=value pair.

Definition at line 25 of file StandardQueryWAVFile.cs.

Member Function Documentation

◆ Clone()

IXCustomQuery MyCaffe.db.stream.StandardQueryWAVFile.Clone ( string  strParam)

Clone the custom query returning a new copy.

Parameters
strParamOptionally, initialize the new copy with these parameters.
Returns
The new copy is returned.

Implements MyCaffe.db.stream.IXCustomQuery.

Definition at line 64 of file StandardQueryWAVFile.cs.

◆ Close()

void MyCaffe.db.stream.StandardQueryWAVFile.Close ( )

Close the custom query.

Implements MyCaffe.db.stream.IXCustomQuery.

Definition at line 72 of file StandardQueryWAVFile.cs.

◆ ConvertOutput()

byte[] MyCaffe.db.stream.StandardQueryWAVFile.ConvertOutput ( float[]  rg,
out string  strType 
)

Converts the output values into the native type used by the CustomQuery.

Parameters
rgSpecifies the raw output data.
strTypeReturns the output type.
Returns
The converted output data is returned as a byte stream.

Implements MyCaffe.db.stream.IXCustomQuery.

Definition at line 296 of file StandardQueryWAVFile.cs.

◆ GetQuerySize()

List< int > MyCaffe.db.stream.StandardQueryWAVFile.GetQuerySize ( )

The GetQuerySize method returns the size of the query as {1,1,filesize}.

Returns
The query size is returned.

Implements MyCaffe.db.stream.IXCustomQuery.

Definition at line 266 of file StandardQueryWAVFile.cs.

◆ Open()

void MyCaffe.db.stream.StandardQueryWAVFile.Open ( )

Open the custom query. The query must be opened before calling QueryBytes.

Implements MyCaffe.db.stream.IXCustomQuery.

Definition at line 81 of file StandardQueryWAVFile.cs.

◆ PackBytes()

static byte[] MyCaffe.db.stream.StandardQueryWAVFile.PackBytes ( WaveFormat  fmt,
List< float[]>  rgSamples 
)
static

The PackBytes method packs the wav file information into a byte stream.

Parameters
fmtSpecifies the wav file format.
rgSamplesSpecifies the wav file samples.
Returns
The byte stream is returned.

Definition at line 201 of file StandardQueryWAVFile.cs.

◆ QueryBytes()

byte[] MyCaffe.db.stream.StandardQueryWAVFile.QueryBytes ( )

The QueryBytes method is not implemented.

Returns
not used.

Implements MyCaffe.db.stream.IXCustomQuery.

Definition at line 118 of file StandardQueryWAVFile.cs.

◆ QueryByTime()

double[] MyCaffe.db.stream.StandardQueryWAVFile.QueryByTime ( DateTime  dt,
TimeSpan  ts,
int  nCount 
)

The QueryByTime method is not implemented.

Parameters
dtnot used.
tsnon used.
nCountnot used.
Returns
not used.

Implements MyCaffe.db.stream.IXCustomQuery.

Definition at line 109 of file StandardQueryWAVFile.cs.

◆ QueryInfo()

Dictionary< string, float > MyCaffe.db.stream.StandardQueryWAVFile.QueryInfo ( )

The Query information returns information about the data queried such as header information.

Returns
The information about the data is returned.

Implements MyCaffe.db.stream.IXCustomQuery.

Definition at line 170 of file StandardQueryWAVFile.cs.

◆ QueryRealD()

List< double[]> MyCaffe.db.stream.StandardQueryWAVFile.QueryRealD ( )

The QueryRealD method returns all samples of the next file in the directory.

Returns
All samples along with the format are returned where the format is placed in the last array.

Implements MyCaffe.db.stream.IXCustomQuery.

Definition at line 127 of file StandardQueryWAVFile.cs.

◆ QueryRealF()

List< float[]> MyCaffe.db.stream.StandardQueryWAVFile.QueryRealF ( )

The QueryRealF method returns all samples of the next file in the directory.

Returns
All samples along with the format are returned where the format is placed in the last array.

Implements MyCaffe.db.stream.IXCustomQuery.

Definition at line 161 of file StandardQueryWAVFile.cs.

◆ Reset()

void MyCaffe.db.stream.StandardQueryWAVFile.Reset ( )

Reset the file index to the first file.

Implements MyCaffe.db.stream.IXCustomQuery.

Definition at line 285 of file StandardQueryWAVFile.cs.

◆ UnPackBytes()

static List< double[]> MyCaffe.db.stream.StandardQueryWAVFile.UnPackBytes ( byte[]  rg,
out WaveFormat  fmt 
)
static

The UnPackBytes method is used to unpack a byte stream into the Wav information.

Parameters
rgSpecifies the byte stream.
fmtReturns the WAV file format.
Returns
Returns the WAV file samples.

Definition at line 232 of file StandardQueryWAVFile.cs.

Property Documentation

◆ FieldCount

int MyCaffe.db.stream.StandardQueryWAVFile.FieldCount
get

Returns the field count of 1.

Definition at line 54 of file StandardQueryWAVFile.cs.

◆ Name

string MyCaffe.db.stream.StandardQueryWAVFile.Name
get

Returns the custom query name 'StdWAVFileQuery'.

Definition at line 46 of file StandardQueryWAVFile.cs.

◆ QueryType

CUSTOM_QUERY_TYPE MyCaffe.db.stream.StandardQueryWAVFile.QueryType
get

Returns the QUERY_TYPE of REAL_FLOAT.

Definition at line 38 of file StandardQueryWAVFile.cs.


The documentation for this class was generated from the following file: