GithubHelp home page GithubHelp logo

Comments (8)

reith avatar reith commented on May 10, 2024

Keras versions of 2 should work. If you want stick to Keras 1, you should use Keras 1.2.2 and comment concatenate import in model_wrp module.

If you want Theano based model you should use 0.10 and later instead of sherjilozair/ctc.

from deepspeech-playground.

prashantmaheshwari94 avatar prashantmaheshwari94 commented on May 10, 2024

keras version 2 worked however i am getting some new error, looks like implementation error.

/home/prashant/Documents/speech_recognition/speechRecognition/thirdpartyDP/deepspeech-playground/model_wrp.py:274: UserWarning: Update your Dense call to the Keras 2 API: Dense(29, activation="softmax", kernel_initializer="glorot_uniform", name="text_dense")
activation=for_tf_or_th('softmax', 'linear')
/home/prashant/Documents/speech_recognition/speechRecognition/thirdpartyDP/deepspeech-playground/model_wrp.py:278: UserWarning: Update your Model call to the Keras 2 API: Model(outputs=[<tf.Tenso..., inputs=Tensor("ac...)
self.model = Model(input=acoustic_input, output=[network_output])
No handlers could be found for logger "data_generator"
Traceback (most recent call last):
File "test.py", line 63, in
main(args.test_desc_file, args.model_config, args.weights_file)
File "test.py", line 49, in main
trainer.validate(datagen, 32, False, False, None)
File "/home/prashant/Documents/speech_recognition/speechRecognition/thirdpartyDP/deepspeech-playground/trainer.py", line 199, in validate
for batch in datagen.iterate_validation(mb_size):
File "/home/prashant/Documents/speech_recognition/speechRecognition/thirdpartyDP/deepspeech-playground/data_generator.py", line 231, in iterate
minibatch = future.result()
File "/usr/local/lib/python2.7/dist-packages/concurrent/futures/_base.py", line 398, in result
return self.__get_result()
File "/usr/local/lib/python2.7/dist-packages/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/prashant/Documents/speech_recognition/speechRecognition/thirdpartyDP/deepspeech-playground/data_generator.py", line 147, in prepare_minibatch
max_length = max(input_lengths)
ValueError: max() arg is an empty sequence

from deepspeech-playground.

reith avatar reith commented on May 10, 2024

Would you send your data description file? (e.g. test-clean.json)

from deepspeech-playground.

prashantmaheshwari94 avatar prashantmaheshwari94 commented on May 10, 2024

I was passing wrong file. I changed that and it worked fine. But can we have more verbose result like the predicted sentences instead of just loss value?
And also can the inference for audio file be done using this?

from deepspeech-playground.

reith avatar reith commented on May 10, 2024

Yes, but not by test.py. Try visualize.py or model-evaluation notebook.

from deepspeech-playground.

prashantmaheshwari94 avatar prashantmaheshwari94 commented on May 10, 2024

What all it takes as input?

from deepspeech-playground.

prashantmaheshwari94 avatar prashantmaheshwari94 commented on May 10, 2024

Got this error while inferencing audio file using visualize.py

Using TensorFlow backend.
Loading model
Compiling test function...
Traceback (most recent call last):
File "visualize.py", line 190, in
main()
File "visualize.py", line 186, in main
visualize(model, args.test_file, args.train_desc_file)
File "visualize.py", line 59, in visualize
test_fn = compile_output_fn(model)
File "/home/prashant/Documents/speech_recognition/speechRecognition/thirdpartyDP/deepspeech-playground/model.py", line 125, in compile_output_fn
network_output = network_output.dimshuffle((1, 0, 2))
AttributeError: 'Tensor' object has no attribute 'dimshuffle'

from deepspeech-playground.

reith avatar reith commented on May 10, 2024

Added a description to visualize.py usage and some little helpers. If It's a pre-trained model shipped by this repo run it like:
python visualize.py --interactive --model-config pre-trained/model_25_config.json --weights-file 25-model_19336_weights.h5

from deepspeech-playground.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.