O'Reilly logo

Learning Microsoft Cognitive Services - Second Edition by Leif Larsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Identifying the speaker

The last step is to identify the speaker, which we will do in the HomeView and corresponding HomeViewModel. We do not need to modify the UI much, but we do need to add two buttons, to start and stop the recording. Alternatively, if you are not using a microphone, you can get away with one button for browsing to an audio file. Either way, add corresponding ICommand properties in the ViewModel.

We also need to add private members for the Recording class, and SpeakerIdentification class. Both should be created in the constructor, where we should inject ISpeakerIdentificationServiceClient as well.

In the Initialize function, subscribe to the required events:

 _speakerIdentification.OnSpeakerIdentificationError += OnSpeakerIdentificationError; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required