Ok so finally got a new error when trying to run pretrained model. Ubuntu 18.04, virtualenv running.
Loading model from file models/output_graph.pbmm
TensorFlow: v1.12.0-10-ge232881
DeepSpeech: v0.4.1-0-g0e40db6
Not found: models/output_graph.pbmm; No such file or directory
Traceback (most recent call last):
File “/home/ubuntu/tmp/deepspeech-venv/bin/deepspeech”, line 10, in
sys.exit(main())
File “/home/ubuntu/tmp/deepspeech-venv/lib/python3.6/site-packages/deepspeech/client.py”, line 80, in main
ds = Model(args.model, N_FEATURES, N_CONTEXT, args.alphabet, BEAM_WIDTH)
File “/home/ubuntu/tmp/deepspeech-venv/lib/python3.6/site-packages/deepspeech/init.py”, line 14, in init
raise RuntimeError(“CreateModel failed with error code {}”.format(status))
RuntimeError: CreateModel failed with error code 5
ok seems that as I was in the models directory it had a problem. Now in DeepSpeech directory and have this error:
deepspeech --model models/output_graph.pbmm --alphabet models/alphabet.txt --lm models/lm.binary --trie models/trie --audio models/five.wav
Loading model from file models/output_graph.pbmm
TensorFlow: v1.12.0-10-ge232881
DeepSpeech: v0.4.1-0-g0e40db6
2019-03-27 18:31:17.933889: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Loaded model in 0.0156s.
Loading language model from files models/lm.binary models/trie
Loaded language model in 0.229s.
Warning: original sample rate (44100) is different than 16kHz. Resampling might produce erratic speech recognition.
Traceback (most recent call last):
File “/home/ubuntu/tmp/deepspeech-venv/lib/python3.6/site-packages/deepspeech/client.py”, line 45, in convert_samplerate
output = subprocess.check_output(shlex.split(sox_cmd), stderr=subprocess.PIPE)
File “/usr/lib/python3.6/subprocess.py”, line 336, in check_output
**kwargs).stdout
File “/usr/lib/python3.6/subprocess.py”, line 403, in run
with Popen(*popenargs, **kwargs) as process:
File “/usr/lib/python3.6/subprocess.py”, line 709, in init
restore_signals, start_new_session)
File “/usr/lib/python3.6/subprocess.py”, line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘sox’: ‘sox’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/ubuntu/tmp/deepspeech-venv/bin/deepspeech”, line 10, in
sys.exit(main())
File “/home/ubuntu/tmp/deepspeech-venv/lib/python3.6/site-packages/deepspeech/client.py”, line 95, in main
fs, audio = convert_samplerate(args.audio)
File “/home/ubuntu/tmp/deepspeech-venv/lib/python3.6/site-packages/deepspeech/client.py”, line 49, in convert_samplerate
raise OSError(e.errno, ‘SoX not found, use 16kHz files or install it: {}’.format(e.strerror))
FileNotFoundError: [Errno 2] SoX not found, use 16kHz files or install it: No such file or directory: ‘sox’
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
3
Isn’t this error clear enough ? You are passing files that are not PCM 16kHz mono as documented, and you don’t have sox installed. Either install it or pass proper files.