savbell / whisper-writer

💬📝 A small dictation app using OpenAI's Whisper speech recognition model.
GNU General Public License v3.0
244 stars 40 forks source link

initial_prompt doesn't seem to be working #18

Closed felixlu07 closed 6 months ago

felixlu07 commented 6 months ago

I tried setting the initial_prompt to condition the output from the whisper-1 API but it seems like the whatever that is set in the config file is not influencing the output that is returned from the API. I even tried explicitly to test by saying "insert HELLO in front of in every sentence", but it doesn't seem to be working. Is there any additional configuration that is required, or am I missing something?

savbell commented 6 months ago

Hi there,

The initial prompt for OpenAI's Whisper model is different than prompts for its other models such as GPT. It wasn't trained to follow instructions, so in this case a prompt is actually some sample text that is written in the same style that you would like the outputted text to be in. Here is the official documentation that includes some examples. If you wanted to give it more explicit instructions, you can do some post-processing using the GPT models.

I hope this helps! :)

felixlu07 commented 6 months ago

Wow, that was really useful to know anyway! That really saved me a lot of effort in correcting some of the commonly used phrases, but it is incorrectly typed out by WhisperWriter. So thanks for that. Cheers @savbell !