Wav2letter: problem running 'simple straming ASR using docker"

Created on 13 Dec 2020  ·  5Comments  ·  Source: flashlight/wav2letter

I was trying to run a 'simple straming ASR using docker" present here https://github.com/facebookresearch/wav2letter/wiki/Inference-Run-Examples#Quickly-run-Streaming-ASR-Examples-using-Docker

Command:

sudo docker run --rm -v ~:/root/host/ -it --ipc=host --name w2l -a stdin -a stdout -a stderr wav2letter/wav2letter:inference-latest sh -c "cat /root/host/audio/LibriSpeech/dev-clean/777/126732/777-126732-0070.flac.wav | /root/wav2letter/build/inference/inference/examples/simple_streaming_asr_example --input_files_base_path /root/host/model"

I am getting this error,

cat: /root/host/audio/LibriSpeech/dev-clean/777/126732/777-126732-0070.flac.wav: No such file or directory
Started features model file loading ...
terminate called after throwing an instance of 'std::runtime_error'
what(): failed to open feature file=/root/host/model/feature_extractor.bin for reading
Aborted (core dumped)

what should be done?

bug

All 5 comments

@bmblr497: Have you downloaded the models locally on the host? If so, you will have to mount the host directory to docker such that they are present in /root/host/model.

@abhinavkulkarni I don't find anymore the docker examples in the wiki:

https://github.com/facebookresearch/wav2letter/wiki/Inference-Run-Examples#Quickly-run-Streaming-ASR-Examples-using-Docker

Could you please point me to the right examples?

Thank you!

@abhinavkulkarni, @tlikhomanenko
Hi!
I experienced the same problem. For me, it seems like files from the example were moved to another location (or link is broken, or files deleted) since I get the following errors while trying to download them (see shell output below: all attempts return 403 code).

And one more question: how can I create such files as feature_extractor.bin for the non-English language? Or maybe there is a much easier way of running inference for the models trained with [email protected] codebase?

```
$ for f in decoder_options.json feature_extractor.bin language_model.bin ; do wget http://dl.fbaipublicfiles.com/wav2letter/inference/examples/model/${f} ; done

--2021-02-25 16:07:42-- http://dl.fbaipublicfiles.com/wav2letter/inference/examples/model/$%7Bf%7D
Распознаётся dl.fbaipublicfiles.com (dl.fbaipublicfiles.com)… 172.67.9.4, 104.22.75.142, 104.22.74.142, ...
Подключение к dl.fbaipublicfiles.com (dl.fbaipublicfiles.com)|172.67.9.4|:80... соединение установлено.
HTTP-запрос отправлен. Ожидание ответа… 403 Forbidden
2021-02-25 16:07:43 ОШИБКА 403: Forbidden.

--2021-02-25 16:07:43-- http://dl.fbaipublicfiles.com/wav2letter/inference/examples/model/$%7Bf%7D
Распознаётся dl.fbaipublicfiles.com (dl.fbaipublicfiles.com)… 104.22.74.142, 104.22.75.142, 172.67.9.4, ...
Подключение к dl.fbaipublicfiles.com (dl.fbaipublicfiles.com)|104.22.74.142|:80... соединение установлено.
HTTP-запрос отправлен. Ожидание ответа… 403 Forbidden
2021-02-25 16:07:44 ОШИБКА 403: Forbidden.

--2021-02-25 16:07:44-- http://dl.fbaipublicfiles.com/wav2letter/inference/examples/model/$%7Bf%7D
Распознаётся dl.fbaipublicfiles.com (dl.fbaipublicfiles.com)… 104.22.74.142, 104.22.75.142, 172.67.9.4, ...
Подключение к dl.fbaipublicfiles.com (dl.fbaipublicfiles.com)|104.22.74.142|:80... соединение установлено.
HTTP-запрос отправлен. Ожидание ответа… 403 Forbidden
2021-02-25 16:07:44 ОШИБКА 403: Forbidden.```

@loretoparisi

I think here is the proper link you was looking for

@abhinavkulkarni, @tlikhomanenko
Hi!
I experienced the same problem. For me, it seems like files from the example were moved to another location (or link is broken, or files deleted) since I get the following errors while trying to download them (see shell output below: all attempts return 403 code).

And one more question: how can I create such files as feature_extractor.bin for the non-English language? Or maybe there is a much easier way of running inference for the models trained with [email protected] codebase?

$ for f in decoder_options.json feature_extractor.bin language_model.bin ; do wget http://dl.fbaipublicfiles.com/wav2letter/inference/examples/model/$\{f\} ; done 

--2021-02-25 16:07:42--  http://dl.fbaipublicfiles.com/wav2letter/inference/examples/model/$%7Bf%7D
Распознаётся dl.fbaipublicfiles.com (dl.fbaipublicfiles.com)… 172.67.9.4, 104.22.75.142, 104.22.74.142, ...
Подключение к dl.fbaipublicfiles.com (dl.fbaipublicfiles.com)|172.67.9.4|:80... соединение установлено.
HTTP-запрос отправлен. Ожидание ответа… 403 Forbidden
2021-02-25 16:07:43 ОШИБКА 403: Forbidden.

--2021-02-25 16:07:43--  http://dl.fbaipublicfiles.com/wav2letter/inference/examples/model/$%7Bf%7D
Распознаётся dl.fbaipublicfiles.com (dl.fbaipublicfiles.com)… 104.22.74.142, 104.22.75.142, 172.67.9.4, ...
Подключение к dl.fbaipublicfiles.com (dl.fbaipublicfiles.com)|104.22.74.142|:80... соединение установлено.
HTTP-запрос отправлен. Ожидание ответа… 403 Forbidden
2021-02-25 16:07:44 ОШИБКА 403: Forbidden.

--2021-02-25 16:07:44--  http://dl.fbaipublicfiles.com/wav2letter/inference/examples/model/$%7Bf%7D
Распознаётся dl.fbaipublicfiles.com (dl.fbaipublicfiles.com)… 104.22.74.142, 104.22.75.142, 172.67.9.4, ...
Подключение к dl.fbaipublicfiles.com (dl.fbaipublicfiles.com)|104.22.74.142|:80... соединение установлено.
HTTP-запрос отправлен. Ожидание ответа… 403 Forbidden
2021-02-25 16:07:44 ОШИБКА 403: Forbidden.```

I see these files

$ aws s3 ls s3://dl.fbaipublicfiles.com/wav2letter/inference/examples/model/
2020-01-16 08:25:13  265637687 acoustic_model.bin
2020-01-16 08:29:33        231 decoder_options.json
2020-01-16 08:29:35        130 feature_extractor.bin
2020-01-16 08:29:36  365465758 language_model.bin
2020-01-16 08:33:28    4101080 lexicon.txt
2020-01-16 08:33:38        652 tds_streaming.arch
2020-01-16 08:33:39      82984 tokens.txt

So for me wget dl.fbaipublicfiles.com/wav2letter/inference/examples/model/acoustic_model.bin works.

Seems your bash is a bit weird.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kamakshi-malhotra picture kamakshi-malhotra  ·  5Comments

AvielNiego picture AvielNiego  ·  6Comments

ekorudi picture ekorudi  ·  5Comments

EdwinWenink picture EdwinWenink  ·  4Comments

ghost picture ghost  ·  5Comments