Closed Mars1993Earth closed 4 months ago
m4a to wav
MarsLau @.***> 于2024年5月21日周二 09:42写道:
Describe the bug Traceback (most recent call last): File "/opt/homebrew/bin/wenet", line 8, in sys.exit(main()) ^^^^^^ File "/Users/mars/wenet/wenet/cli/transcribe.py", line 77, in main result = model.transcribe(args.audio_file, args.show_tokens_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mars/wenet/wenet/cli/model.py", line 132, in transcribe return self._decode(audio_file, tokens_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/Users/mars/wenet/wenet/cli/model.py", line 81, in _decode feats = self.compute_feats(audio_file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mars/wenet/wenet/cli/model.py", line 61, in compute_feats waveform, sample_rate = torchaudio.load(audio_file, normalize=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.12/site-packages/torchaudio/_backend/utils.py", line 205, in load return backend.load(uri, frame_offset, num_frames, normalize, channels_first, format, buffer_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.12/site-packages/torchaudio/_backend/soundfile.py", line 27, in load return soundfile_backend.load(uri, frame_offset, num_frames, normalize, channels_first, format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.12/site-packages/torchaudio/ backend/soundfile_backend.py", line 221, in load with soundfile.SoundFile(filepath, "r") as file: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.12/site-packages/soundfile.py", line 658, in init self._file = self._open(file, mode_int, closefd) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.12/site-packages/soundfile.py", line 1216, in _open raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name )) soundfile.LibsndfileError: Error opening '20240520_133903.m4a': Format not recognised.
环境: Python 3.12.3
— Reply to this email directly, view it on GitHub https://github.com/wenet-e2e/wenet/issues/2535, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFN3Q5TXYW5XS2ROCI2SNTZDKQ6VAVCNFSM6AAAAABIAVLJLWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYDOMBYG4ZDMMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Describe the bug Traceback (most recent call last): File "/opt/homebrew/bin/wenet", line 8, in
sys.exit(main())
^^^^^^
File "/Users/mars/wenet/wenet/cli/transcribe.py", line 77, in main
result = model.transcribe(args.audio_file, args.show_tokens_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mars/wenet/wenet/cli/model.py", line 132, in transcribe
return self._decode(audio_file, tokens_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/mars/wenet/wenet/cli/model.py", line 81, in _decode
feats = self.compute_feats(audio_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mars/wenet/wenet/cli/model.py", line 61, in compute_feats
waveform, sample_rate = torchaudio.load(audio_file, normalize=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/torchaudio/_backend/utils.py", line 205, in load
return backend.load(uri, frame_offset, num_frames, normalize, channels_first, format, buffer_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/torchaudio/_backend/soundfile.py", line 27, in load
return soundfile_backend.load(uri, frame_offset, num_frames, normalize, channels_first, format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/torchaudio/_backend/soundfilebackend.py", line 221, in load
with soundfile.SoundFile(filepath, "r") as file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/soundfile.py", line 658, in init
self._file = self._open(file, mode_int, closefd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/soundfile.py", line 1216, in _open
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening '20240520_133903.m4a': Format not recognised.
环境: Python 3.12.3