updating example to use NuGet of DeepSpeechClient

This commit is contained in:
willieNU 2020-04-30 13:53:12 -05:00
Родитель 3e921b4c46
Коммит 203b0c8834
4 изменённых файлов: 178 добавлений и 179 удалений

Просмотреть файл

@ -20,7 +20,7 @@ namespace DeepSpeechWPF
{ {
//Register instance of DeepSpeech //Register instance of DeepSpeech
DeepSpeechClient.DeepSpeech deepSpeechClient = DeepSpeechClient.DeepSpeech deepSpeechClient =
new DeepSpeechClient.DeepSpeech("output_graph.pbmm"); new DeepSpeechClient.DeepSpeech("deepspeech-0.7.0-models.pbmm");
SimpleIoc.Default.Register<IDeepSpeech>(() => deepSpeechClient); SimpleIoc.Default.Register<IDeepSpeech>(() => deepSpeechClient);
SimpleIoc.Default.Register<MainWindowViewModel>(); SimpleIoc.Default.Register<MainWindowViewModel>();

Просмотреть файл

@ -1,140 +1,144 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{54BFD766-4305-4F4C-BA59-AF45505DF3C1}</ProjectGuid> <ProjectGuid>{54BFD766-4305-4F4C-BA59-AF45505DF3C1}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>DeepSpeech.WPF</RootNamespace> <RootNamespace>DeepSpeech.WPF</RootNamespace>
<AssemblyName>DeepSpeech.WPF</AssemblyName> <AssemblyName>DeepSpeech.WPF</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<NuGetPackageImportStamp> <NuGetPackageImportStamp>
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath> <OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath> <OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit> <Prefer32Bit>true</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="AsyncAwaitBestPractices, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="AsyncAwaitBestPractices, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\AsyncAwaitBestPractices.3.1.0\lib\netstandard1.0\AsyncAwaitBestPractices.dll</HintPath> <HintPath>packages\AsyncAwaitBestPractices.3.1.0\lib\netstandard1.0\AsyncAwaitBestPractices.dll</HintPath>
</Reference> </Reference>
<Reference Include="AsyncAwaitBestPractices.MVVM, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="AsyncAwaitBestPractices.MVVM, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\AsyncAwaitBestPractices.MVVM.3.1.0\lib\netstandard1.0\AsyncAwaitBestPractices.MVVM.dll</HintPath> <HintPath>packages\AsyncAwaitBestPractices.MVVM.3.1.0\lib\netstandard1.0\AsyncAwaitBestPractices.MVVM.dll</HintPath>
</Reference> </Reference>
<Reference Include="CommonServiceLocator, Version=2.0.2.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL"> <Reference Include="CommonServiceLocator, Version=2.0.2.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>packages\CommonServiceLocator.2.0.2\lib\net45\CommonServiceLocator.dll</HintPath> <HintPath>packages\CommonServiceLocator.2.0.2\lib\net45\CommonServiceLocator.dll</HintPath>
</Reference> </Reference>
<Reference Include="CSCore, Version=1.2.1.2, Culture=neutral, PublicKeyToken=5a08f2b6f4415dea, processorArchitecture=MSIL"> <Reference Include="CSCore, Version=1.2.1.2, Culture=neutral, PublicKeyToken=5a08f2b6f4415dea, processorArchitecture=MSIL">
<HintPath>packages\CSCore.1.2.1.2\lib\net35-client\CSCore.dll</HintPath> <HintPath>packages\CSCore.1.2.1.2\lib\net35-client\CSCore.dll</HintPath>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL"> <Reference Include="DeepSpeechClient, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath> <HintPath>packages\DeepSpeech.0.7.0\lib\net46\DeepSpeechClient.dll</HintPath>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath> <HintPath>packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.4.1.0, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath> <HintPath>packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
</Reference> </Reference>
<Reference Include="NAudio, Version=1.9.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.4.1.0, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
<HintPath>packages\NAudio.1.9.0\lib\net35\NAudio.dll</HintPath> <HintPath>packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="NAudio, Version=1.9.0.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="System.Data" /> <HintPath>packages\NAudio.1.9.0\lib\net35\NAudio.dll</HintPath>
<Reference Include="System.Windows.Forms" /> </Reference>
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System" />
<HintPath>packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll</HintPath> <Reference Include="System.Data" />
</Reference> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.CSharp" /> <HintPath>packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll</HintPath>
<Reference Include="System.Core" /> </Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Net.Http" /> <Reference Include="System.Core" />
<Reference Include="System.Xaml"> <Reference Include="System.Xml.Linq" />
<RequiredTargetFramework>4.0</RequiredTargetFramework> <Reference Include="System.Data.DataSetExtensions" />
</Reference> <Reference Include="System.Net.Http" />
<Reference Include="WindowsBase" /> <Reference Include="System.Xaml">
<Reference Include="PresentationCore" /> <RequiredTargetFramework>4.0</RequiredTargetFramework>
<Reference Include="PresentationFramework" /> </Reference>
</ItemGroup> <Reference Include="WindowsBase" />
<ItemGroup> <Reference Include="PresentationCore" />
<ApplicationDefinition Include="App.xaml"> <Reference Include="PresentationFramework" />
<Generator>MSBuild:Compile</Generator> </ItemGroup>
<SubType>Designer</SubType> <ItemGroup>
</ApplicationDefinition> <ApplicationDefinition Include="App.xaml">
<Compile Include="ViewModels\MainWindowViewModel.cs" /> <Generator>MSBuild:Compile</Generator>
<Page Include="MainWindow.xaml"> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> </ApplicationDefinition>
<SubType>Designer</SubType> <Compile Include="ViewModels\MainWindowViewModel.cs" />
</Page> <Page Include="MainWindow.xaml">
<Compile Include="App.xaml.cs"> <Generator>MSBuild:Compile</Generator>
<DependentUpon>App.xaml</DependentUpon> <SubType>Designer</SubType>
<SubType>Code</SubType> </Page>
</Compile> <Compile Include="App.xaml.cs">
<Compile Include="ViewModels\BindableBase.cs" /> <DependentUpon>App.xaml</DependentUpon>
<Compile Include="MainWindow.xaml.cs"> <SubType>Code</SubType>
<DependentUpon>MainWindow.xaml</DependentUpon> </Compile>
<SubType>Code</SubType> <Compile Include="ViewModels\BindableBase.cs" />
</Compile> <Compile Include="MainWindow.xaml.cs">
</ItemGroup> <DependentUpon>MainWindow.xaml</DependentUpon>
<ItemGroup> <SubType>Code</SubType>
<Compile Include="Properties\AssemblyInfo.cs"> </Compile>
<SubType>Code</SubType> </ItemGroup>
</Compile> <ItemGroup>
<Compile Include="Properties\Resources.Designer.cs"> <Compile Include="Properties\AssemblyInfo.cs">
<AutoGen>True</AutoGen> <SubType>Code</SubType>
<DesignTime>True</DesignTime> </Compile>
<DependentUpon>Resources.resx</DependentUpon> <Compile Include="Properties\Resources.Designer.cs">
</Compile> <AutoGen>True</AutoGen>
<Compile Include="Properties\Settings.Designer.cs"> <DesignTime>True</DesignTime>
<AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon>
<DependentUpon>Settings.settings</DependentUpon> </Compile>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <Compile Include="Properties\Settings.Designer.cs">
</Compile> <AutoGen>True</AutoGen>
<EmbeddedResource Include="Properties\Resources.resx"> <DependentUpon>Settings.settings</DependentUpon>
<Generator>ResXFileCodeGenerator</Generator> <DesignTimeSharedInput>True</DesignTimeSharedInput>
<LastGenOutput>Resources.Designer.cs</LastGenOutput> </Compile>
</EmbeddedResource> <EmbeddedResource Include="Properties\Resources.resx">
<None Include="packages.config" /> <Generator>ResXFileCodeGenerator</Generator>
<None Include="Properties\Settings.settings"> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
<Generator>SettingsSingleFileGenerator</Generator> </EmbeddedResource>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <None Include="packages.config" />
</None> <None Include="Properties\Settings.settings">
</ItemGroup> <Generator>SettingsSingleFileGenerator</Generator>
<ItemGroup> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
<None Include="App.config" /> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\ds\native_client\dotnet\DeepSpeechClient\DeepSpeechClient.csproj"> <None Include="App.config" />
<Project>{56de4091-bbbe-47e4-852d-7268b33b971f}</Project> </ItemGroup>
<Name>DeepSpeechClient</Name> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</ProjectReference> <Import Project="packages\DeepSpeech.0.7.0\build\DeepSpeech.targets" Condition="Exists('packages\DeepSpeech.0.7.0\build\DeepSpeech.targets')" />
</ItemGroup> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\DeepSpeech.0.7.0\build\DeepSpeech.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\DeepSpeech.0.7.0\build\DeepSpeech.targets'))" />
</Target>
</Project> </Project>

Просмотреть файл

@ -1,31 +1,25 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio 15
VisualStudioVersion = 15.0.28307.421 VisualStudioVersion = 15.0.28307.421
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSpeech.WPF", "DeepSpeech.WPF.csproj", "{54BFD766-4305-4F4C-BA59-AF45505DF3C1}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSpeech.WPF", "DeepSpeech.WPF.csproj", "{54BFD766-4305-4F4C-BA59-AF45505DF3C1}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSpeechClient", "..\..\..\ds\native_client\dotnet\DeepSpeechClient\DeepSpeechClient.csproj", "{56DE4091-BBBE-47E4-852D-7268B33B971F}" Global
EndProject GlobalSection(SolutionConfigurationPlatforms) = preSolution
Global Debug|x64 = Debug|x64
GlobalSection(SolutionConfigurationPlatforms) = preSolution Release|x64 = Release|x64
Debug|x64 = Debug|x64 EndGlobalSection
Release|x64 = Release|x64 GlobalSection(ProjectConfigurationPlatforms) = postSolution
EndGlobalSection {54BFD766-4305-4F4C-BA59-AF45505DF3C1}.Debug|x64.ActiveCfg = Debug|x64
GlobalSection(ProjectConfigurationPlatforms) = postSolution {54BFD766-4305-4F4C-BA59-AF45505DF3C1}.Debug|x64.Build.0 = Debug|x64
{54BFD766-4305-4F4C-BA59-AF45505DF3C1}.Debug|x64.ActiveCfg = Debug|x64 {54BFD766-4305-4F4C-BA59-AF45505DF3C1}.Release|x64.ActiveCfg = Release|x64
{54BFD766-4305-4F4C-BA59-AF45505DF3C1}.Debug|x64.Build.0 = Debug|x64 {54BFD766-4305-4F4C-BA59-AF45505DF3C1}.Release|x64.Build.0 = Release|x64
{54BFD766-4305-4F4C-BA59-AF45505DF3C1}.Release|x64.ActiveCfg = Release|x64 EndGlobalSection
{54BFD766-4305-4F4C-BA59-AF45505DF3C1}.Release|x64.Build.0 = Release|x64 GlobalSection(SolutionProperties) = preSolution
{56DE4091-BBBE-47E4-852D-7268B33B971F}.Debug|x64.ActiveCfg = Debug|x64 HideSolutionNode = FALSE
{56DE4091-BBBE-47E4-852D-7268B33B971F}.Debug|x64.Build.0 = Debug|x64 EndGlobalSection
{56DE4091-BBBE-47E4-852D-7268B33B971F}.Release|x64.ActiveCfg = Release|x64 GlobalSection(ExtensibilityGlobals) = postSolution
{56DE4091-BBBE-47E4-852D-7268B33B971F}.Release|x64.Build.0 = Release|x64 SolutionGuid = {19C58802-CCEC-4FD1-8D17-A6EB766116F7}
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution EndGlobal
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {19C58802-CCEC-4FD1-8D17-A6EB766116F7}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="AsyncAwaitBestPractices" version="3.1.0" targetFramework="net462" /> <package id="AsyncAwaitBestPractices" version="3.1.0" targetFramework="net462" />
<package id="AsyncAwaitBestPractices.MVVM" version="3.1.0" targetFramework="net462" /> <package id="AsyncAwaitBestPractices.MVVM" version="3.1.0" targetFramework="net462" />
<package id="CommonServiceLocator" version="2.0.2" targetFramework="net462" /> <package id="CommonServiceLocator" version="2.0.2" targetFramework="net462" />
<package id="CSCore" version="1.2.1.2" targetFramework="net462" /> <package id="CSCore" version="1.2.1.2" targetFramework="net462" />
<package id="MvvmLightLibs" version="5.4.1.1" targetFramework="net462" /> <package id="DeepSpeech" version="0.7.0" targetFramework="net462" />
<package id="NAudio" version="1.9.0" targetFramework="net462" /> <package id="MvvmLightLibs" version="5.4.1.1" targetFramework="net462" />
<package id="NAudio" version="1.9.0" targetFramework="net462" />
</packages> </packages>