private async void DeleteEnrollment(Guid speakerid) { try { Console.WriteLine("In"); SpeakerIdentificationServiceClient _serviceClient = new SpeakerIdentificationServiceClient(speakerAPISubscriptionKey); await _serviceClient.ResetEnrollmentsAsync(speakerid); Console.WriteLine("Done"); } catch (Exception ex) { Console.WriteLine("Error : " + ex.Message); } }
private async void btnResetEnroll_Click(object sender, RoutedEventArgs e) { txtInfo.Text = ""; if (lbProfiles.SelectedIndex < 0) { txtInfo.Text = "Get profiles and select one of them"; return; } _speakerId = Guid.Parse((lbProfiles.SelectedItem as ListBoxItem).Content.ToString()); try { await _serviceClient.ResetEnrollmentsAsync(_speakerId); txtInfo.Text = "Enrollments reset operation succesful"; } catch { } }