Copyright © 2005-2024 MultiMedia Soft

SoundRecognizer.InitHostInfo method

Previous pageReturn to chapter overviewNext page

Remarks

 

Initializes the sound recognizer providing credentials needed for allowing the connection to the ACRCloud servers and for determining which portion of the sound will be used for recognition.

 

For further details about the use of the sound recognizer see the SoundRecognizerMan class.

For details about sound recognition refer to the How to recognize music and obtain related information tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function InitHostInfo (

strAcrCloudHost as String,

strAccessKey as String,

strAccessSecret as String,

nSnippetStartSec as Int32,

nSnippetStopSec as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes InitHostInfo (

string strAcrCloudHost,

string strAccessKey,

string strAccessSecret,

int nSnippetStartSec,

int nSnippetStopSec

);


 

[C++]

public: enumErrorCodes InitHostInfo (

string strAcrCloudHost,

string strAccessKey,

string strAccessSecret,

int nSnippetStartSec,

int nSnippetStopSec

);


 

 

Parameter

Description

 

 

strAcrCloudHost

String containing the URL of the host issued by AcrCloud for connecting to their services

strAccessKey

String containing the access key issued by AcrCloud for connecting to their services

strAccessSecret

String containing the secret key issued by AcrCloud for connecting to their services

nSnippetStartSec

Start position, expressed in seconds, within the sound file where recognition begins; when the recognition is started through the SoundRecognizer.StartOnWasapiDevice method, this value should be set to 0 because recognition starts immediately by capturing sound incoming from the selected WASAPI device

nSnippetStopSec

End position, expressed in seconds, within the sound file where recognition ends; when the recognition is started through the SoundRecognizer.StartOnWasapiDevice method, this value represents the duration in seconds of the sound snippet to analyze; usually a value between 3 and 5 should be enough for most commercial music around

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.