mozilla / DeepSpeech

DeepSpeech is an open source embedded (offline, on-device) speech-to-text engine which can run in real time on devices ranging from a Raspberry Pi 4 to high power GPU servers.
Mozilla Public License 2.0
25.33k stars 3.97k forks source link

broken .Net frameworks tests with NAudio >= 2.0.0 #3540

Open lissyx opened 3 years ago

lissyx commented 3 years ago
+ ls -halR DeepSpeech.0.10.0-alpha.3
DeepSpeech.0.10.0-alpha.3:
total 7.7M
drwxr-xr-x 1 task_161425170976582 None    0 Feb 25 11:17 .
drwxr-xr-x 1 task_161425170976582 None    0 Feb 25 11:17 ..
-rw-r--r-- 1 task_161425170976582 None 7.7M Feb 25 11:17 DeepSpeech.0.10.0-alpha.3.nupkg
drwxr-xr-x 1 task_161425170976582 None    0 Feb 25 11:17 build
drwxr-xr-x 1 task_161425170976582 None    0 Feb 25 11:17 lib
drwxr-xr-x 1 task_161425170976582 None    0 Feb 25 11:17 tools

DeepSpeech.0.10.0-alpha.3/build:
total 25M
drwxr-xr-x 1 task_161425170976582 None   0 Feb 25 11:17 .
drwxr-xr-x 1 task_161425170976582 None   0 Feb 25 11:17 ..
-rw-r--r-- 1 task_161425170976582 None   0 Feb 25 09:20 .gitpreserve
-rw-r--r-- 1 task_161425170976582 None 337 Feb 25 09:20 DeepSpeech.targets
-rwxr-xr-x 1 task_161425170976582 None 25M Feb 25 11:05 libdeepspeech.so

DeepSpeech.0.10.0-alpha.3/lib:
total 4.0K
drwxr-xr-x 1 task_161425170976582 None 0 Feb 25 11:17 .
drwxr-xr-x 1 task_161425170976582 None 0 Feb 25 11:17 ..
drwxr-xr-x 1 task_161425170976582 None 0 Feb 25 11:17 net45
drwxr-xr-x 1 task_161425170976582 None 0 Feb 25 11:17 net46
drwxr-xr-x 1 task_161425170976582 None 0 Feb 25 11:17 net47
drwxr-xr-x 1 task_161425170976582 None 0 Feb 25 11:17 uap10.0

DeepSpeech.0.10.0-alpha.3/lib/net45:
total 12K
drwxr-xr-x 1 task_161425170976582 None   0 Feb 25 11:17 .
drwxr-xr-x 1 task_161425170976582 None   0 Feb 25 11:17 ..
-rw-r--r-- 1 task_161425170976582 None   0 Feb 25 09:20 .gitpreserve
-rwxr-xr-x 1 task_161425170976582 None 11K Feb 25 11:05 DeepSpeechClient.dll

DeepSpeech.0.10.0-alpha.3/lib/net46:
total 12K
drwxr-xr-x 1 task_161425170976582 None   0 Feb 25 11:17 .
drwxr-xr-x 1 task_161425170976582 None   0 Feb 25 11:17 ..
-rw-r--r-- 1 task_161425170976582 None   0 Feb 25 09:20 .gitpreserve
-rwxr-xr-x 1 task_161425170976582 None 11K Feb 25 11:05 DeepSpeechClient.dll

DeepSpeech.0.10.0-alpha.3/lib/net47:
total 12K
drwxr-xr-x 1 task_161425170976582 None   0 Feb 25 11:17 .
drwxr-xr-x 1 task_161425170976582 None   0 Feb 25 11:17 ..
-rw-r--r-- 1 task_161425170976582 None   0 Feb 25 09:20 .gitpreserve
-rwxr-xr-x 1 task_161425170976582 None 11K Feb 25 11:05 DeepSpeechClient.dll

DeepSpeech.0.10.0-alpha.3/lib/uap10.0:
total 12K
drwxr-xr-x 1 task_161425170976582 None   0 Feb 25 11:17 .
drwxr-xr-x 1 task_161425170976582 None   0 Feb 25 11:17 ..
-rwxr-xr-x 1 task_161425170976582 None 10K Feb 25 11:05 DeepSpeechClient.dll

DeepSpeech.0.10.0-alpha.3/tools:
total 4.0K
drwxr-xr-x 1 task_161425170976582 None 0 Feb 25 11:17 .
drwxr-xr-x 1 task_161425170976582 None 0 Feb 25 11:17 ..
-rw-r--r-- 1 task_161425170976582 None 0 Feb 25 09:20 .gitpreserve
+ nuget install NAudio
Feeds used:
  https://api.nuget.org/v3/index.json
  C:\builds\tc-workdir\tmp\repo\
  C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

Installing package 'NAudio' to 'C:\builds\tc-workdir\tmp\ds'.
  GET https://api.nuget.org/v3/registration5-gz-semver2/naudio/index.json
  OK https://api.nuget.org/v3/registration5-gz-semver2/naudio/index.json 91ms

Attempting to gather dependency information for package 'NAudio.2.0.0' with respect to project 'C:\builds\tc-workdir\tmp\ds', targeting 'Any,Version=v0.0'
Gathering dependency information took 1.58 sec
Attempting to resolve dependencies for package 'NAudio.2.0.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'NAudio.2.0.0'
Resolved actions to install package 'NAudio.2.0.0'
  GET https://api.nuget.org/v3-flatcontainer/naudio.core/2.0.0/naudio.core.2.0.0.nupkg
  GET https://api.nuget.org/v3-flatcontainer/naudio.winmm/2.0.0/naudio.winmm.2.0.0.nupkg
  OK https://api.nuget.org/v3-flatcontainer/naudio.winmm/2.0.0/naudio.winmm.2.0.0.nupkg 6ms
  OK https://api.nuget.org/v3-flatcontainer/naudio.core/2.0.0/naudio.core.2.0.0.nupkg 7ms
  GET https://api.nuget.org/v3-flatcontainer/microsoft.win32.registry/4.7.0/microsoft.win32.registry.4.7.0.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.win32.registry/4.7.0/microsoft.win32.registry.4.7.0.nupkg 7ms
Installing NAudio.WinMM 2.0.0.
Installing NAudio.Core 2.0.0.
Installing Microsoft.Win32.Registry 4.7.0.
  GET https://api.nuget.org/v3-flatcontainer/system.security.principal.windows/4.7.0/system.security.principal.windows.4.7.0.nupkg
  GET https://api.nuget.org/v3-flatcontainer/system.security.accesscontrol/4.7.0/system.security.accesscontrol.4.7.0.nupkg
  OK https://api.nuget.org/v3-flatcontainer/system.security.principal.windows/4.7.0/system.security.principal.windows.4.7.0.nupkg 3ms
Installing System.Security.Principal.Windows 4.7.0.
  OK https://api.nuget.org/v3-flatcontainer/system.security.accesscontrol/4.7.0/system.security.accesscontrol.4.7.0.nupkg 4ms
Installing System.Security.AccessControl 4.7.0.
  GET https://api.nuget.org/v3-flatcontainer/naudio.wasapi/2.0.0/naudio.wasapi.2.0.0.nupkg
  GET https://api.nuget.org/v3-flatcontainer/naudio.asio/2.0.0/naudio.asio.2.0.0.nupkg
  OK https://api.nuget.org/v3-flatcontainer/naudio.wasapi/2.0.0/naudio.wasapi.2.0.0.nupkg 7ms
Installing NAudio.Wasapi 2.0.0.
  OK https://api.nuget.org/v3-flatcontainer/naudio.asio/2.0.0/naudio.asio.2.0.0.nupkg 7ms
Installing NAudio.Asio 2.0.0.
  GET https://api.nuget.org/v3-flatcontainer/naudio.midi/2.0.0/naudio.midi.2.0.0.nupkg
  OK https://api.nuget.org/v3-flatcontainer/naudio.midi/2.0.0/naudio.midi.2.0.0.nupkg 7ms
Installing NAudio.Midi 2.0.0.
  GET https://api.nuget.org/v3-flatcontainer/naudio/2.0.0/naudio.2.0.0.nupkg
Retrieving package 'Microsoft.Win32.Registry 4.7.0' from 'nuget.org'.
Retrieving package 'NAudio 2.0.0' from 'nuget.org'.
Retrieving package 'NAudio.Asio 2.0.0' from 'nuget.org'.
Retrieving package 'NAudio.Core 2.0.0' from 'nuget.org'.
Retrieving package 'NAudio.Midi 2.0.0' from 'nuget.org'.
Retrieving package 'NAudio.Wasapi 2.0.0' from 'nuget.org'.
Retrieving package 'NAudio.WinForms 2.0.0' from 'nuget.org'.
Retrieving package 'NAudio.WinMM 2.0.0' from 'nuget.org'.
Retrieving package 'System.Security.AccessControl 4.7.0' from 'nuget.org'.
Retrieving package 'System.Security.Principal.Windows 4.7.0' from 'nuget.org'.
  OK https://api.nuget.org/v3-flatcontainer/naudio/2.0.0/naudio.2.0.0.nupkg 6ms
Installing NAudio 2.0.0.
  GET https://api.nuget.org/v3-flatcontainer/naudio.winforms/2.0.0/naudio.winforms.2.0.0.nupkg
  OK https://api.nuget.org/v3-flatcontainer/naudio.winforms/2.0.0/naudio.winforms.2.0.0.nupkg 6ms
Installing NAudio.WinForms 2.0.0.
Adding package 'NAudio.Core.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Added package 'NAudio.Core.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Successfully installed 'NAudio.Core 2.0.0' to C:\builds\tc-workdir\tmp\ds
Adding package 'NAudio.Midi.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Added package 'NAudio.Midi.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Successfully installed 'NAudio.Midi 2.0.0' to C:\builds\tc-workdir\tmp\ds
Adding package 'NAudio.Wasapi.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Added package 'NAudio.Wasapi.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Successfully installed 'NAudio.Wasapi 2.0.0' to C:\builds\tc-workdir\tmp\ds
Adding package 'System.Security.Principal.Windows.4.7.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Added package 'System.Security.Principal.Windows.4.7.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Successfully installed 'System.Security.Principal.Windows 4.7.0' to C:\builds\tc-workdir\tmp\ds
Adding package 'System.Security.AccessControl.4.7.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Added package 'System.Security.AccessControl.4.7.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Successfully installed 'System.Security.AccessControl 4.7.0' to C:\builds\tc-workdir\tmp\ds
Adding package 'Microsoft.Win32.Registry.4.7.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Added package 'Microsoft.Win32.Registry.4.7.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Successfully installed 'Microsoft.Win32.Registry 4.7.0' to C:\builds\tc-workdir\tmp\ds
Adding package 'NAudio.Asio.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Added package 'NAudio.Asio.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Successfully installed 'NAudio.Asio 2.0.0' to C:\builds\tc-workdir\tmp\ds
Adding package 'NAudio.WinMM.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Added package 'NAudio.WinMM.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Successfully installed 'NAudio.WinMM 2.0.0' to C:\builds\tc-workdir\tmp\ds
Adding package 'NAudio.WinForms.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Added package 'NAudio.WinForms.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Successfully installed 'NAudio.WinForms 2.0.0' to C:\builds\tc-workdir\tmp\ds
Adding package 'NAudio.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Added package 'NAudio.2.0.0' to folder 'C:\builds\tc-workdir\tmp\ds'
Successfully installed 'NAudio 2.0.0' to C:\builds\tc-workdir\tmp\ds
Executing nuget actions took 1.45 sec
+ cp 'NAudio*/lib/net35/NAudio.dll' /c/builds/tc-workdir//tmp/ds/
cp: cannot stat 'NAudio*/lib/net35/NAudio.dll': No such file or directory

@carlfm01 Anything that you see obvious?

lissyx commented 3 years ago

@carlfm01 As a quick fix, I've prepared a force of NAudio v1.10.0 in my PR https://github.com/mozilla/DeepSpeech/pull/3539, but do you think we should investigate further?

lissyx commented 3 years ago

Keeping this open until we figure out a proper fix.

carlfm01 commented 3 years ago
  • cp 'NAudio*/lib/net35/NAudio.dll' /c/builds/tc-workdir//tmp/ds/

Hello, with version 2 the lib changed to /lib/netstandard2.0/NAudio.dll, I think is better to specify the version, just like your fix, without a specific version there's no guarantee that the path will stay the same under /lib/netstandard2.0/

lissyx commented 3 years ago
  • cp 'NAudio*/lib/net35/NAudio.dll' /c/builds/tc-workdir//tmp/ds/

Hello, with version 2 the lib changed to /lib/netstandard2.0/NAudio.dll, I think is better to specify the version, just like your fix, without a specific version there's no guarantee that the path will stay the same under /lib/netstandard2.0/

Ok, but several questions then:

lissyx commented 3 years ago

Ok, it's not as trivial as expected:

Build FAILED.

"C:\builds\tc-workdir\DeepSpeech\ds\native_client\dotnet\DeepSpeechConsole\DeepSpeechConsole.csproj" (default target) (1) ->
(CoreCompile target) -> 
  Program.cs(84,42): error CS0246: The type or namespace name 'WaveBuffer' could not be found (are you missing a using directive or an assembly reference?) [C:\builds\tc-workdir\DeepSpeech\ds\native_client\dotnet\DeepSpeechConsole\DeepSpeechConsole.csproj]
  Program.cs(85,47): error CS0246: The type or namespace name 'WaveFileReader' could not be found (are you missing a using directive or an assembly reference?) [C:\builds\tc-workdir\DeepSpeech\ds\native_client\dotnet\DeepSpeechConsole\DeepSpeechConsole.csproj]
lissyx commented 3 years ago

@carlfm01 I checked in the repo and the namespace is still NAudio.Wave: https://github.com/naudio/NAudio/blob/v2.0.0/NAudio.Core/Wave/WaveOutputs/WaveBuffer.cs#L4

I have no idea why it's not picking WaveBuffer and WaveFileReader anymore and I can't find proper usages examples of NAudio 2.0.0.