Exception with an error code: 0x5 (SPXERR_INVALID_ARG) or 0x21 (SPXERR_INVALID_HANDLE) when trying to Enroll a VoiceProfile for Speaker Identification
See original GitHub issueHi I’m getting the following errors when trying to Enroll a voice profile for speaker identification and the error changes between versions 1.12.1. and 1.13.0
The profile has been checked and is an Identification profile , and exists.
The error occurs when i call result = await client.EnrollProfileAsync(profile, audioConfig);
I am trying to create the profile, then enroll later… When i create a voiceprofile to pass into the enrollment like this
var profile = new VoiceProfile(profileId)
…rather than creating one with the client seems to be triggering the error. , Does the Enrollment need the profile creating just before? I cannot see a client method for retrieving a created voiceprofile.
Expected behaviour Enrollment occurs or a more meaningful error message is displayed
Environment Using the windows version of SDK OS: windows 10 Version 10.0.18363 Build 18363 Programming language: C# in a project targeting netstandard2.0 Tried enrolling using microphone and wav files and get the same errors. App: Winforms
Version: Microsoft.CognitiveServices.Speech SDK 1.12.1
Error Exception with an error code: 0x5 (SPXERR_INVALID_ARG) Source Microsoft.CognitiveServices.Speech.csharp
Stack trace at Microsoft.CognitiveServices.Speech.Internal.SpxExceptionThrower.ThrowIfFail(IntPtr hr) at Microsoft.CognitiveServices.Speech.Internal.SpxFactory.GetDataFromHandleUsingDelegate(GetResultDelegate functionPtr, InteropSafeHandle handle, Int32 maxCharCount) at Microsoft.CognitiveServices.Speech.VoiceProfileEnrollmentResult…ctor(IntPtr resultHandlePtr) at Microsoft.CognitiveServices.Speech.VoiceProfileClient.<>c__DisplayClass6_0.b__0(InteropSafeHandle h) at Microsoft.CognitiveServices.Speech.VoiceProfileClient.<>c__DisplayClass10_01.<RunAsync>b__0() at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.Tasks.Task.Execute() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at Ossa.VoiceIdentification.Common.SpeechWrapper.<Enroll_TextIndependentVerification>d__19.MoveNext() in C:\Projects\VoiceIdentification\src\Ossa.VoiceIdentification.Common\SpeechWrapper.cs:line 269 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Ossa.VoiceIdentification.WindowsClient.Form1.<btnEnrollMicTextIndependant_Click>d__19.MoveNext() in C:\Projects\VoiceIdentification\src\Ossa.VoiceIdentification.WindowsClient\Form1.cs:line 181 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
If I update to Version: Microsoft.CognitiveServices.Speech SDK 1.13.0 I get the following error
‘Exception with an error code: 0x21 (SPXERR_INVALID_HANDLE)’
at Microsoft.CognitiveServices.Speech.Internal.SpxExceptionThrower.ThrowIfFail(IntPtr hr)
at Microsoft.CognitiveServices.Speech.Internal.SpxFactory.GetDataFromHandleUsingDelegate(GetResultDelegate functionPtr, InteropSafeHandle handle, Int32 maxCharCount)
at Microsoft.CognitiveServices.Speech.VoiceProfileEnrollmentResult…ctor(IntPtr resultHandlePtr)
at Microsoft.CognitiveServices.Speech.VoiceProfileClient.<>c__DisplayClass6_0.<EnrollProfileAsync>b__0(InteropSafeHandle h)
at Microsoft.CognitiveServices.Speech.VoiceProfileClient.<>c__DisplayClass10_01.<RunAsync>b__0() at System.Threading.Tasks.Task
1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Ossa.VoiceIdentification.Common.SpeechWrapper.<Enroll_TextDepenentVerification>d__18.MoveNext() in C:\Projects\VoiceIdentification\src\Ossa.VoiceIdentification.Common\SpeechWrapper.cs:line 243
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Ossa.VoiceIdentification.WindowsClient.Form1.<btnEnrollMic_Click>d__15.MoveNext() in C:\Projects\VoiceIdentification\src\Ossa.VoiceIdentification.WindowsClient\Form1.cs:line 127
Issue Analytics
- State:
- Created 3 years ago
- Comments:18 (4 by maintainers)
Top GitHub Comments
in approximately 3-4 weeks.
The fixes is in the latest release of SDK. The latest version is 1.15.