How do I use a parameter like initial_prompt in Python's Whisper?
xiangliangX opened this issue · comments
How do I use a parameter like initial_prompt in Python's Whisper?
Best way to do this is to use the promptTokens
parameter in DecodingOptions
. This will add whatever tokens you pass into the <|startofprev|>
section of the prompt that is passed into the decoder and can help with spelling and punctuation style, but keep in mind this is not like a LLM prompt, it should purely be used as an example of the style and spelling of output you're looking for. Check out these test cases for how you might be able to implement it in your code:
WhisperKit/Tests/WhisperKitTests/UnitTests.swift
Lines 730 to 759 in 3bab206