Hi!
I am trying out VoiceProfile enrollment on CognitiveServices in C# via Microsoft.CognitiveServices.Speech.csharp library.
The speech to text part (SpeechRecognizer) works excellent, but when I try to use Voice Profile enrollment (client.EnrollProfileAsync) it returns error 404 "Resource not found" every time.
This is my test code:
public static async Task<VoiceProfile> VerificationEnroll(string filename, string name)
{
try
{
SpeechConfig config = SpeechConfig.FromSubscription("<MY_KEY_HERE>", "westus");
var profileMapping = new Dictionary<string, string>();
using (var client = new VoiceProfileClient(config))
using (var profile = await client.CreateProfileAsync(VoiceProfileType.TextIndependentVerification, "en-us"))
{
using (var audioInput = AudioConfig.FromWavFileInput(filename))
{
Console.WriteLine($"Enrolling profile id {profile.Id}.");
// give the profile a human-readable display name
profileMapping.Add(profile.Id, name);
VoiceProfileEnrollmentResult result = null;
result = await client.EnrollProfileAsync(profile, audioInput);
if (result.Reason == ResultReason.EnrolledVoiceProfile)
{
await SpeakerVerify(config, profile, profileMapping);
}
else if (result.Reason == ResultReason.Canceled)
{
var cancellation = VoiceProfileEnrollmentCancellationDetails.FromResult(result);
Console.WriteLine($"CANCELED {profile.Id}: ErrorCode={cancellation.ErrorCode} ErrorDetails={cancellation.ErrorDetails}");
}
}
return profile;
}
}
catch (Exception ex)
{
return null;
}
}
I have understood that Voice profiling is only supported in westus region. As I am in Northern Europe, my first guess was that because my Azure resource was created for north europe, that was the issue. So I have created a separate resource to run these tests in westus region, but without any luck.
Anyone has any ideas what the issue is?
BR
Per




