Git Product home page Git Product logo

cognitive-speakerrecognition-windows's Introduction

Microsoft Speaker Recognition API: Windows Client Library & Sample

This repo contains the Windows client library & sample for the Microsoft Speaker Recognition API, an offering within Microsoft Cognitive Services, formerly known as Project Oxford.

The sample

The sample includes three applications:

  1. two Windows WPF applications to demonstrate the use of identification and verification features of Speaker Recognition API for single-speaker short audios.
  2. a Windows WPF application to demonstrate an approach to use identification on potentially longer audios that contain multiple speakers by streaming a few seconds at a time.

Build the sample

  1. Starting in the folder where you clone the repository (this folder)
  2. In a git command line tool, type git submodule init (or do this through a UI)
  3. Pull in the shared Windows code by calling git submodule update
  4. Start Microsoft Visual Studio 2015 and select File > Open > Project/Solution.
  5. For speaker identification, starting in the folder where you clone the repository, go to SpeakerRecognition > Windows > Identification folder. For speaker verification, starting in the folder where you clone the repository, go to SpeakerRecognition > Windows > Verification folder. For speaker steaming, starting in the folder where you clone the repository, go to SpeakerRecognition > Windows > Streaming folder.
  6. Double-click the Visual Studio 2015 Solution (.sln) file.
  7. Press Ctrl+Shift+B, or select Build > Build Solution.

Run the sample

After the build is complete, press F5 to run the sample.

First, you must obtain a Speaker Recognition API subscription key by following the instructions on our website.

Locate the text edit box saying "Paste your subscription key here to start". Paste your subscription key. You can choose to persist your subscription key in your machine by clicking the "Save Key" button. When you want to delete the subscription key from the machine, click "Delete Key" to remove it from your machine.

Click on "Select Scenario" to use samples of different scenarios, and follow the instructions on screen.

Streaming Audio File

  1. Start with the "Enroll Speakers" scenario to prepare the speakers you will identify against.
  2. In the "Stream File" scenario, Press "Load File" button and load your audio file.
  3. Select the profiles you want to use as candidate speakers.
  4. Control the number of seconds used with each identification request by tuning the "window size".
  5. Control the number of seconds between each identification request through tuning the "step size".
  6. Press "Stream" button and monitor the results of the streaming process.

Note: Make sure that the number of requests per minute resulting from tunning the step size won't exceed your subscription's rate limit. For example, applying a step size of 1 on an audio file of size 1 minute will result in 60 requests. Applying a step size of 2 on the same audio file will result in 30 requests. For your convenience, we have provided sample audios to enroll 2 speakers and a sample audio for streaming. These audios are found under SpeakerRecognition\Windows\Streaming\SPIDStreamingAPI-WPF-Samples\SampleAudios.

Contributing

We welcome contributions. Feel free to file issues and pull requests on the repo and we'll address them as we can. Learn more about how you can help on our Contribution Rules & Guidelines.

You can reach out to us anytime with questions and suggestions using our communities below:

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

License

All Microsoft Cognitive Services SDKs and samples are licensed with the MIT License. For more details, see LICENSE.

Sample images are licensed separately, please refer to LICENSE-IMAGE.

cognitive-speakerrecognition-windows's People

Contributors

delfu avatar hoda-gharieb avatar lightfrenzy avatar m-sherif avatar msftgits avatar yara11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cognitive-speakerrecognition-windows's Issues

The request amount for streaming is doubled, readme.md is incorrect

I'm trying Speaker Recognition API, in Azure document, the API call limit is 20/min.
I make a streaming identification application which is modified from streaming demo, I set the step to 3s, which will send 20 API calls based on readme.md. But I get error after 30s, it shows { "error": { "code": "RateLimitExceeded", "message": "Rate limit is exceeded. Try again later." } }.

Then I setup Fiddler to monitor traffic, I found the identification process actually includes two API calls, one is uploading WAV file and get an URL to the result operation, another one is getting real result from this URL.

This behavior doubles request amount, which made the minimum step 6 seconds, it's too large for streaming.

I think Azure should raise the API call limit or provide a pricing option to get higher limit.

Exception with an error code: 0x5 (SPXERR_INVALID_ARG) when trying to Enroll

Hi I'm getting the following error when trying to Enroll a profile.

The profile is an Identification profile , and exists.

The error occurs when i call
result = await client.EnrollProfileAsync(profile, audioConfig);

I am trying to create, 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

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()

Is it possible to use this module for authenticating user in a xamarin App?

I am developping an application using xamarin and would like to know who to identify the voice of the person who is speaking; even if many people say the same word for instance the word "John" at the same time, the app should check if among these people (the voices) there is one that is known(should have access to a part of my app. Is this possible? How can I proceed?

Spanish support

Hello,

When the api will support spanish (Latinoamerica, Mexico, Argentina, etc)?

Thanks

Sppech Identification

Hi,

I am using Microsoft Cognitive Services speech API for my research . As I started using speech Identification API I see one problem with female voice identification . The system is falsely identifying speaker . It is accepting the different female speaker.
Steps I followed
1)Enroll female speaker1
2)Try to identify speaker 2 against speaker1
3)The system identified speaker 2 same as speaker 1
I don't see this problem with male speaker. I am not sure if I need to set any parameter for female speaker or is it a flaw. Can anyone guide me on this.

SpeechNotRecognized when recorded in browser

I recorded my voice in my Chrome browser in the correct format (16 bit, 16khz mono) and I get a speechNotRecognized error. However, when I export the Wav file in Audacity without changing anything, my voice enrolls perfectly. The two recordings sound identical so I am confused as to why one gets accepted and not the other.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.