├── .gitmodules ├── Streaming ├── SPIDStreamingAPI-WPF-Samples │ ├── images │ │ └── UI_stop.gif │ ├── SampleAudios │ │ ├── TestDialogue.wav │ │ ├── User1_Enrollment.wav │ │ └── User2_Enrollment.wav │ ├── Assets │ │ └── Microsoft-logo_rgb_c-gray.png │ ├── Properties │ │ ├── Settings.settings │ │ ├── Settings.Designer.cs │ │ ├── Resources.Designer.cs │ │ ├── AssemblyInfo.cs │ │ └── Resources.resx │ ├── App.xaml │ ├── packages.config │ ├── App.config │ ├── MainWindow.xaml │ ├── SpeakersListPage.xaml │ ├── App.xaml.cs │ ├── MainWindow.xaml.cs │ ├── EnrollSpeakersPage.xaml │ └── StreamPage.xaml ├── Microsoft.Cognitive.SpeakerRecognition.Streaming │ ├── packages.config │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Audio │ │ ├── AudioSpecifications.cs │ │ ├── AudioHeaderParsingResult.cs │ │ └── AudioContainer.cs │ ├── Client │ │ └── ClientFactory.cs │ └── Result │ │ └── RecognitionResult.cs └── SPIDStreamingAPI-WPF-Samples.sln ├── Verification ├── SPIDVerificationAPI_WPF_Sample │ ├── Assets │ │ └── Microsoft-logo_rgb_c-gray.png │ ├── Properties │ │ ├── Settings.settings │ │ ├── Settings.Designer.cs │ │ ├── Resources.Designer.cs │ │ ├── AssemblyInfo.cs │ │ └── Resources.resx │ ├── App.xaml │ ├── packages.config │ ├── App.config │ ├── MainWindow.xaml │ ├── App.xaml.cs │ ├── VerifySpeakerPage.xaml │ ├── EnrollPage.xaml │ ├── MainWindow.xaml.cs │ └── IsolatedStorageHelper.cs └── SPIDVerificationAPI_WPF_Sample.sln ├── ClientLibrary ├── build_nuget_package.cmd ├── packages.config ├── ClientLibrary.sln ├── ClientLibrary.nuspec ├── Properties │ └── AssemblyInfo.cs └── Contract │ ├── ErrorResponse.cs │ ├── Verification │ ├── VerificationPhrase.cs │ ├── CreateProfileResponse.cs │ ├── Result.cs │ ├── PhrasesException.cs │ ├── VerificationException.cs │ ├── Enrollment.cs │ ├── Verification.cs │ └── Profile.cs │ ├── Identification │ ├── EnrollmentOperation.cs │ ├── CreateProfileResponse.cs │ ├── IdentificationOperation.cs │ ├── OperationLocation.cs │ ├── IdentificationException.cs │ ├── Status.cs │ ├── Identification.cs │ ├── Enrollment.cs │ ├── Profile.cs │ └── Operation.cs │ ├── ErrorMessage.cs │ ├── EnrollmentBase.cs │ ├── DeleteProfileException.cs │ ├── ProfileException.cs │ ├── EnrollmentException.cs │ ├── GetProfileException.cs │ ├── CreateProfileException.cs │ ├── ResetEnrollmentsException.cs │ ├── Confidence.cs │ ├── EnrollmentStatus.cs │ └── ProfileBase.cs ├── Identification ├── SPIDIdentificationAPI-WPF-Samples │ ├── Assets │ │ └── Microsoft-logo_rgb_c-gray.png │ ├── App.config │ ├── Properties │ │ ├── Settings.settings │ │ ├── Settings.Designer.cs │ │ ├── Resources.Designer.cs │ │ ├── AssemblyInfo.cs │ │ └── Resources.resx │ ├── App.xaml │ ├── packages.config │ ├── MainWindow.xaml │ ├── SpeakersListPage.xaml │ ├── App.xaml.cs │ ├── MainWindow.xaml.cs │ ├── IdentifyFilePage.xaml │ └── EnrollSpeakersPage.xaml └── SPIDIdentificationAPI-WPF-Samples.sln ├── LICENSE-IMAGE.md ├── LICENSE.md ├── ThirdPartyNotices.txt ├── CONTRIBUTING.md ├── README.md └── .gitignore /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Cognitive-Common-Windows"] 2 | path = Cognitive-Common-Windows 3 | url = https://github.com/Microsoft/Cognitive-Common-Windows.git 4 | -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/images/UI_stop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cognitive-SpeakerRecognition-Windows/HEAD/Streaming/SPIDStreamingAPI-WPF-Samples/images/UI_stop.gif -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/SampleAudios/TestDialogue.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cognitive-SpeakerRecognition-Windows/HEAD/Streaming/SPIDStreamingAPI-WPF-Samples/SampleAudios/TestDialogue.wav -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/SampleAudios/User1_Enrollment.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cognitive-SpeakerRecognition-Windows/HEAD/Streaming/SPIDStreamingAPI-WPF-Samples/SampleAudios/User1_Enrollment.wav -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/SampleAudios/User2_Enrollment.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cognitive-SpeakerRecognition-Windows/HEAD/Streaming/SPIDStreamingAPI-WPF-Samples/SampleAudios/User2_Enrollment.wav -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/Assets/Microsoft-logo_rgb_c-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cognitive-SpeakerRecognition-Windows/HEAD/Streaming/SPIDStreamingAPI-WPF-Samples/Assets/Microsoft-logo_rgb_c-gray.png -------------------------------------------------------------------------------- /Verification/SPIDVerificationAPI_WPF_Sample/Assets/Microsoft-logo_rgb_c-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cognitive-SpeakerRecognition-Windows/HEAD/Verification/SPIDVerificationAPI_WPF_Sample/Assets/Microsoft-logo_rgb_c-gray.png -------------------------------------------------------------------------------- /ClientLibrary/build_nuget_package.cmd: -------------------------------------------------------------------------------- 1 | rem NOTE NOTE Copy the signed DLL into obj\release folder before running this command 2 | nuget pack ClientLibrary.csproj -Build -OutputDirectory bin\release -Properties Configuration=Release;Platform=AnyCPU -------------------------------------------------------------------------------- /Identification/SPIDIdentificationAPI-WPF-Samples/Assets/Microsoft-logo_rgb_c-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cognitive-SpeakerRecognition-Windows/HEAD/Identification/SPIDIdentificationAPI-WPF-Samples/Assets/Microsoft-logo_rgb_c-gray.png -------------------------------------------------------------------------------- /Identification/SPIDIdentificationAPI-WPF-Samples/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Verification/SPIDVerificationAPI_WPF_Sample/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Identification/SPIDIdentificationAPI-WPF-Samples/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Identification/SPIDIdentificationAPI-WPF-Samples/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Verification/SPIDVerificationAPI_WPF_Sample/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ClientLibrary/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Identification/SPIDIdentificationAPI-WPF-Samples/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Streaming/Microsoft.Cognitive.SpeakerRecognition.Streaming/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Verification/SPIDVerificationAPI_WPF_Sample/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Verification/SPIDVerificationAPI_WPF_Sample/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Verification/SPIDVerificationAPI_WPF_Sample/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Identification/SPIDIdentificationAPI-WPF-Samples/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /LICENSE-IMAGE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) Microsoft Corporation 2 | 3 | All rights reserved. 4 | 5 | Microsoft Cognitive Services Client SDK License for Sample Image 6 | 7 | *This license applies only to the sample images. The SDK code is licensed separately, please refer to [LICENSE]()* 8 | 9 | Microsoft may make sample images available in connection with the SDK for the purposes of illustrating the operation of Microsoft Cognitive Services (https://www.microsoft.com/cognitive-services). If no separate license terms are provided with the images, Microsoft grants you a personal, nonexclusive, revocable, royalty-free right to use the images solely within your organization to test the operation of Microsoft Cognitive Services, provided that you agree to indemnify, hold harmless, and defend Microsoft and its suppliers from and against any claims or lawsuits, including attorneys’ fees, that arise or result from the use or distribution of the images. Except as expressly provided in this section you have no license to modify or distribute the images. 10 | -------------------------------------------------------------------------------- /ClientLibrary/ClientLibrary.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientLibrary", "ClientLibrary.csproj", "{E8EE0C19-C449-4489-869B-6B81F4873B24}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {E8EE0C19-C449-4489-869B-6B81F4873B24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {E8EE0C19-C449-4489-869B-6B81F4873B24}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {E8EE0C19-C449-4489-869B-6B81F4873B24}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {E8EE0C19-C449-4489-869B-6B81F4873B24}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Verification/SPIDVerificationAPI_WPF_Sample/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SPIDVerificationAPI_WPF_Sample.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Identification/SPIDIdentificationAPI-WPF-Samples/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SPIDIdentificationAPI_WPF_Samples.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SPIDIdentificationStreaming_WPF_Samples.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Microsoft Cognitive Services SDK 2 | 3 | Copyright (c) Microsoft Corporation 4 | 5 | All rights reserved. 6 | 7 | *This license applies only to the SDK code. Sample images are licensed separately, please refer to [LICENSE-IMAGE]()* 8 | 9 | MIT License 10 | 11 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | -------------------------------------------------------------------------------- /ClientLibrary/ClientLibrary.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | Microsoft 8 | Microsoft 9 | https://github.com/Microsoft/Cognitive-SpeakerRecognition-Windows/LICENSE.md 10 | https://github.com/Microsoft/Cognitive-SpeakerRecognition-Windows 11 | https://portalstoragewu.blob.core.windows.net/media/Default/Media/Speaker%20Recognition/Icons_Speech_Speaker.svg 12 | true 13 | $description$ 14 | Use Speaker Recognition API Client Library to enrich your apps with Microsoft's state-of-the-art cloud-based speaker recognition algorithms. 15 | Add support to the short audio feature. Users can now waive the audio duration requirements for the speaker identification. 16 | Copyright (c) 2016 17 | Project Oxford Speaker Recognition 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ClientLibrary/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("Microsoft.ProjectOxford.SpeakerRecognition")] 10 | [assembly: AssemblyDescription("Microsoft Project Oxford Speaker Recognition Client Library")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("Microsoft Corporation")] 13 | [assembly: AssemblyProduct("Microsoft.ProjectOxford.SpeakerRecognition")] 14 | [assembly: AssemblyCopyright("Copyright © 2016")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.1.0.0")] 30 | [assembly: AssemblyFileVersion("1.1.0.0")] 31 | -------------------------------------------------------------------------------- /Verification/SPIDVerificationAPI_WPF_Sample.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPIDVerificationAPI_WPF_Sample", "SPIDVerificationAPI_WPF_Sample\SPIDVerificationAPI_WPF_Sample.csproj", "{29133D4A-D92C-41C1-B7F1-0EA431BA4FD8}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleUserControlLibrary", "..\Cognitive-Common-Windows\SampleUserControlLibrary\SampleUserControlLibrary.csproj", "{735929F0-F8F1-4D93-B027-5D034FA7892B}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {29133D4A-D92C-41C1-B7F1-0EA431BA4FD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {29133D4A-D92C-41C1-B7F1-0EA431BA4FD8}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {29133D4A-D92C-41C1-B7F1-0EA431BA4FD8}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {29133D4A-D92C-41C1-B7F1-0EA431BA4FD8}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {735929F0-F8F1-4D93-B027-5D034FA7892B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {735929F0-F8F1-4D93-B027-5D034FA7892B}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {735929F0-F8F1-4D93-B027-5D034FA7892B}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {735929F0-F8F1-4D93-B027-5D034FA7892B}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Identification/SPIDIdentificationAPI-WPF-Samples.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPIDIdentificationAPI-WPF-Samples", "SPIDIdentificationAPI-WPF-Samples\SPIDIdentificationAPI-WPF-Samples.csproj", "{D4C60FF7-ED2B-4302-B73E-09D01EEFE1B6}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleUserControlLibrary", "..\Cognitive-Common-Windows\SampleUserControlLibrary\SampleUserControlLibrary.csproj", "{735929F0-F8F1-4D93-B027-5D034FA7892B}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {D4C60FF7-ED2B-4302-B73E-09D01EEFE1B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {D4C60FF7-ED2B-4302-B73E-09D01EEFE1B6}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {D4C60FF7-ED2B-4302-B73E-09D01EEFE1B6}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {D4C60FF7-ED2B-4302-B73E-09D01EEFE1B6}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {735929F0-F8F1-4D93-B027-5D034FA7892B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {735929F0-F8F1-4D93-B027-5D034FA7892B}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {735929F0-F8F1-4D93-B027-5D034FA7892B}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {735929F0-F8F1-4D93-B027-5D034FA7892B}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Streaming/Microsoft.Cognitive.SpeakerRecognition.Streaming/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle(" Microsoft.Cognitive.SpeakerRecognition.Streaming")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct(" Microsoft.Cognitive.SpeakerRecognition.Streaming")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("8a58e960-8d3b-4da7-a111-270af62fe812")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | 38 | //[assembly: InternalsVisibleTo(" Microsoft.Cognitive.SpeakerRecognition.Streaming.UnitTest")] 39 | -------------------------------------------------------------------------------- /ThirdPartyNotices.txt: -------------------------------------------------------------------------------- 1 | THIRD-PARTY SOFTWARE NOTICES AND INFORMATION 2 | Do Not Translate or Localize 3 | 4 | This project incorporates components from the projects listed below. The original copyright notices 5 | and licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not 6 | expressly granted herein, whether by implication, estoppel or otherwise. 7 | 8 | 9 | 1. newtonsoft.json version 8.0.2 (https://github.com/JamesNK/Newtonsoft.Json) 10 | 11 | %% newtonsoft.json NOTICES AND INFORMATION BEGIN HERE 12 | ========================================= 13 | The MIT License (MIT) 14 | 15 | Copyright (c) 2007 James Newton-King 16 | 17 | Permission is hereby granted, free of charge, to any person obtaining a copy of 18 | this software and associated documentation files (the "Software"), to deal in 19 | the Software without restriction, including without limitation the rights to 20 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 21 | the Software, and to permit persons to whom the Software is furnished to do so, 22 | subject to the following conditions: 23 | 24 | The above copyright notice and this permission notice shall be included in all 25 | copies or substantial portions of the Software. 26 | 27 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 28 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 29 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 30 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 31 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 32 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 33 | ========================================= 34 | END OF newtonsoft.json NOTICES AND INFORMATION 35 | -------------------------------------------------------------------------------- /Identification/SPIDIdentificationAPI-WPF-Samples/SpeakersListPage.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Click on [Update List] to load all profiles 28 | 42 | Step 2: Enroll Profile 43 | * Select a profile from the list on the left to enroll it. 44 | * Click [Load File] to specify a file to enroll with. 45 | 48 | Click [Enroll] to perform the enrollment. 49 | 52 | Or, click [Enroll Short Audio] to skip the enrollment duration requirement. 53 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Verification/SPIDVerificationAPI_WPF_Sample/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // Licensed under the MIT license. 4 | // 5 | // Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services 6 | // 7 | // Microsoft Cognitive Services (formerly Project Oxford) GitHub: 8 | // https://github.com/Microsoft/Cognitive-SpeakerRecognition-Windows 9 | // 10 | // Copyright (c) Microsoft Corporation 11 | // All rights reserved. 12 | // 13 | // MIT License: 14 | // Permission is hereby granted, free of charge, to any person obtaining 15 | // a copy of this software and associated documentation files (the 16 | // "Software"), to deal in the Software without restriction, including 17 | // without limitation the rights to use, copy, modify, merge, publish, 18 | // distribute, sublicense, and/or sell copies of the Software, and to 19 | // permit persons to whom the Software is furnished to do so, subject to 20 | // the following conditions: 21 | // 22 | // The above copyright notice and this permission notice shall be 23 | // included in all copies or substantial portions of the Software. 24 | // 25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, 26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 | // 33 | 34 | using SampleUserControlLibrary; 35 | using System.Windows; 36 | 37 | namespace SPIDVerificationAPI_WPF_Sample 38 | { 39 | /// 40 | /// Interaction logic for MainWindow.xaml 41 | /// 42 | public partial class MainWindow : Window 43 | { 44 | /// 45 | /// The filename that holds the speakerId 46 | /// 47 | public static readonly string SPEAKER_FILENAME = "SpeakerId"; 48 | /// 49 | /// The name of the file that holds the speaker phrase 50 | /// 51 | public static readonly string SPEAKER_PHRASE_FILENAME = "SpeakerPhrase"; 52 | /// 53 | /// The name of the file that holds the number of remaining enrollments 54 | /// 55 | public static readonly string SPEAKER_ENROLLMENTS = "Enrollments"; 56 | /// 57 | /// The name of the file that holds the speaker's enrollment status 58 | /// 59 | public static readonly string SPEAKER_ENROLLMENT_STATUS = "EnrollmentStatus"; 60 | /// 61 | /// Returns the subscription key of the Oxford API 62 | /// 63 | public string SubscriptionKey 64 | { 65 | get 66 | { 67 | return _scenariosControl.SubscriptionKey; 68 | } 69 | } 70 | /// 71 | /// Add user scenarios in the main window 72 | /// 73 | public MainWindow() 74 | { 75 | InitializeComponent(); 76 | _scenariosControl.SampleTitle = "Speaker Verification Sample"; 77 | _scenariosControl.Disclaimer = string.Empty; 78 | _scenariosControl.SampleScenarioList = new Scenario[] 79 | { 80 | new Scenario { Title = "Scenario 1: Make a new Enrollment", PageClass=typeof(EnrollPage)}, 81 | new Scenario { Title = "Scenario 2: Verify a Speaker", PageClass=typeof(VerifySpeakerPage)} 82 | }; 83 | } 84 | /// 85 | /// Logs a given message to the status bar 86 | /// 87 | /// The message to be logged 88 | public void Log(string s) 89 | { 90 | _scenariosControl.Log(s); 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Streaming/Microsoft.Cognitive.SpeakerRecognition.Streaming/Audio/AudioContainer.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | // Licensed under the MIT license. 5 | // 6 | // Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services 7 | // 8 | // Microsoft Cognitive Services (formerly Project Oxford) GitHub: 9 | // https://github.com/Microsoft/Cognitive-SpeakerRecognition-Windows 10 | // 11 | // Copyright (c) Microsoft Corporation 12 | // All rights reserved. 13 | // 14 | // MIT License: 15 | // Permission is hereby granted, free of charge, to any person obtaining 16 | // a copy of this software and associated documentation files (the 17 | // "Software"), to deal in the Software without restriction, including 18 | // without limitation the rights to use, copy, modify, merge, publish, 19 | // distribute, sublicense, and/or sell copies of the Software, and to 20 | // permit persons to whom the Software is furnished to do so, subject to 21 | // the following conditions: 22 | // 23 | // The above copyright notice and this permission notice shall be 24 | // included in all copies or substantial portions of the Software. 25 | // 26 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, 27 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 29 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 30 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 31 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 32 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 33 | 34 | namespace Microsoft.Cognitive.SpeakerRecognition.Streaming.Audio 35 | { 36 | using System; 37 | using System.Collections.Generic; 38 | using System.Linq; 39 | using System.Text; 40 | using System.Threading.Tasks; 41 | 42 | /// 43 | /// Types of audio containers 44 | /// 45 | public enum AudioContainerType 46 | { 47 | /// 48 | /// Audio with no header 49 | /// 50 | RAW, 51 | 52 | /// 53 | /// WAV audio 54 | /// 55 | WAV 56 | } 57 | 58 | /// 59 | /// Audio container which supports two types of containers: RAW and WAV 60 | /// 61 | public class AudioContainer 62 | { 63 | private int maxHeaderSize; 64 | 65 | /// 66 | /// Initializes a new instance of the AudioContainer class. 67 | /// 68 | /// Audio container type 69 | public AudioContainer(AudioContainerType type) 70 | { 71 | this.ContainerType = type; 72 | 73 | if (type.Equals(AudioContainerType.WAV)) 74 | { 75 | this.maxHeaderSize = 5000; 76 | } 77 | else if (type.Equals(AudioContainerType.RAW)) 78 | { 79 | this.maxHeaderSize = 0; 80 | } 81 | } 82 | 83 | /// 84 | /// Gets or sets audio container type 85 | /// 86 | public AudioContainerType ContainerType 87 | { 88 | get; 89 | set; 90 | } 91 | 92 | internal int MaxHeaderSize 93 | { 94 | get 95 | { 96 | return this.maxHeaderSize; 97 | } 98 | } 99 | 100 | public override bool Equals(object obj) 101 | { 102 | AudioContainer container = obj as AudioContainer; 103 | if (this.ContainerType.Equals(container.ContainerType)) 104 | { 105 | return true; 106 | } 107 | 108 | return false; 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /Identification/SPIDIdentificationAPI-WPF-Samples/IdentifyFilePage.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Identify File 27 | 28 | Step 1: Select Test File 29 | Please click [Load File] to identify the speaker. 30 | 33 | Step 2: Perform Identification 34 | Select some profiles from the list on the left to identify from. 35 | Click [Identify] to perform the identification. 36 | 39 | Or, click [Identify Short Audio] to skip the identification duration requirement. 40 | 43 | 44 | 45 | Identified speaker: 46 | 47 | 48 | 49 | Confidence: 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Identification/SPIDIdentificationAPI-WPF-Samples/EnrollSpeakersPage.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | Enroll Speakers 29 | 30 | Step 1: Create New Profiles 31 | Please click [Add] to add new profiles 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 42 | Step 2: Enroll Profile 43 | Select a profile from the list on the left to enroll it. 44 | Click [Load File] to specify a file to enroll with. 45 | 48 | Click [Enroll] to perform the enrollment. 49 | 52 | Or, click [Enroll Short Audio] to skip the enrollment duration requirement. 53 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Verification/SPIDVerificationAPI_WPF_Sample/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // Licensed under the MIT license. 4 | // 5 | // Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services 6 | // 7 | // Microsoft Cognitive Services (formerly Project Oxford) GitHub: 8 | // https://github.com/Microsoft/Cognitive-SpeakerRecognition-Windows 9 | // 10 | // Copyright (c) Microsoft Corporation 11 | // All rights reserved. 12 | // 13 | // MIT License: 14 | // Permission is hereby granted, free of charge, to any person obtaining 15 | // a copy of this software and associated documentation files (the 16 | // "Software"), to deal in the Software without restriction, including 17 | // without limitation the rights to use, copy, modify, merge, publish, 18 | // distribute, sublicense, and/or sell copies of the Software, and to 19 | // permit persons to whom the Software is furnished to do so, subject to 20 | // the following conditions: 21 | // 22 | // The above copyright notice and this permission notice shall be 23 | // included in all copies or substantial portions of the Software. 24 | // 25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, 26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 | // 33 | 34 | using System.Reflection; 35 | using System.Resources; 36 | using System.Runtime.CompilerServices; 37 | using System.Runtime.InteropServices; 38 | using System.Windows; 39 | 40 | // General Information about an assembly is controlled through the following 41 | // set of attributes. Change these attribute values to modify the information 42 | // associated with an assembly. 43 | [assembly: AssemblyTitle("SPID_WPF_Sample")] 44 | [assembly: AssemblyDescription("")] 45 | [assembly: AssemblyConfiguration("")] 46 | [assembly: AssemblyCompany("")] 47 | [assembly: AssemblyProduct("SPID_WPF_Sample")] 48 | [assembly: AssemblyCopyright("Copyright \u00A9 2015")] 49 | [assembly: AssemblyTrademark("")] 50 | [assembly: AssemblyCulture("")] 51 | 52 | // Setting ComVisible to false makes the types in this assembly not visible 53 | // to COM components. If you need to access a type in this assembly from 54 | // COM, set the ComVisible attribute to true on that type. 55 | [assembly: ComVisible(false)] 56 | 57 | //In order to begin building localizable applications, set 58 | //CultureYouAreCodingWith in your .csproj file 59 | //inside a . For example, if you are using US english 60 | //in your source files, set the to en-US. Then uncomment 61 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 62 | //the line below to match the UICulture setting in the project file. 63 | 64 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 65 | 66 | 67 | [assembly: ThemeInfo( 68 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 69 | //(used if a resource is not found in the page, 70 | // or application resource dictionaries) 71 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 72 | //(used if a resource is not found in the page, 73 | // app, or any theme specific resource dictionaries) 74 | )] 75 | 76 | 77 | // Version information for an assembly consists of the following four values: 78 | // 79 | // Major Version 80 | // Minor Version 81 | // Build Number 82 | // Revision 83 | // 84 | // You can specify all the values or you can default the Build and Revision Numbers 85 | // by using the '*' as shown below: 86 | // [assembly: AssemblyVersion("1.0.*")] 87 | [assembly: AssemblyVersion("1.0.0.0")] 88 | [assembly: AssemblyFileVersion("1.0.0.0")] 89 | -------------------------------------------------------------------------------- /Identification/SPIDIdentificationAPI-WPF-Samples/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // Licensed under the MIT license. 4 | // 5 | // Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services 6 | // 7 | // Microsoft Cognitive Services (formerly Project Oxford) GitHub: 8 | // https://github.com/Microsoft/Cognitive-SpeakerRecognition-Windows 9 | // 10 | // Copyright (c) Microsoft Corporation 11 | // All rights reserved. 12 | // 13 | // MIT License: 14 | // Permission is hereby granted, free of charge, to any person obtaining 15 | // a copy of this software and associated documentation files (the 16 | // "Software"), to deal in the Software without restriction, including 17 | // without limitation the rights to use, copy, modify, merge, publish, 18 | // distribute, sublicense, and/or sell copies of the Software, and to 19 | // permit persons to whom the Software is furnished to do so, subject to 20 | // the following conditions: 21 | // 22 | // The above copyright notice and this permission notice shall be 23 | // included in all copies or substantial portions of the Software. 24 | // 25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, 26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 | // 33 | 34 | using System.Reflection; 35 | using System.Resources; 36 | using System.Runtime.CompilerServices; 37 | using System.Runtime.InteropServices; 38 | using System.Windows; 39 | 40 | // General Information about an assembly is controlled through the following 41 | // set of attributes. Change these attribute values to modify the information 42 | // associated with an assembly. 43 | [assembly: AssemblyTitle("SPIDAPI-WPF-Samples")] 44 | [assembly: AssemblyDescription("")] 45 | [assembly: AssemblyConfiguration("")] 46 | [assembly: AssemblyCompany("")] 47 | [assembly: AssemblyProduct("SPIDAPI-WPF-Samples")] 48 | [assembly: AssemblyCopyright("Copyright \u00A9 2015")] 49 | [assembly: AssemblyTrademark("")] 50 | [assembly: AssemblyCulture("")] 51 | 52 | // Setting ComVisible to false makes the types in this assembly not visible 53 | // to COM components. If you need to access a type in this assembly from 54 | // COM, set the ComVisible attribute to true on that type. 55 | [assembly: ComVisible(false)] 56 | 57 | //In order to begin building localizable applications, set 58 | //CultureYouAreCodingWith in your .csproj file 59 | //inside a . For example, if you are using US english 60 | //in your source files, set the to en-US. Then uncomment 61 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 62 | //the line below to match the UICulture setting in the project file. 63 | 64 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 65 | 66 | 67 | [assembly: ThemeInfo( 68 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 69 | //(used if a resource is not found in the page, 70 | // or application resource dictionaries) 71 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 72 | //(used if a resource is not found in the page, 73 | // app, or any theme specific resource dictionaries) 74 | )] 75 | 76 | 77 | // Version information for an assembly consists of the following four values: 78 | // 79 | // Major Version 80 | // Minor Version 81 | // Build Number 82 | // Revision 83 | // 84 | // You can specify all the values or you can default the Build and Revision Numbers 85 | // by using the '*' as shown below: 86 | // [assembly: AssemblyVersion("1.0.*")] 87 | [assembly: AssemblyVersion("1.0.0.0")] 88 | [assembly: AssemblyFileVersion("1.0.0.0")] 89 | -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | // Licensed under the MIT license. 5 | // 6 | // Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services 7 | // 8 | // Microsoft Cognitive Services (formerly Project Oxford) GitHub: 9 | // https://github.com/Microsoft/Cognitive-SpeakerRecognition-Windows 10 | // 11 | // Copyright (c) Microsoft Corporation 12 | // All rights reserved. 13 | // 14 | // MIT License: 15 | // Permission is hereby granted, free of charge, to any person obtaining 16 | // a copy of this software and associated documentation files (the 17 | // "Software"), to deal in the Software without restriction, including 18 | // without limitation the rights to use, copy, modify, merge, publish, 19 | // distribute, sublicense, and/or sell copies of the Software, and to 20 | // permit persons to whom the Software is furnished to do so, subject to 21 | // the following conditions: 22 | // 23 | // The above copyright notice and this permission notice shall be 24 | // included in all copies or substantial portions of the Software. 25 | // 26 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, 27 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 29 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 30 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 31 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 32 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 33 | 34 | using System.Reflection; 35 | using System.Resources; 36 | using System.Runtime.CompilerServices; 37 | using System.Runtime.InteropServices; 38 | using System.Windows; 39 | 40 | // General Information about an assembly is controlled through the following 41 | // set of attributes. Change these attribute values to modify the information 42 | // associated with an assembly. 43 | [assembly: AssemblyTitle("SPIDAPI-WPF-Samples")] 44 | [assembly: AssemblyDescription("")] 45 | [assembly: AssemblyConfiguration("")] 46 | [assembly: AssemblyCompany("")] 47 | [assembly: AssemblyProduct("SPIDAPI-WPF-Samples")] 48 | [assembly: AssemblyCopyright("Copyright \u00A9 2015")] 49 | [assembly: AssemblyTrademark("")] 50 | [assembly: AssemblyCulture("")] 51 | 52 | // Setting ComVisible to false makes the types in this assembly not visible 53 | // to COM components. If you need to access a type in this assembly from 54 | // COM, set the ComVisible attribute to true on that type. 55 | [assembly: ComVisible(false)] 56 | 57 | // In order to begin building localizable applications, set 58 | // CultureYouAreCodingWith in your .csproj file 59 | // inside a . For example, if you are using US english 60 | // in your source files, set the to en-US. Then uncomment 61 | // the NeutralResourceLanguage attribute below. Update the "en-US" in 62 | // the line below to match the UICulture setting in the project file. 63 | // [assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 64 | 65 | [assembly: ThemeInfo( 66 | ResourceDictionaryLocation.None, // where theme specific resource dictionaries are located 67 | // (used if a resource is not found in the page, 68 | // or application resource dictionaries) 69 | ResourceDictionaryLocation.SourceAssembly // where the generic resource dictionary is located 70 | // (used if a resource is not found in the page, 71 | // app, or any theme specific resource dictionaries) 72 | )] 73 | 74 | // Version information for an assembly consists of the following four values: 75 | // 76 | // Major Version 77 | // Minor Version 78 | // Build Number 79 | // Revision 80 | // 81 | // You can specify all the values or you can default the Build and Revision Numbers 82 | // by using the '*' as shown below: 83 | // [assembly: AssemblyVersion("1.0.*")] 84 | [assembly: AssemblyVersion("1.0.0.0")] 85 | [assembly: AssemblyFileVersion("1.0.0.0")] 86 | -------------------------------------------------------------------------------- /Verification/SPIDVerificationAPI_WPF_Sample/IsolatedStorageHelper.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // Licensed under the MIT license. 4 | // 5 | // Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services 6 | // 7 | // Microsoft Cognitive Services (formerly Project Oxford) GitHub: 8 | // https://github.com/Microsoft/Cognitive-SpeakerRecognition-Windows 9 | // 10 | // Copyright (c) Microsoft Corporation 11 | // All rights reserved. 12 | // 13 | // MIT License: 14 | // Permission is hereby granted, free of charge, to any person obtaining 15 | // a copy of this software and associated documentation files (the 16 | // "Software"), to deal in the Software without restriction, including 17 | // without limitation the rights to use, copy, modify, merge, publish, 18 | // distribute, sublicense, and/or sell copies of the Software, and to 19 | // permit persons to whom the Software is furnished to do so, subject to 20 | // the following conditions: 21 | // 22 | // The above copyright notice and this permission notice shall be 23 | // included in all copies or substantial portions of the Software. 24 | // 25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, 26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 | // 33 | 34 | using System.IO; 35 | using System.IO.IsolatedStorage; 36 | 37 | namespace SPIDVerificationAPI_WPF_Sample 38 | { 39 | /// 40 | /// A storage helper that's used to persist values to files to be used across pages 41 | /// 42 | internal class IsolatedStorageHelper 43 | { 44 | private static IsolatedStorageHelper s_helper; 45 | 46 | private IsolatedStorageHelper() 47 | { 48 | } 49 | /// 50 | /// Creates an Instance of the storage helper 51 | /// 52 | /// 53 | public static IsolatedStorageHelper getInstance() 54 | { 55 | if (s_helper == null) 56 | s_helper = new IsolatedStorageHelper(); 57 | return s_helper; 58 | } 59 | /// 60 | /// Reads a value from a given file 61 | /// 62 | /// The file to read the value from 63 | /// String representation of the value 64 | public string readValue(string filename) 65 | { 66 | using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Assembly, null, null)) 67 | { 68 | try 69 | { 70 | using (var iStream = new IsolatedStorageFileStream(filename, FileMode.Open, isoStore)) 71 | { 72 | using (var reader = new StreamReader(iStream)) 73 | { 74 | return reader.ReadLine(); 75 | } 76 | } 77 | } 78 | catch (FileNotFoundException) 79 | { 80 | return null; 81 | } 82 | } 83 | } 84 | /// 85 | /// Writes a value to a given file 86 | /// 87 | /// The file to write the value to 88 | /// The value to be written 89 | public void writeValue(string fileName, string value) 90 | { 91 | using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Assembly, null, null)) 92 | { 93 | using (var oStream = new IsolatedStorageFileStream(fileName, FileMode.Create, isoStore)) 94 | { 95 | using (var writer = new StreamWriter(oStream)) 96 | { 97 | writer.WriteLine(value); 98 | } 99 | } 100 | } 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /Streaming/Microsoft.Cognitive.SpeakerRecognition.Streaming/Result/RecognitionResult.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | // Licensed under the MIT license. 5 | // 6 | // Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services 7 | // 8 | // Microsoft Cognitive Services (formerly Project Oxford) GitHub: 9 | // https://github.com/Microsoft/Cognitive-SpeakerRecognition-Windows 10 | // 11 | // Copyright (c) Microsoft Corporation 12 | // All rights reserved. 13 | // 14 | // MIT License: 15 | // Permission is hereby granted, free of charge, to any person obtaining 16 | // a copy of this software and associated documentation files (the 17 | // "Software"), to deal in the Software without restriction, including 18 | // without limitation the rights to use, copy, modify, merge, publish, 19 | // distribute, sublicense, and/or sell copies of the Software, and to 20 | // permit persons to whom the Software is furnished to do so, subject to 21 | // the following conditions: 22 | // 23 | // The above copyright notice and this permission notice shall be 24 | // included in all copies or substantial portions of the Software. 25 | // 26 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, 27 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 29 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 30 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 31 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 32 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 33 | 34 | namespace Microsoft.Cognitive.SpeakerRecognition.Streaming.Result 35 | { 36 | using System; 37 | using System.Collections.Generic; 38 | using System.Linq; 39 | using System.Text; 40 | using System.Threading.Tasks; 41 | using Microsoft.ProjectOxford.SpeakerRecognition; 42 | using Microsoft.ProjectOxford.SpeakerRecognition.Contract.Identification; 43 | 44 | /// 45 | /// Recognition result which includes the ID of the client initiated the request, the ID of the request and the identification result for the request 46 | /// 47 | public class RecognitionResult 48 | { 49 | /// 50 | /// Initializes a new instance of the RecognitionResult class incase of a successful recognition 51 | /// 52 | /// Operation result 53 | /// Client ID 54 | /// Request ID 55 | public RecognitionResult(Identification result, Guid clientId, int requestId) 56 | { 57 | this.Value = result; 58 | this.ClientId = clientId; 59 | this.RequestId = requestId; 60 | 61 | this.Succeeded = true; 62 | } 63 | 64 | /// 65 | /// Initializes a new instance of the RecognitionResult class incase of a failed recognition 66 | /// 67 | /// Flag that Indicates whether the request has succeeded or not 68 | /// Failure message in case of a failure 69 | /// Request ID 70 | public RecognitionResult(bool status, string failureMsg, int requestId) 71 | { 72 | this.Succeeded = status; 73 | this.FailureMsg = failureMsg; 74 | this.RequestId = requestId; 75 | } 76 | 77 | /// 78 | /// Operation result 79 | /// 80 | public Identification Value 81 | { 82 | get; set; 83 | } 84 | 85 | /// 86 | /// Client ID 87 | /// 88 | public Guid ClientId 89 | { 90 | get; set; 91 | } 92 | 93 | /// 94 | /// Request ID which gets incremented with each request 95 | /// 96 | public int RequestId 97 | { 98 | get; set; 99 | } 100 | 101 | /// 102 | /// Flag that Indicates whether the request has succeeded or not 103 | /// 104 | public bool Succeeded 105 | { 106 | get; set; 107 | } 108 | 109 | /// 110 | /// Gets and Sets failure message in case of a failure 111 | /// 112 | public string FailureMsg 113 | { 114 | get; set; 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Microsoft Speaker Recognition API: Windows Client Library & Sample 2 | This repo contains the Windows client library & sample for the Microsoft Speaker Recognition API, an offering within [Microsoft Cognitive Services](https://www.microsoft.com/cognitive-services), formerly known as Project Oxford. 3 | * [Learn about the Speaker Recognition API](https://www.microsoft.com/cognitive-services/en-us/speaker-recognition-api) 4 | * [Read the documentation](https://www.microsoft.com/cognitive-services/en-us/speaker-recognition-api/documentation) 5 | * [Find more SDKs & Samples](https://www.microsoft.com/cognitive-services/en-us/SDK-Sample?api=speaker%20recognition) 6 | 7 | 8 | ## The sample 9 | The sample includes three applications: 10 | 1. two Windows WPF applications to demonstrate the use of identification and verification features of Speaker Recognition API for single-speaker short audios. 11 | 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. 12 | 13 | ### Build the sample 14 | 1. Starting in the folder where you clone the repository (this folder) 15 | 2. In a git command line tool, type `git submodule init` (or do this through a UI) 16 | 3. Pull in the shared Windows code by calling `git submodule update` 17 | 4. Start Microsoft Visual Studio 2015 and select `File > Open > Project/Solution`. 18 | 5. For speaker identification, starting in the folder where you clone the repository, go to 19 | `SpeakerRecognition > Windows > Identification` folder. 20 | For speaker verification, starting in the folder where you clone the repository, go to 21 | `SpeakerRecognition > Windows > Verification` folder. 22 | For speaker steaming, starting in the folder where you clone the repository, go to 23 | `SpeakerRecognition > Windows > Streaming` folder. 24 | 6. Double-click the Visual Studio 2015 Solution (.sln) file. 25 | 7. Press Ctrl+Shift+B, or select `Build > Build Solution`. 26 | 27 | ### Run the sample 28 | After the build is complete, press F5 to run the sample. 29 | 30 | First, you must obtain a Speaker Recognition API subscription key by [following the instructions on our website](). 31 | 32 | 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 33 | machine, click "Delete Key" to remove it from your machine. 34 | 35 | Click on "Select Scenario" to use samples of different scenarios, and 36 | follow the instructions on screen. 37 | 38 | ### Streaming Audio File 39 | 1. Start with the "Enroll Speakers" scenario to prepare the speakers you will identify against. 40 | 2. In the "Stream File" scenario, Press "Load File" button and load your audio file. 41 | 3. Select the profiles you want to use as candidate speakers. 42 | 4. Control the number of seconds used with each identification request by tuning the "window size". 43 | 5. Control the number of seconds between each identification request through tuning the "step size". 44 | 6. Press "Stream" button and monitor the results of the streaming process. 45 | 46 | Note: 47 | Make sure that the number of requests per minute resulting from tunning the step size won't exceed your subscription's rate limit. 48 | 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. 49 | 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`. 50 | 51 | 52 | 53 | ## Contributing 54 | 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](). 55 | 56 | You can reach out to us anytime with questions and suggestions using our communities below: 57 | - **Support questions:** [StackOverflow]() 58 | - **Feedback & feature requests:** [Cognitive Services UserVoice Forum]() 59 | 60 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 61 | 62 | 63 | ## License 64 | All Microsoft Cognitive Services SDKs and samples are licensed with the MIT License. For more details, see 65 | [LICENSE](). 66 | 67 | Sample images are licensed separately, please refer to [LICENSE-IMAGE](). 68 | -------------------------------------------------------------------------------- /Streaming/SPIDStreamingAPI-WPF-Samples/StreamPage.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | Identify File 30 | 31 | Step 1: Select Test File 32 | Please click [Load File] to identify the speaker. 33 |