collabora / WhisperLive

A nearly-live implementation of OpenAI's Whisper.
MIT License
1.85k stars 249 forks source link

tensorRT whisper is not working on multilingual!! (I'm korean) #155

Closed ssifood closed 7 months ago

ssifood commented 7 months ago

anyone is there Who working on TensorRT whisper on multinugal?

i do try multiple on smal/medium/large-v3 model.

but all model is printing on english output.

please help me~!!!@

server root@9a18589c6385:/home/WhisperLive# python3 run_server.py -p 9090 -b tensorrt -trt /root/TensorRT-LLM-examples/whisper/whisper_medium -m

# client audio_file_path = "C:/archive1/develop/test_audio/06_01_104204_220818_0003_NV_cut30.wav" host="172.16.40.220" port = 9099 lang = "ko" model ="medium" #"large-v3"

from whisper_live.client import TranscriptionClient client = TranscriptionClient( host, port, lang=lang, translate=False, model=model, use_vad=False, )

client(audio_file_path)

ssifood commented 7 months ago

i think

we must to this


wget --directory-prefix=assets https://raw.githubusercontent.com/openai/whisper/main/whisper/assets/multilingual.tiktoken

tokenizer.py 
vocab_path catch teh that multiliugual.tiktoken!!!!

@lru_cache(maxsize=None)
def get_encoding(name: str = "gpt2"):
    vocab_path = os.path.join(os.path.dirname(__file__), "assets", f"{name}.tiktoken")
makaveli10 commented 7 months ago

@ssifood thanks for pointing this out we are looking into this. we will update here with the fix.