SoundRecognizer.InitInfo method |
|
Remarks
Initializes the sound recognizer providing information 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 InitInfo ( strAccessKey as String, strAccessSecret as String, nSnippetStartSec as Int32, nSnippetStopSec as Int32 ) as enumErrorCodes |
[C#] public enumErrorCodes InitInfo ( string strAccessKey, string strAccessSecret, int nSnippetStartSec, int nSnippetStopSec ); |
[C++] public: enumErrorCodes InitInfo ( string strAccessKey, string strAccessSecret, int nSnippetStartSec, int nSnippetStopSec ); |
Parameter |
Description |
|
|
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. |