Skip to content

ERROR during transcription: cannot reshape tensor of 0 elements into shape [-1, 0] because the unspecified dimension size -1 can be any value and is ambiguous #43

@olegkirianov

Description

@olegkirianov

Hello, getting this error for some audio files. Most files are processed fine, but some cause this issue:

ERROR during transcription: cannot reshape tensor of 0 elements into shape [-1, 0] because the unspecified dimension size -1 can be any value and is ambiguous

File "/home/kiryanovoa/GigaAM/gigaam/preprocess.py", line 86, in forward
return self.featurizer(input_signal), self.out_len(length)
File "/home/kiryanovoa/GigaAM/gigaam/model.py", line 33, in forward
features, feature_lengths = self.preprocessor(features, feature_lengths)
File "/home/kiryanovoa/GigaAM/gigaam/model.py", line 159, in transcribe_longform
encoded, encoded_len = self.forward(wav, length)
File "/home/kiryanovoa/recognizer/transcribe.py", line 56, in transcribe_channels
result2 = model.transcribe_longform(channel_files[1])
File "/home/kiryanovoa/recognizer/transcribe.py", line 79, in transcribe_audio
transcription = transcribe_channels(channel_files)
File "/home/kiryanovoa/recognizer/test.py", line 10, in
transcription = transcribe_audio(file_location)
RuntimeError: cannot reshape tensor of 0 elements into shape [-1, 0] because the unspecified dimension size -1 can be any value and is ambiguous

Environment:
Python 3.10.12
NumPy: 2.2.6
Torch: 2.5.1+cu124
Torchaudio: 2.5.1+cu124
Onnx: 1.17.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions