ggerganov / whisper.cpp

Port of OpenAI's Whisper model in C/C++
MIT License
34.88k stars 3.55k forks source link

With suppress_non_speech_tokens set to true I'm still getting non speech tokens #2137

Open itsthisjustin opened 5 months ago

itsthisjustin commented 5 months ago

Transcriptions are including things such as "Music Playing" and "Bell Rings". Am I missing something silly here or does this param just not work? Using the Swift package fyi

KTibow commented 1 month ago

only these are suppressed

static const std::vector<std::string> non_speech_tokens = {
    "\"", "#", "(", ")", "*", "+", "/", ":", ";", "<", "=", ">", "@", "[", "\\", "]", "^",
    "_", "`", "{", "|", "}", "~", "「", "」", "『", "』", "<<", ">>", "<<<", ">>>", "--",
    "---", "-(", "-[", "('", "(\"", "((", "))", "(((", ")))", "[[", "]]", "{{", "}}", "♪♪",
    "♪♪♪","♩", "♪", "♫", "♬", "♭", "♮", "♯"
};