Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved: TypeError: TranscriptionOptions.__new__() got an unexpected keyword argument 'max_new_tokens' #711

Closed
longdaothanh opened this issue Feb 22, 2024 · 13 comments

Comments

@longdaothanh
Copy link

longdaothanh commented Feb 22, 2024

TypeError: TranscriptionOptions.new() got an unexpected keyword argument 'max_new_tokens'

Anyone has an idea how to fix this or has similar issues?

Problem Solved:
Change faster-whisper~=0.10.0 in requirements.txt to the newest version 1.0.0 then install -> working

@longdaothanh longdaothanh changed the title suppress_numerals error TypeError: TranscriptionOptions.__new__() got an unexpected keyword argument 'max_new_tokens' Feb 22, 2024
@longdaothanh
Copy link
Author

Screenshot 2024-02-22 190759

@SobolevskyDmitry
Copy link

Seems new faster-whisper broke it
https://github.com/SYSTRAN/faster-whisper/releases

For me faster-whisper-0.10.0 worked fine, but today I got the same error as you and checked my deps and found a new version: faster-whisper-0.10.1

@SobolevskyDmitry
Copy link

I'm wondering would WhisperX work with https://github.com/SYSTRAN/faster-whisper/releases/tag/v1.0.0 ?

@longdaothanh
Copy link
Author

longdaothanh commented Feb 22, 2024

Hi, I just solved the problem

I'm wondering would WhisperX work with https://github.com/SYSTRAN/faster-whisper/releases/tag/v1.0.0 ?

Yes, I just tried and it worked perfect now.

Problem Solved:
Change faster-whisper~=0.10.0 in requirements.txt to the newest version 1.0.0 then install -> working

@longdaothanh longdaothanh changed the title TypeError: TranscriptionOptions.__new__() got an unexpected keyword argument 'max_new_tokens' Solved: TypeError: TranscriptionOptions.__new__() got an unexpected keyword argument 'max_new_tokens' Feb 22, 2024
@msfuko
Copy link

msfuko commented Feb 22, 2024

Hi, how do you override the faster-whisper from git+https://github.com/m-bain/whisperx.git@d6562c26da467ca49866a4173c0e723f3837f367? or do you fork it?

@davidmartinrius
Copy link
Contributor

Hi, how do you override the faster-whisper from git+https://github.com/m-bain/whisperx.git@d6562c26da467ca49866a4173c0e723f3837f367? or do you fork it?

after installing whisperx you can do this:

pip install --upgrade faster-whisper==1.0.0

@longdaothanh
Copy link
Author

Hi, how do you override the faster-whisper from git+https://github.com/m-bain/whisperx.git@d6562c26da467ca49866a4173c0e723f3837f367? or do you fork it?

Hi, you can modify, clone and install in editable mode using the instruction like in Readme.txt:
git clone https://github.com/m-bain/whisperX.git
clone the whisperX repository and make change to the requirement.txt then install whisperx locally
pip install -e <WhisperX path>

@sushk0841
Copy link


TypeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 model = whisperx.load_model("large-v2", device, compute_type=compute_type)

/usr/local/lib/python3.10/dist-packages/whisperx/asr.py in load_model(whisper_arch, device, device_index, compute_type, asr_options, language, vad_model_fp, vad_options, model, task, download_root, threads)
330 del default_asr_options["suppress_numerals"]
331
--> 332 default_asr_options = faster_whisper.transcribe.TranscriptionOptions(**default_asr_options)
333
334 default_vad_options = {

TypeError: TranscriptionOptions.new() missing 3 required positional arguments: 'max_new_tokens', 'clip_timestamps', and 'hallucination_silence_threshold' i am still gettting this error after upgrading faster-whisper to 1.0.0
is there any solution?

@longdaothanh
Copy link
Author

TypeError Traceback (most recent call last) in <cell line: 1>() ----> 1 model = whisperx.load_model("large-v2", device, compute_type=compute_type)

/usr/local/lib/python3.10/dist-packages/whisperx/asr.py in load_model(whisper_arch, device, device_index, compute_type, asr_options, language, vad_model_fp, vad_options, model, task, download_root, threads) 330 del default_asr_options["suppress_numerals"] 331 --> 332 default_asr_options = faster_whisper.transcribe.TranscriptionOptions(**default_asr_options) 333 334 default_vad_options = {

TypeError: TranscriptionOptions.new() missing 3 required positional arguments: 'max_new_tokens', 'clip_timestamps', and 'hallucination_silence_threshold' i am still gettting this error after upgrading faster-whisper to 1.0.0 is there any solution?

I just tried to install it on colab and it ran so I don't know why you still had that problem

@davidmartinrius
Copy link
Contributor

TypeError Traceback (most recent call last) in <cell line: 1>() ----> 1 model = whisperx.load_model("large-v2", device, compute_type=compute_type)

/usr/local/lib/python3.10/dist-packages/whisperx/asr.py in load_model(whisper_arch, device, device_index, compute_type, asr_options, language, vad_model_fp, vad_options, model, task, download_root, threads) 330 del default_asr_options["suppress_numerals"] 331 --> 332 default_asr_options = faster_whisper.transcribe.TranscriptionOptions(**default_asr_options) 333 334 default_vad_options = {

TypeError: TranscriptionOptions.new() missing 3 required positional arguments: 'max_new_tokens', 'clip_timestamps', and 'hallucination_silence_threshold' i am still gettting this error after upgrading faster-whisper to 1.0.0 is there any solution?

Hi @sushk0841 ,

This way is working for my now:

pip install whisperx==3.1.1
pip install --upgrade faster-whisper==0.10.1

I still haven't tried what @longdaothanh said

@davidmartinrius
Copy link
Contributor

davidmartinrius commented Feb 29, 2024

Update 2:
Don't take into account the latest update. It has been fixed in the latest version.

Update:
In addition to the above you will also have tu downgrade speechbrain:

pip install -U speechbrain==0.5.16

Because of this #723

@grzegorz700
Copy link

For me, the latest working version of WhisperX, with the capability of using Cuda 11.8 is:
pip install git+https://github.com/m-bain/whisperx.git@8227807fa9e076901ea4b4fbbf79c9777a6f5e03 --no-deps
And install whisperX requirements with replacement to
faster-whisper @ git+https://github.com/SYSTRAN/[email protected]
The change is connected with ?replacement tag from 0.10.0 to v0.10.0 .

@deep-pipeline
Copy link

@longdaothanh are you satisfied this issue has now been solved? if so, could you close it please. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants