Spaces:
Running
on
A10G
Cannot run mms_infer.py for transcription
Hello MMS,
When run mms_infer.py, got issue like that:
(base) zhang@local-gpu:~/fairseq$ python examples/mms/asr/infer/mms_infer.py --model ../mms1b_fl102.pt --lang "cmn-script_simplified" --audio ../17_IOS33_000.wav
">>>preparing tmp manifest dir ...
">>>loading model & running inference ...
Traceback (most recent call last):
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1323, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/checkpoint/zhang/INFER/None'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1323, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/checkpoint/zhang/INFER'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1323, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/checkpoint/zhang'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zhang/fairseq/examples/speech_recognition/new/infer.py", line 499, in
cli_main()
File "/home/zhang/fairseq/examples/speech_recognition/new/infer.py", line 495, in cli_main
hydra_main() # pylint: disable=no-value-for-parameter
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/main.py", line 32, in decorated_main
_run_hydra(
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 354, in _run_hydra
run_and_report(
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 201, in run_and_report
raise ex
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 198, in run_and_report
return func()
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 355, in
lambda: hydra.multirun(
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 136, in multirun
return sweeper.sweep(arguments=task_overrides)
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/_internal/core_plugins/basic_sweeper.py", line 140, in sweep
sweep_dir.mkdir(parents=True, exist_ok=True)
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1327, in mkdir
self.parent.mkdir(parents=True, exist_ok=True)
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1327, in mkdir
self.parent.mkdir(parents=True, exist_ok=True)
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1327, in mkdir
self.parent.mkdir(parents=True, exist_ok=True)
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1323, in mkdir
self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/checkpoint'
Traceback (most recent call last):
File "/home/zhang/fairseq/examples/mms/asr/infer/mms_infer.py", line 63, in
process(args)
File "/home/zhang/fairseq/examples/mms/asr/infer/mms_infer.py", line 53, in process
with open(tmpdir/"hypo.word") as fr:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpnf499w7t/hypo.word'
What happened ? Who can tell me how to do next ?
i find this below comment in Github fix the issues
To fix this issue, add open(tmpdir/"hypo.word", 'w').close() before the line 48 in "fairseq\examples\mms\asr\infer\mms_infer.py"
i find this below comment in Github fix the issues
To fix this issue, add open(tmpdir/"hypo.word", 'w').close() before the line 48 in "fairseq\examples\mms\asr\infer\mms_infer.py"
Thanks, after that, "FileNotFoundError" disappeared.
However, i still don't get the transcription, "hypo.word" with 0KB size and program finished without any error message.
Is there something wrong with me?
FYI: You can have a look at https://k2-fsa.github.io/sherpa/onnx/tts/mms.html
sherpa-onnx supports running MMS-TTS models on Android, iOS, Raspberry Pi, etc.