Page 1 of 1

Error capturing voice

PostPosted: Nov 08, 2017 02:56
by gtoledo
Hi,

I"m trying to capture a voice sample using the following code

Code: Select all
public void StartCapture()
{
    _biometricClient = new NBiometricClient
    {
        UseDeviceManager = true,
        BiometricTypes = NBiometricType.Voice,
        VoicesExtractTextDependentFeatures = true,
        VoicesExtractTextIndependentFeatures = false,
        VoicesUniquePhrasesOnly = false,
        VoiceCaptureDevice = _nmicrophone
    };

    _biometricClient.Initialize();
    _voice = new NVoice { CaptureOptions = NBiometricCaptureOptions.Stream };
    _subject = new NSubject();
    _subject.Voices.Add(_voice);
    ((MicNeuroRSControl)this.DisplayControl).ControlVisualizacionNeuro.Voice = _voice;
    Neurotec.Biometrics.Gui.NVoiceView aaaa = new Neurotec.Biometrics.Gui.NVoiceView();
    aaaa.Voice = _voice;
    task = _biometricClient.CreateTask(NBiometricOperations.Capture | NBiometricOperations.Segment, _subject);
    _biometricClient.BeginPerformTask(task, OnCapturingCompleted, null);
}

private void OnCapturingCompleted(IAsyncResult r)
{
    NBiometricTask task = _biometricClient.EndPerformTask(r);
    NBiometricStatus status = task.Status;
    if (task.Error != null)
        throw task.Error;
   else
   {
      //more stuff here
   }
}


On our develop machine everything works fine, but on the tester"s PC I get the following error :
The error is on the callback of the task, and it"s getting called as soon as the capture task is started.
Error: Neurotec.Runtime.InteropServices.NWin32Exception (-1072875819): El objeto o valor especificado no existe. (The object or specified value does not exist)
at WMReaderStartInternal_callback
--- End of external call stack ---
--- End of remote call stack ---
--- End of remote call stack ---
--- End of unmanaged stack trace ---


Can you please tell me why is this occurring or how can we solve this?

Thanks

Re: Error capturing voice

PostPosted: Nov 08, 2017 16:25
by MartynasV
gtoledo wrote:Hi,

I"m trying to capture a voice sample using the following code

Code: Select all
public void StartCapture()
{
    _biometricClient = new NBiometricClient
    {
        UseDeviceManager = true,
        BiometricTypes = NBiometricType.Voice,
        VoicesExtractTextDependentFeatures = true,
        VoicesExtractTextIndependentFeatures = false,
        VoicesUniquePhrasesOnly = false,
        VoiceCaptureDevice = _nmicrophone
    };

    _biometricClient.Initialize();
    _voice = new NVoice { CaptureOptions = NBiometricCaptureOptions.Stream };
    _subject = new NSubject();
    _subject.Voices.Add(_voice);
    ((MicNeuroRSControl)this.DisplayControl).ControlVisualizacionNeuro.Voice = _voice;
    Neurotec.Biometrics.Gui.NVoiceView aaaa = new Neurotec.Biometrics.Gui.NVoiceView();
    aaaa.Voice = _voice;
    task = _biometricClient.CreateTask(NBiometricOperations.Capture | NBiometricOperations.Segment, _subject);
    _biometricClient.BeginPerformTask(task, OnCapturingCompleted, null);
}

private void OnCapturingCompleted(IAsyncResult r)
{
    NBiometricTask task = _biometricClient.EndPerformTask(r);
    NBiometricStatus status = task.Status;
    if (task.Error != null)
        throw task.Error;
   else
   {
      //more stuff here
   }
}


On our develop machine everything works fine, but on the tester"s PC I get the following error :
The error is on the callback of the task, and it"s getting called as soon as the capture task is started.
Error: Neurotec.Runtime.InteropServices.NWin32Exception (-1072875819): El objeto o valor especificado no existe. (The object or specified value does not exist)
at WMReaderStartInternal_callback
--- End of external call stack ---
--- End of remote call stack ---
--- End of remote call stack ---
--- End of unmanaged stack trace ---


Can you please tell me why is this occurring or how can we solve this?

Thanks

Hello gtoledo,

We are aware of this issue(it was recently added to our bug list) and our developers are currently investigating it.
You could write to support@neurotechnology.com with link to this thread, then we could inform you when this issue is fixed.

P.S. It seems that this issue is not reproducible on Windows 8.1 (maybe OS specific).

Re: Error capturing voice

PostPosted: Nov 17, 2017 12:58
by MartynasV
Hello,

Fix for this bug is made and will be released with upcoming SDK update(it should be released in about 1 month).