Closed wang3t closed 7 years ago
@wang3t It seems that you missed the trailing slash and at the end of endpoint.
Found the issue, missing the closing "/". Modified : EndPpoin:https://westus.api.cognitive.microsoft.com/face/v1.0/
Closing.
missing the closing "/" It saved my life ;p
In python simply this worked for me. ENDPOINT='https://westcentralus.api.cognitive.microsoft.com'
Even after putting slash in my endpoint at the end, I am still facing the issue.
Encountered exception. (404) Resource not found
I am having the same issue as well using the exact example and in westus and using the trailing "/" yet still I keep getting 404 Resource not found using Cognitive Services. I tried creating from Endpoint and from Subscription with the same error. string subscriptionKey = _azuresubscriptionKey; string region = _azureRegion; var azureSpeechServiceUri = new Uri(_azureSpeechServicesPath); // var config = SpeechConfig.FromSubscription(subscriptionKey, region);
var config = SpeechConfig.FromEndpoint(azureSpeechServiceUri, subscriptionKey);
config.SpeechRecognitionLanguage = "en-us";
// persist profileMapping if you want to store a record of who the profile is
var profileMapping = new Dictionary<string, string>();
await VerificationEnroll(config, profileMapping);
The createProfileAsync always returns an empty Profile Id.
var client = new VoiceProfileClient(config); var profile = await client.CreateProfileAsync(VoiceProfileType.TextIndependentVerification, "en-us");
var audioInput = AudioConfig.FromDefaultMicrophoneInput();
CurrentInstructions.Text = $"Enrolling profile id {profile.Id}.";
// give the profile a human-readable display name
profileMapping.Add(profile.Id, "Mark");
VoiceProfileEnrollmentResult result = null;
while (result is null || result.RemainingEnrollmentsSpeechLength > TimeSpan.Zero)
{
CurrentInstructions.Text = "Continue speaking to add to the profile enrollment sample.";
result = await client.EnrollProfileAsync(profile, audioInput);
CurrentInstructions.Text = $"Remaining enrollment audio time needed: {result.RemainingEnrollmentsSpeechLength}";
}
if (result.Reason == ResultReason.EnrolledVoiceProfile)
{
await SpeakerVerify(config, profile, profileMapping);
}
else if (result.Reason == ResultReason.Canceled)
{
var cancellation = VoiceProfileEnrollmentCancellationDetails.FromResult(result);
CurrentInstructions.Text = $"CANCELED {profile.Id}: ErrorCode={cancellation.ErrorCode} ErrorDetails={cancellation.ErrorDetails}";
}
error NSError * domain: @"POFaceServiceClient error - http response is not success : { \"statusCode\": 404, \"message\": \"Resource not found\" }" - code: 404 0x00000001c4251f70
Q: What cause the error with code 404 ? Am I missing something (UserInfo?)