diff --git a/examples/net_framework/CSharpExamples/.gitignore b/examples/net_framework/.gitignore similarity index 100% rename from examples/net_framework/CSharpExamples/.gitignore rename to examples/net_framework/.gitignore diff --git a/examples/net_framework/CSharpExamples/CSharpExamples.sln b/examples/net_framework/CSharpExamples/CSharpExamples.sln deleted file mode 100644 index e8494a36..00000000 --- a/examples/net_framework/CSharpExamples/CSharpExamples.sln +++ /dev/null @@ -1,37 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.136 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSpeechClient", "DeepSpeechClient\DeepSpeechClient.csproj", "{56DE4091-BBBE-47E4-852D-7268B33B971F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSpeech.WPF", "DeepSpeechWPF\DeepSpeech.WPF.csproj", "{54BFD766-4305-4F4C-BA59-AF45505DF3C1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSpeechConsole", "DeepSpeechConsole\DeepSpeechConsole.csproj", "{312965E5-C4F6-4D95-BA64-79906B8BC7AC}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {56DE4091-BBBE-47E4-852D-7268B33B971F}.Debug|x64.ActiveCfg = Debug|x64 - {56DE4091-BBBE-47E4-852D-7268B33B971F}.Debug|x64.Build.0 = Debug|x64 - {56DE4091-BBBE-47E4-852D-7268B33B971F}.Release|x64.ActiveCfg = Release|x64 - {56DE4091-BBBE-47E4-852D-7268B33B971F}.Release|x64.Build.0 = Release|x64 - {54BFD766-4305-4F4C-BA59-AF45505DF3C1}.Debug|x64.ActiveCfg = Debug|x64 - {54BFD766-4305-4F4C-BA59-AF45505DF3C1}.Debug|x64.Build.0 = Debug|x64 - {54BFD766-4305-4F4C-BA59-AF45505DF3C1}.Release|x64.ActiveCfg = Release|x64 - {54BFD766-4305-4F4C-BA59-AF45505DF3C1}.Release|x64.Build.0 = Release|x64 - {312965E5-C4F6-4D95-BA64-79906B8BC7AC}.Debug|x64.ActiveCfg = Debug|x64 - {312965E5-C4F6-4D95-BA64-79906B8BC7AC}.Debug|x64.Build.0 = Debug|x64 - {312965E5-C4F6-4D95-BA64-79906B8BC7AC}.Release|x64.ActiveCfg = Release|x64 - {312965E5-C4F6-4D95-BA64-79906B8BC7AC}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {1725B855-0208-4BB2-995A-0C38CAC1CB83} - EndGlobalSection -EndGlobal diff --git a/examples/net_framework/CSharpExamples/DeepSpeechConsole/App.config b/examples/net_framework/DeepSpeechWPF/App.config similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechConsole/App.config rename to examples/net_framework/DeepSpeechWPF/App.config diff --git a/examples/net_framework/CSharpExamples/DeepSpeechWPF/App.xaml b/examples/net_framework/DeepSpeechWPF/App.xaml similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechWPF/App.xaml rename to examples/net_framework/DeepSpeechWPF/App.xaml diff --git a/examples/net_framework/CSharpExamples/DeepSpeechWPF/App.xaml.cs b/examples/net_framework/DeepSpeechWPF/App.xaml.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechWPF/App.xaml.cs rename to examples/net_framework/DeepSpeechWPF/App.xaml.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechWPF/DeepSpeech.WPF.csproj b/examples/net_framework/DeepSpeechWPF/DeepSpeech.WPF.csproj similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechWPF/DeepSpeech.WPF.csproj rename to examples/net_framework/DeepSpeechWPF/DeepSpeech.WPF.csproj diff --git a/examples/net_framework/CSharpExamples/DeepSpeechWPF/MainWindow.xaml b/examples/net_framework/DeepSpeechWPF/MainWindow.xaml similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechWPF/MainWindow.xaml rename to examples/net_framework/DeepSpeechWPF/MainWindow.xaml diff --git a/examples/net_framework/CSharpExamples/DeepSpeechWPF/MainWindow.xaml.cs b/examples/net_framework/DeepSpeechWPF/MainWindow.xaml.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechWPF/MainWindow.xaml.cs rename to examples/net_framework/DeepSpeechWPF/MainWindow.xaml.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechWPF/Properties/AssemblyInfo.cs b/examples/net_framework/DeepSpeechWPF/Properties/AssemblyInfo.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechWPF/Properties/AssemblyInfo.cs rename to examples/net_framework/DeepSpeechWPF/Properties/AssemblyInfo.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechWPF/Properties/Resources.Designer.cs b/examples/net_framework/DeepSpeechWPF/Properties/Resources.Designer.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechWPF/Properties/Resources.Designer.cs rename to examples/net_framework/DeepSpeechWPF/Properties/Resources.Designer.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechWPF/Properties/Resources.resx b/examples/net_framework/DeepSpeechWPF/Properties/Resources.resx similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechWPF/Properties/Resources.resx rename to examples/net_framework/DeepSpeechWPF/Properties/Resources.resx diff --git a/examples/net_framework/CSharpExamples/DeepSpeechWPF/Properties/Settings.Designer.cs b/examples/net_framework/DeepSpeechWPF/Properties/Settings.Designer.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechWPF/Properties/Settings.Designer.cs rename to examples/net_framework/DeepSpeechWPF/Properties/Settings.Designer.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechWPF/Properties/Settings.settings b/examples/net_framework/DeepSpeechWPF/Properties/Settings.settings similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechWPF/Properties/Settings.settings rename to examples/net_framework/DeepSpeechWPF/Properties/Settings.settings diff --git a/examples/net_framework/CSharpExamples/DeepSpeechWPF/packages.config b/examples/net_framework/DeepSpeechWPF/packages.config similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechWPF/packages.config rename to examples/net_framework/DeepSpeechWPF/packages.config diff --git a/native_client/dotnet/.gitignore b/native_client/dotnet/.gitignore new file mode 100644 index 00000000..3e759b75 --- /dev/null +++ b/native_client/dotnet/.gitignore @@ -0,0 +1,330 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ diff --git a/native_client/dotnet/DeepSpeech.sln b/native_client/dotnet/DeepSpeech.sln new file mode 100644 index 00000000..b5e7db26 --- /dev/null +++ b/native_client/dotnet/DeepSpeech.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSpeechClient", "DeepSpeechClient\DeepSpeechClient.csproj", "{56DE4091-BBBE-47E4-852D-7268B33B971F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSpeechConsole", "DeepSpeechConsole\DeepSpeechConsole.csproj", "{312965E5-C4F6-4D95-BA64-79906B8BC7AC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {56DE4091-BBBE-47E4-852D-7268B33B971F}.Debug|x64.ActiveCfg = Debug|x64 + {56DE4091-BBBE-47E4-852D-7268B33B971F}.Debug|x64.Build.0 = Debug|x64 + {56DE4091-BBBE-47E4-852D-7268B33B971F}.Release|x64.ActiveCfg = Release|x64 + {56DE4091-BBBE-47E4-852D-7268B33B971F}.Release|x64.Build.0 = Release|x64 + {312965E5-C4F6-4D95-BA64-79906B8BC7AC}.Debug|x64.ActiveCfg = Debug|x64 + {312965E5-C4F6-4D95-BA64-79906B8BC7AC}.Debug|x64.Build.0 = Debug|x64 + {312965E5-C4F6-4D95-BA64-79906B8BC7AC}.Release|x64.ActiveCfg = Release|x64 + {312965E5-C4F6-4D95-BA64-79906B8BC7AC}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/net_framework/CSharpExamples/DeepSpeechClient/DeepSpeech.cs b/native_client/dotnet/DeepSpeechClient/DeepSpeech.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechClient/DeepSpeech.cs rename to native_client/dotnet/DeepSpeechClient/DeepSpeech.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechClient/DeepSpeechClient.csproj b/native_client/dotnet/DeepSpeechClient/DeepSpeechClient.csproj similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechClient/DeepSpeechClient.csproj rename to native_client/dotnet/DeepSpeechClient/DeepSpeechClient.csproj diff --git a/examples/net_framework/CSharpExamples/DeepSpeechClient/Interfaces/IDeepSpeech.cs b/native_client/dotnet/DeepSpeechClient/Interfaces/IDeepSpeech.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechClient/Interfaces/IDeepSpeech.cs rename to native_client/dotnet/DeepSpeechClient/Interfaces/IDeepSpeech.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechClient/NativeImp.cs b/native_client/dotnet/DeepSpeechClient/NativeImp.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechClient/NativeImp.cs rename to native_client/dotnet/DeepSpeechClient/NativeImp.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechClient/Properties/AssemblyInfo.cs b/native_client/dotnet/DeepSpeechClient/Properties/AssemblyInfo.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechClient/Properties/AssemblyInfo.cs rename to native_client/dotnet/DeepSpeechClient/Properties/AssemblyInfo.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechClient/Structs/ModelState.cs b/native_client/dotnet/DeepSpeechClient/Structs/ModelState.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechClient/Structs/ModelState.cs rename to native_client/dotnet/DeepSpeechClient/Structs/ModelState.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechClient/Structs/StreamingState.cs b/native_client/dotnet/DeepSpeechClient/Structs/StreamingState.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechClient/Structs/StreamingState.cs rename to native_client/dotnet/DeepSpeechClient/Structs/StreamingState.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechWPF/App.config b/native_client/dotnet/DeepSpeechConsole/App.config similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechWPF/App.config rename to native_client/dotnet/DeepSpeechConsole/App.config diff --git a/examples/net_framework/CSharpExamples/DeepSpeechConsole/DeepSpeechConsole.csproj b/native_client/dotnet/DeepSpeechConsole/DeepSpeechConsole.csproj similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechConsole/DeepSpeechConsole.csproj rename to native_client/dotnet/DeepSpeechConsole/DeepSpeechConsole.csproj diff --git a/examples/net_framework/CSharpExamples/DeepSpeechConsole/Program.cs b/native_client/dotnet/DeepSpeechConsole/Program.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechConsole/Program.cs rename to native_client/dotnet/DeepSpeechConsole/Program.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechConsole/Properties/AssemblyInfo.cs b/native_client/dotnet/DeepSpeechConsole/Properties/AssemblyInfo.cs similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechConsole/Properties/AssemblyInfo.cs rename to native_client/dotnet/DeepSpeechConsole/Properties/AssemblyInfo.cs diff --git a/examples/net_framework/CSharpExamples/DeepSpeechConsole/arctic_a0024.wav b/native_client/dotnet/DeepSpeechConsole/arctic_a0024.wav similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechConsole/arctic_a0024.wav rename to native_client/dotnet/DeepSpeechConsole/arctic_a0024.wav diff --git a/examples/net_framework/CSharpExamples/DeepSpeechConsole/packages.config b/native_client/dotnet/DeepSpeechConsole/packages.config similarity index 100% rename from examples/net_framework/CSharpExamples/DeepSpeechConsole/packages.config rename to native_client/dotnet/DeepSpeechConsole/packages.config diff --git a/examples/net_framework/README.md b/native_client/dotnet/README.md similarity index 79% rename from examples/net_framework/README.md rename to native_client/dotnet/README.md index ef19469b..4dfb4735 100644 --- a/examples/net_framework/README.md +++ b/native_client/dotnet/README.md @@ -16,23 +16,20 @@ Now we can build the native client of DeepSpeech and run inference on Windows us - [Build for CPU](#cpu) - [Build with CUDA support](#gpu-with-cuda) - [Using the generated library](#using-the-generated-library) + ## Prerequisites -* [Python 3.6](https://www.python.org/) -* [Git Large File Storage](https://git-lfs.github.com/) -* [MSYS2(x86_64)](https://www.msys2.org/) -* [Bazel v0.17.2](https://github.com/bazelbuild/bazel/releases) -* [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) * Windows 10 +* [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) * [Visual Studio 2017 Community](https://visualstudio.microsoft.com/vs/community/) +* [Git Large File Storage](https://git-lfs.github.com/) +* [TensorFlow Windows pre-requisites](https://www.tensorflow.org/install/source_windows) Inside the Visual Studio Installer enable `MS Build Tools` and `VC++ 2015.3 v14.00 (v140) toolset for desktop`. -If you want to enable CUDA support you need to install: +If you want to enable CUDA support you need to follow the steps in [the TensorFlow docs for building on Windows with CUDA](https://www.tensorflow.org/install/gpu#windows_setup). -* [CUDA 9.0 and cuDNN 7.3.1](https://developer.nvidia.com/cuda-90-download-archive) - -It may compile with other versions, as we don't extensively test other versions, we highly recommend sticking to the recommended versions in order to avoid compilation errors caused by incompatible versions. +We highly recommend sticking to the recommended versions of CUDA/cuDNN in order to avoid compilation errors caused by incompatible versions. We only test with the versions recommended by TensorFlow. ## Getting the code @@ -43,7 +40,7 @@ git clone https://github.com/mozilla/DeepSpeech ``` ```bash -git clone https://github.com/mozilla/tensorflow +git clone --branch r1.13 https://github.com/mozilla/tensorflow ``` ## Configuring the paths @@ -73,13 +70,7 @@ For MSYS2 we need to add `bin` directory, if you installed in the default route ```bash pacman -Syu -``` - -```bash pacman -Su -``` - -```bash pacman -S patch unzip ``` @@ -103,7 +94,7 @@ Add your `python.exe` path to the `PATH` variable. If you run CUDA enabled `native_client` we need to add the following to the `PATH` variable. ``` -C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin ``` ### Building the native_client @@ -131,4 +122,4 @@ Be patient, if you enabled AVX/AVX2 and CUDA it will take a long time. Finally y ## Using the generated library -As for now we can only use the generated `libdeepspeech.so` with the C# clients, go to [DeepSpeech/examples/net_framework/CSharpExamples/](https://github.com/mozilla/DeepSpeech/tree/master/examples/net_framework/CSharpExamples) in your DeepSpeech directory and open the Visual Studio solution, then we need to build in debug or release mode, finally we just need to copy `libdeepspeech.so` to the generated `x64/Debug` or `x64/Release` directory. +As for now we can only use the generated `libdeepspeech.so` with the C# clients, go to [native_client/dotnet/](https://github.com/mozilla/DeepSpeech/tree/master/native_client/dotnet) in your DeepSpeech directory and open the Visual Studio solution, then we need to build in debug or release mode, finally we just need to copy `libdeepspeech.so` to the generated `x64/Debug` or `x64/Release` directory. diff --git a/examples/net_framework/CSharpExamples/nupkg/build/.gitpreserve b/native_client/dotnet/nupkg/build/.gitpreserve similarity index 100% rename from examples/net_framework/CSharpExamples/nupkg/build/.gitpreserve rename to native_client/dotnet/nupkg/build/.gitpreserve diff --git a/examples/net_framework/CSharpExamples/nupkg/build/DeepSpeech.targets b/native_client/dotnet/nupkg/build/DeepSpeech.targets similarity index 100% rename from examples/net_framework/CSharpExamples/nupkg/build/DeepSpeech.targets rename to native_client/dotnet/nupkg/build/DeepSpeech.targets diff --git a/examples/net_framework/CSharpExamples/nupkg/deepspeech.nuspec.in b/native_client/dotnet/nupkg/deepspeech.nuspec.in similarity index 100% rename from examples/net_framework/CSharpExamples/nupkg/deepspeech.nuspec.in rename to native_client/dotnet/nupkg/deepspeech.nuspec.in diff --git a/examples/net_framework/CSharpExamples/nupkg/lib/net45/.gitpreserve b/native_client/dotnet/nupkg/lib/net45/.gitpreserve similarity index 100% rename from examples/net_framework/CSharpExamples/nupkg/lib/net45/.gitpreserve rename to native_client/dotnet/nupkg/lib/net45/.gitpreserve diff --git a/examples/net_framework/CSharpExamples/nupkg/lib/net46/.gitpreserve b/native_client/dotnet/nupkg/lib/net46/.gitpreserve similarity index 100% rename from examples/net_framework/CSharpExamples/nupkg/lib/net46/.gitpreserve rename to native_client/dotnet/nupkg/lib/net46/.gitpreserve diff --git a/examples/net_framework/CSharpExamples/nupkg/lib/net47/.gitpreserve b/native_client/dotnet/nupkg/lib/net47/.gitpreserve similarity index 100% rename from examples/net_framework/CSharpExamples/nupkg/lib/net47/.gitpreserve rename to native_client/dotnet/nupkg/lib/net47/.gitpreserve diff --git a/examples/net_framework/CSharpExamples/nupkg/tools/.gitpreserve b/native_client/dotnet/nupkg/tools/.gitpreserve similarity index 100% rename from examples/net_framework/CSharpExamples/nupkg/tools/.gitpreserve rename to native_client/dotnet/nupkg/tools/.gitpreserve diff --git a/taskcluster/win-package.sh b/taskcluster/win-package.sh index 16983755..27534d00 100755 --- a/taskcluster/win-package.sh +++ b/taskcluster/win-package.sh @@ -12,9 +12,9 @@ cp ${DS_ROOT_TASK}/DeepSpeech/tf/bazel*.log ${TASKCLUSTER_ARTIFACTS}/ package_native_client "native_client.tar.xz" -cp ${DS_ROOT_TASK}/DeepSpeech/ds/examples/net_framework/CSharpExamples/*.nupkg ${TASKCLUSTER_ARTIFACTS}/ +cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/dotnet/*.nupkg ${TASKCLUSTER_ARTIFACTS}/ -cp ${DS_ROOT_TASK}/DeepSpeech/ds/examples/net_framework/CSharpExamples/DeepSpeechConsole/bin/x64/Release/DeepSpeechConsole.exe ${TASKCLUSTER_ARTIFACTS}/ +cp ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/dotnet/DeepSpeechConsole/bin/x64/Release/DeepSpeechConsole.exe ${TASKCLUSTER_ARTIFACTS}/ if [ -d ${DS_ROOT_TASK}/DeepSpeech/ds/wheels ]; then cp ${DS_ROOT_TASK}/DeepSpeech/ds/wheels/* ${TASKCLUSTER_ARTIFACTS}/ diff --git a/tc-tests-utils.sh b/tc-tests-utils.sh index b5a2f22c..85895b94 100755 --- a/tc-tests-utils.sh +++ b/tc-tests-utils.sh @@ -813,11 +813,10 @@ do_deepspeech_ndk_build() do_deepspeech_netframework_build() { - cd ${DS_DSDIR}/examples/net_framework/CSharpExamples + cd ${DS_DSDIR}/native_client/dotnet # Setup dependencies nuget install DeepSpeechConsole/packages.config -OutputDirectory packages/ - nuget install DeepSpeechWPF/packages.config -OutputDirectory packages/ MSBUILD="$(cygpath 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe')" @@ -830,14 +829,14 @@ do_deepspeech_netframework_build() /p:Platform=x64 \ /p:TargetFrameworkVersion="v4.5" \ /p:OutputPath=bin/nuget/x64/v4.5 - + MSYS2_ARG_CONV_EXCL='/' "${MSBUILD}" \ DeepSpeechClient/DeepSpeechClient.csproj \ /p:Configuration=Release \ /p:Platform=x64 \ /p:TargetFrameworkVersion="v4.6" \ /p:OutputPath=bin/nuget/x64/v4.6 - + MSYS2_ARG_CONV_EXCL='/' "${MSBUILD}" \ DeepSpeechClient/DeepSpeechClient.csproj \ /p:Configuration=Release \ @@ -849,11 +848,6 @@ do_deepspeech_netframework_build() DeepSpeechConsole/DeepSpeechConsole.csproj \ /p:Configuration=Release \ /p:Platform=x64 - - MSYS2_ARG_CONV_EXCL='/' "${MSBUILD}" \ - DeepSpeechWPF/DeepSpeech.WPF.csproj \ - /p:Configuration=Release \ - /p:Platform=x64 } do_nuget_build() @@ -864,7 +858,7 @@ do_nuget_build() exit 1 fi; - cd ${DS_DSDIR}/examples/net_framework/CSharpExamples + cd ${DS_DSDIR}/native_client/dotnet cp ${DS_TFDIR}/bazel-bin/native_client/libdeepspeech.so nupkg/build @@ -879,7 +873,7 @@ do_nuget_build() mkdir -p nupkg/lib/net47/ cp DeepSpeechClient/bin/nuget/x64/v4.7/DeepSpeechClient.dll nupkg/lib/net47/ - PROJECT_VERSION=$(shell cat ../../../VERSION | tr -d '\n' | tr -d '\r') + PROJECT_VERSION=$(strip "${DS_VERSION}") sed \ -e "s/\$NUPKG_ID/${PROJECT_NAME}/" \ -e "s/\$NUPKG_VERSION/${PROJECT_VERSION}/" \