GithubHelp home page GithubHelp logo

Comments (2)

JuanPZuluaga avatar JuanPZuluaga commented on July 20, 2024 1

Hi, I think something like this would work:

        model = whisperx.load_model(
            asr_options={
                "suppress_numerals": True,
                "repetition_penalty": 1.5
            },
            task="transcribe",
        )

from whisperx.

dgoryeo avatar dgoryeo commented on July 20, 2024

Thanks @JuanPZuluaga .
When I use the asr_options I get this unexpected error. Would you have any insight in that:

whisperx\utils.py", line 285, in iterate_result
    if result["language"] in LANGUAGES_WITHOUT_SPACES:
KeyError: 'language'

I have no idea how to work around that. I have supplied the language argument:

    model = whisperx.load_model("large-v2", 
                                    device, 
                                    compute_type=compute_type,
                                    asr_options={
                                        "beam_size": 10,
                                        "best_of": 10,
                                        "patience": 3,
                                        "length_penalty": 1,
                                        "repetition_penalty": 1.5,
                                        "no_repeat_ngram_size": 2,
                                        "temperatures": [0.0, 0.2],
                                        "compression_ratio_threshold": 2.4,
                                        "log_prob_threshold": -1.0,
                                        "no_speech_threshold": 0.6,
                                        "condition_on_previous_text": False,
                                        "prompt_reset_on_temperature": 0.5,
                                        "initial_prompt": None,
                                        "prefix": None,
                                        "suppress_blank": True,
                                        "suppress_tokens": [-1],
                                        "without_timestamps": True,
                                        "max_initial_timestamp": 0.0,
                                        "word_timestamps": False,
                                        "prepend_punctuations": "\"'“¿([{-",
                                        "append_punctuations": "\"'.。,,!!??::”)]}、",
                                        "suppress_numerals": False,
                                    },
                                    language="ja",
                                    task="translate",
                                )

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.