I am having an issue with implementing the pre-trained model using jupyter (I am using this because I am more familiar with it’s interface). Currently on Tensorflow 2.0, Windows 7.
The error is as listed:
TypeError Traceback (most recent call last)
in
25
26 # Load the acoustic model
—> 27 ds = Model(MODEL_GRAPH, N_FEATURES, N_CONTEXT, LM_ALPHABET, BEAM_WIDTH)
28 print(‘Loaded model’)
29
~\Documents\Anaconda\lib\site-packages\deepspeech_init_.py in init(self, *args, **kwargs)
41 self._impl = None
42
—> 43 status, impl = deepspeech.impl.CreateModel(*args, **kwargs)
44 if status != 0:
45 raise RuntimeError(“CreateModel failed with error code {}”.format(status))
TypeError: CreateModel() takes at most 3 arguments (5 given)
The goal of this is to make a workable inference application with a GUI.
I am still new to all of this so if there is a better way of implementing deepspeech on raspberry pi please free feel to tell me.
Because every post I see about implementing deepspeech uses 5 arg.
def init(self, *args, **kwargs):
# make sure the attribute is there if CreateModel fails
self._impl = None
status, impl = deepspeech.impl.CreateModel(*args, **kwargs)
if status != 0:
raise RuntimeError("CreateModel failed with error code {}".format(status))
self._impl = impl
This is the code I saw on github. Would you be so kind in telling me what is *args & **kwargs? Because I do not know what param it need for it to work.
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
5
Omg thank you so much for this. I did not even saw this link anywhere on the Github page. (Must be my lack of research) Anyway, I will read through this and hopefully this link contains the answers I needed. Thank you so much for your help.
i am getting error:
Loading model from file models/output_graph.pb
Traceback (most recent call last):
File “recognize.py”, line 96, in
main()
File “recognize.py”, line 63, in main
ds = Model(args.model, N_FEATURES, N_CONTEXT, args.alphabet, BEAM_WIDTH)
File “/home/robust_audio_ae/env/lib/python3.6/site-packages/deepspeech/init.py”, line 40, in init
status, impl = deepspeech.impl.CreateModel(*args, **kwargs)
TypeError: CreateModel() takes at most 2 arguments (5 given)
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
14
This code is old. Either use the matching older version of DeepSpeech, or update its use and remove the un-needed parameters. The link I gave you already contains the proper information.