mesolitica / malaya-speech

Speech Toolkit for Malaysian language, https://malaya-speech.readthedocs.io/
https://malaya-speech.readthedocs.io/
MIT License
240 stars 42 forks source link

Issue with large-conformer #11

Closed Anuj040 closed 3 years ago

Anuj040 commented 3 years ago

Trying to work with large-conformer throws an error.

large_model = malaya_speech.stt.deep_transducer(model = 'large-conformer')
2021-11-10 13:32:17.823170: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
downloading frozen model to /Users/anuj/Malaya-Speech/speech-to-text-transducer/large-conformer/model.pb
 23%|██████████████████████████▎                                                                                        | 88.0/385 [02:39<08:59, 1.82s/MB]
downloading frozen vocab to /Users/anuj/Malaya-Speech/speech-to-text-transducer/large-conformer/transducer.subword.subwords
1.00MB [00:00, 298MB/s]                                                                                                                                   
Traceback (most recent call last):
  File "/Users/anuj/Desktop/Work/projects_2021/toy8/malay_stt/.venv/lib/python3.6/site-packages/malaya_boilerplate/frozen_graph.py", line 279, in load_graph
    graph_def.ParseFromString(f.read())
google.protobuf.message.DecodeError: Error parsing message with type 'tensorflow.GraphDef'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "malay_stt/test.py", line 11, in <module>
    files = glob.glob(os.path.join(files_path, "*/*.wav"), recursive=True)
  File "/Users/anuj/Desktop/Work/projects_2021/toy8/malay_stt/.venv/lib/python3.6/site-packages/herpetologist/__init__.py", line 100, in check
    return func(*args, **kwargs)
  File "/Users/anuj/Desktop/Work/projects_2021/toy8/malay_stt/.venv/lib/python3.6/site-packages/malaya_speech/stt.py", line 249, in deep_transducer
    **kwargs
  File "/Users/anuj/Desktop/Work/projects_2021/toy8/malay_stt/.venv/lib/python3.6/site-packages/malaya_speech/supervised/stt.py", line 33, in transducer_load
    g = load_graph(path['model'], **kwargs)
  File "/Users/anuj/Desktop/Work/projects_2021/toy8/malay_stt/.venv/lib/python3.6/site-packages/malaya_speech/utils/__init__.py", line 35, in load_graph
    return frozen_graph.load_graph(package, frozen_graph_filename, **kwargs)
  File "/Users/anuj/Desktop/Work/projects_2021/toy8/malay_stt/.venv/lib/python3.6/site-packages/malaya_boilerplate/frozen_graph.py", line 282, in load_graph
    f"{e}, file corrupted due to some reasons, please run `{package.replace('-', '_')}.utils.delete_cache('{path}')` and try again"
Exception: Error parsing message with type 'tensorflow.GraphDef', file corrupted due to some reasons, please run `malaya_speech.utils.delete_cache('speech-to-text-transducer/large-conformer')` and try again

Tested Versions: 1.1.3, 1.2