Comments (5)
Hi @cmosboss, could you share your solutions for your query if you have solved them already? I have the same doubt.
from whisperx.
To do this, you have to create a dictionary of args and pass it to the transcribe function
from whisperx.
Apologies for my basic brain but could anyone kindly provide a basic code example of how to call transcribe including temperature and prompt?
Apologies for my basic brain but could you please provide a basic code example of how to call transcribe including temperature and prompt?
Much appreciated.
from whisperx.
For example:
asr_options = {
"beam_size": 5,
"patience": 1.0,
"length_penalty": 1.0,
"temperatures": tuple(np.arange(0, 1.0 + 1e-6, 0.2)),
"compression_ratio_threshold": 2.4,
"log_prob_threshold": 1.0,
"no_speech_threshold": 0.6,
"condition_on_previous_text": False,
"initial_prompt": None,
"suppress_tokens": -1,
# "suppress_numerals": args.pop("suppress_numerals"),
}
model = whisperx.load_model(p_model, device=p_device, language=p_language, compute_type=p_compute_type,
asr_options=asr_options, vad_options={"vad_onset": 0.500, "vad_offset": 0.363})
from whisperx.
Looks like not all arguments are supported. e.g., I can't seem to get threads
to work:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[19], line 78
73 # 1. Transcribe with original whisper (batched)
74 # model = whisperx.load_model("large-v2", device, compute_type=compute_type)
75
76 # save model to local path (optional)
77 model_dir = "/Users/xhauch/.cache/whisper/"
---> 78 model = whisperx.load_model(modelstr, device, compute_type=compute_type, download_root=model_dir, asr_options=asr_options, vad_options=vad_options, language=language)
80 audio = whisperx.load_audio(audio_file)
81 result = model.transcribe(audio, batch_size=batch_size)
File /opt/anaconda3/envs/whisperx/lib/python3.10/site-packages/whisperx/asr.py:334, in load_model(whisper_arch, device, device_index, compute_type, asr_options, language, vad_model, vad_options, model, task, download_root, threads)
331 suppress_numerals = default_asr_options["suppress_numerals"]
332 del default_asr_options["suppress_numerals"]
--> 334 default_asr_options = faster_whisper.transcribe.TranscriptionOptions(**default_asr_options)
336 default_vad_options = {
337 "vad_onset": 0.500,
338 "vad_offset": 0.363
339 }
341 if vad_options is not None:
TypeError: TranscriptionOptions.__new__() got an unexpected keyword argument 'threads'
Is that correct or am I doing something wrong?
from whisperx.
Related Issues (20)
- English Translation in whisperx has much better result than original transcription
- how can i close Vad?
- some not-default language alignments are downloaded, some throw error
- AttributeError: partially initialized module 'whisperx' has no attribute 'load_model' (most likely due to a circular import) HOT 2
- Allow Repetition HOT 1
- Could I Add Timestamps to My Text by WhisperX? HOT 2
- How to achieve known text content and obtain the timestamp of the text corresponding to the audio HOT 2
- How to use a fine-tuned segmentation model for diarization? HOT 3
- Use whisperx and pyannote in Colab without HuggingFace token HOT 1
- How to run Whisper X in Colab? HOT 4
- Bulk Processing HOT 1
- OAI Whisper transcribes correctly but whisperx returns `No active speech found in audio` HOT 6
- Speaker Diarization for bilingual speech
- how to change max_new_tokens (parameter) of whisper
- ValueError: Requested float16 compute type, but the target device or backend do not support efficient float16 computation.
- WhisperX return translated output instead of normal transcription
- Unable to run the whisperx with the installation steps provided in repository HOT 1
- whisperX witout internet access HOT 2
- how to use whsperx with hugging face pipeline
- OSError: undefined symbol: _ZN2at4_ops10zeros... HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whisperx.