martin-opensky / whisper-assistant-vscode

MIT License
23 stars 5 forks source link

whisper --help works but plugin says whisper not found #8

Open steve-bakos opened 2 months ago

steve-bakos commented 2 months ago

I'm on Windows 11 and when I run whisper --help from the command line, I get the expected output:

C:\Users***>whisper --help usage: whisper [-h] [--model MODEL] [--model_dir MODEL_DIR] [--device DEVICE] [--output_dir OUTPUT_DIR] [--output_format {txt,vtt,srt,tsv,json,all}] [--verbose VERBOSE] [--task {transcribe,translate}]

But when I try to use the extension in Cursor.so, I get an error saying that Whisper is not installed.

How do I go about fixing this?

nkvch commented 2 months ago

I got the same issue :(

leowalker89 commented 1 month ago

Same issue :/

skullab commented 1 month ago

same issue, I tried to debug the problem by replicating the tests

const { exec } = require("child_process");
const { promisify } = require("util");

const execAsync = promisify(exec);

async function checkIfInstalled(command) {
    try {
        await execAsync(`${command} --help`);
        return true;
    } catch (error) {
        console.log(error);
        return false;
    }
}

async function test() {
    const isSoxInstalled = await checkIfInstalled("sox");
    const isWhisperInstalled = await checkIfInstalled("whisper");
    console.log("SOX", isSoxInstalled);
    console.log("WHISPER", isWhisperInstalled);
}

test();
SOX true
WHISPER false

the error:

"UnicodeEncodeError: 'charmap' codec can't encode character '\\u3002' in position 8681: character maps to <undefined>\r\n"

In my case the exception arises from the python 'charmap' codec, but concerns the output of the 'whisper --help' command

The character is “。” (U+3002) which is found:

 --append_punctuations APPEND_PUNCTUATIONS
                        if word_timestamps is True, merge these punctuation symbols with the previous word (default:
                        "'.。,,!!??::):”)]}、)