GithubHelp home page GithubHelp logo

Comments (5)

edwarddennispraveen avatar edwarddennispraveen commented on August 15, 2024 1

Hi @cmosboss, could you share your solutions for your query if you have solved them already? I have the same doubt.

from whisperx.

arnavmehta7 avatar arnavmehta7 commented on August 15, 2024 1

To do this, you have to create a dictionary of args and pass it to the transcribe function

from whisperx.

troublesprouter avatar troublesprouter commented on August 15, 2024

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.

caryknoop avatar caryknoop commented on August 15, 2024

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.

tophee avatar tophee commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.