rolczynski / Automatic-Speech-Recognition

🎧 Automatic Speech Recognition: DeepSpeech & Seq2Seq (TensorFlow)
GNU Affero General Public License v3.0
223 stars 64 forks source link

what's the correct data format? #19

Closed judgelight closed 4 years ago

judgelight commented 4 years ago

I run your code on Common Voice dataset but got this problem. `--------------------------------------------------------------------------- ValueError Traceback (most recent call last) /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/op_def_library.py in _apply_op_helper(op_type_name, name, **keywords) 467 as_ref=input_arg.is_ref, --> 468 preferred_dtype=default_dtype) 469 except TypeError as err:

22 frames ValueError: Tensor conversion requested dtype float16 for Tensor with dtype float32: <tf.Tensor 'loss/dense_2_loss/ctc_loss_dense/ExpandDims:0' shape=(1, None, None, 29) dtype=float32>

During handling of the above exception, another exception occurred:

TypeError Traceback (most recent call last) /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/op_def_library.py in _apply_op_helper(op_type_name, name, **keywords) 502 "%s type %s of argument '%s'." % 503 (prefix, dtypes.as_dtype(attrs[input_arg.type_attr]).name, --> 504 inferred_from[input_arg.type_attr])) 505 506 types = [values.dtype]

TypeError: Input 'y' of 'Mul' Op has type float32 that does not match type float16 of argument 'x'.`

The csv file is like this:

filename, text up_votes, down_votes, age gender, accent, duration 0 cv-other-train/sample-000000.mp3, he had to spit some tobacco out of his mouth, 0, 0, seventies male, england, NaN 1 cv-other-train/sample-000001.mp3, it took her a while to get used to it, 1, 1, twenties, male, scotland, NaN 2 cv-other-train/sample-000002.mp3, you will need some rubber boots, 0, 0, NaN, NaN, NaN, NaN 3 cv-other-train/sample-000003.mp3, you can speak a label to click on an element, 0, 0, fourties, male, us, NaN 4 cv-other-train/sample-000004.mp3, the priest collapsed backwards, 0, 0, NaN, NaN, NaN, NaN

Can you show me your training data sample? what's the correct data format?

rolczynski commented 4 years ago

Take a look at the error log: TypeError: Input 'y' of 'Mul' Op has type float32 that does not match type float16 of argument 'x'. What do you need to do? ;)