Using pretrained model with keras

I’m using Windows, so I don’t believe I can use the deepspeech package, so I downloaded the pretrained model and have loaded it in my script using keras. My question is how do I go about using the model, like what type of input is it expecting, how should audio be preprocessed, and what kind of output does the model give. I don’t quite understand how the output graph works either.

Apologies if this seems like a basic problem.

Don’t believe, check :slight_smile: https://www.nuget.org/packages/DeepSpeech-GPU/ https://www.nuget.org/packages/DeepSpeech/

I would suggest to just have a look at how feeding is performed in native_client/deepspeech.cc as well as the export() function in DeepSpeech.py, that should help you to understand?

This looks awesome, do you know of any documentation for C#?

How about the examples in the repo? https://github.com/mozilla/DeepSpeech/tree/master/examples/net_framework/CSharpExamples

@jafioti Well docs for using the nuget is missing, I’m out time to add the doc right now.

For the most basic usage of the client you can see https://github.com/mozilla/DeepSpeech/blob/1276700c02f15a63794e58eb9e6956122cf0dee6/examples/net_framework/CSharpExamples/DeepSpeechConsole/Program.cs#L47

@jafioti Just notice with the current nuget you can’t use the Interface with the using (), use the class instead, it was a change that is not in the package yet

It’s in master, but I’m still working on TaskCluster builds for Windows, it will be at best a few days before we can push any alpha to NuGet.org

I meant with https://www.nuget.org/packages/DeepSpeech-GPU/

will need to change IDeepSpeech to DeepSpeech in the using(){} :slight_smile:

@jafioti Not working at which point? Installing it, running it? CPU or GPU? What’s working? At the time you deleted I was reading. Make sure you are running the project under x64 CPU configuration.

How did you load pretrained model using keras? Did you build the model and do model.load_weights? If so, which model did you use? Could you share?