some error

#2
by mbh0609 - opened

When using speechbrain, i met this error and i can't find the file "custum.py" in this rope. Please reply me what should i do, thanks!

TypeError: ('Invalid argument to class speechbrain.decoders.S2SRNNBeamSearcher', "init() got an unexpected keyword argument 'ctc_linear'")

What solved it for me was using it through github and making custom changes.

git clone https://github.com/speechbrain/speechbrain.git
cd speechbrain
pip install -r requirements.txt
pip install --editable .

After this, I added the following lines in the definition of S2SRNNBeamSearcher at https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/decoders/seq2seq.py#L1433

        # Define a set of arguments to ignore
        ignore_args = {'ctc_linear', 'blank_index', 'coverage_penalty', 'ctc_weight'}
        # Filter out ignored arguments from kwargs
        filtered_kwargs = {key: value for key, value in kwargs.items() if key not in ignore_args}

        super(S2SRNNBeamSearcher, self).__init__(**filtered_kwargs)

Sign up or log in to comment