openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

[Audio.transcribe] Prompt parameter appears to have no effect

Open nt294 opened this issue 1 year ago • 1 comments

Describe the bug

I am attempting to transcribe a file with an accompanying prompt, however it appears to have no effect at all on the output.

This is a sample of the code:

prompt = "This is a recording of a conversation between 4 people, please present it in the following format: 'Person 1: Thanks for coming today Person 2: No problem', etc." audio_file = open("/path/to/file.WAV", "rb") transcript = openai.Audio.transcribe("whisper-1", audio_file, prompt=prompt) print(transcript)

The returned text is exactly the same with or without the prompt parameter.

To Reproduce

Send a transcription request with a prompt parameter

Code snippets

No response

OS

macOs

Python version

Python v3.7.1

Library version

OpenAI Python v0.27.0

nt294 avatar Mar 02 '23 19:03 nt294

My understanding is that the prompting system for Whisper is much more limited compared to our other language model prompting. I am confirming with the team if this use case would work or not.

logankilpatrick avatar Mar 03 '23 16:03 logankilpatrick

Pushing an update soon, the general guidance is that prompting with whisper is not super powerful, thus you likely cannot get the format you are looking for here. In general though, the best way to prompt is with actual examples, so instead of "this is a recording of a conversation between 4 people, please present it in the following format:", just have the prompt be a straight transcript of the audio you want in the form you want. Let me know if you are still having issues beyond that!

logankilpatrick avatar Mar 03 '23 18:03 logankilpatrick

prompt="Transcribe the audio AS IS, PRESERVE ALL WORDS INCLUDING Um, Uh, Like, etc") worked for me. Need to be forceful otherwise it won't listen to you.

Siddhartha90 avatar Oct 26 '23 00:10 Siddhartha90