How to use nuget package in Windows?

Hi

I’m trying to use the nuget package for deepspeech (v0.41) to transcribe audio. I’m trying to use DeepSpeechConsole.exe in the tools directory.

I’ve downloaded the nuget package, unzipped, then downloaded the v0.41 models and also extracted into the tools directory. I tried running the executable from the shell but it doesn’t seem to work:

C:\Users\miguel\Downloads\deepspeech.0.4.1\tools>DeepSpeechConsole.exe --model models\output_graph.pbmm --alphabet models\alphabet.txt --lm models\lm.binary --trie models\trie --audio speech1.wav            
                                                                                                                                                                                                                                                           
Excepção não processada: System.IO.FileNotFoundException: Não foi possível carregar o ficheiro ou assemblagem 'DeepSpeechClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' ou uma das respectivas dependências. O sistema não conseguiu localizar o ficheiro especificado.                                                                                                                                                                         
em CSharpExamples.Program.Main(String[] args)               
                                                                                                                                                                                                                                                                                                                                                                                                      
C:\Users\miguel\Downloads\deepspeech.0.4.1\tools>dir                                                                                                                                                                                  

Volume in drive C is Windows-SSD                                                                                                                                                                                      

Directory of C:\Users\miguel\Downloads\deepspeech.0.4.1\tools                                                                                                                                                                                                                                                                                                                                                                                                            
01/04/2019  19:13    <DIR>          .                                                                                                                                                                                                
01/04/2019  19:13    <DIR>          ..                                                                                                                                                                                               
16/01/2019  17:50             7 168 DeepSpeechConsole.exe                                                                                                                                                                            
09/01/2019  15:39    <DIR>          models                                                                                                                                                                                           
01/04/2019  19:09           278 124 speech1.wav                                                                                                                                                                                                     
2 File(s)        285 292 bytes                                                                                                                                                                                                       
3 Dir(s)  13 193 052 160 bytes free

Google translate of the error:

Unhandled Exception: System.IO.FileNotFoundException: The file or assembly ‘DeepSpeechClient, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null’ or one of its dependencies could not be loaded. The system could not find the file specified.
in CSharpExamples.Program.Main (String [] args)

@miguel.negrao Hi, sorry we don’t have docs for using the .NET client.

There are few options:

  1. Cloning and compiling the console example then use the local reference of the DeepSpeechClient.dll, or removing the local reference to install the nuget.
  2. Using the native_client.amd64.cpu.win.tar.xz from the releases.
  3. Using my builds https://github.com/carlfm01/deepspeech-tempwinbuilds/releases/tag/0.4.1

Please share any feedback :slight_smile:

@miguel.negrao @carlfm01 don’t forget we have more recent versions of nuget exposed, maybe the packaging is better there

Hi

Thanks for the help. Perhaps these questions are bit basic, but I’m a bit lost here:

  1. What do you mean by ‘use the local reference’ ?
  2. I want to use a trained model for english. There are no trained models for english for the 0.5 alpha versions available, are there ? (@lissyx this also covers your reply).
  3. That zip contains an .so file. How do I use that in windows ? It doesn’t seem to be an executable.

Additional question:

  • Does the executable inside the nuget work without installing the nuget (just unzipping), which is what I was doing, or it only works if is installed via nuget package manager ?

Thanks,
Miguel Negrão

Those 0.5 alphas are still compatible with 0.4.1 released model

That’s just a PE/DLL named .so.

Ah, I didn’t know this. Is this documented somewhere ? Since the model file is tagged with the version number (0.4.1) I assumed it was specific to one version.

Ok, though I didn’t get how I would use it.

In any case I the native_client builds for 0.5.0 are working:

C:\Users\miguel\Downloads\native_client.amd64.cpu.win.tar\native_client.amd64.cpu.win>deepspeech.exe  --model models\output_graph.pbmm --alphabet models\alphabet.txt --lm models\lm.binary --trie models\trie --audio speech1.wav

TensorFlow: v1.13.1-8-g17f818896d                                                                                                                                                                                                            DeepSpeech: v0.5.0-alpha.4-0-gc092213 

Thank you for the help !

Well, when we break compat we mention it in README.