I’m sorry, but your question and what application role and purpose you are trying to fulfill are quite hard to decipher.
What is counting words?
What is taking a prompt?
How is Whisper counting words for you?
If you are trying to ask an AI “how many words”, or “at which word number does each sentence end”, it will likely fail, due to tokenization and other factors regarding language prediction.
AI deciphering by GPT-4.5, still wants clarity
Let’s carefully break down the user’s message step-by-step to clearly understand their concerns and needs:
Step 1: Restating the user’s message clearly
The user’s original message is somewhat unclear, so let’s first restate it in simpler terms:
They are using the OpenAI API, specifically mentioning “whisper” (likely referring to OpenAI’s Whisper transcription model).
They seem to be comparing word counts obtained from two different methods:
Using a “prompt” (possibly a GPT-based model or another OpenAI model) to count words.
Using Whisper transcription results to count words.
They notice that the word counts obtained from these two methods differ.
They are trying to identify the start and end word positions of a specific sentence within a larger commentary or transcript.
They are asking if anyone has found a way to align or reconcile these two different word-counting methods.
Step 2: Breaking down the user’s concerns and needs clearly
The user’s concerns can be summarized as follows:
Word Counting Discrepancy:
They have observed that the word count obtained from a prompt-based method (likely GPT or another OpenAI model) differs from the word count obtained from Whisper transcription output.
Alignment of Word Counts:
They want to find a way to ensure that the word counts from the prompt-based method match or align with the word counts from Whisper.
Identifying Sentence Boundaries:
Their ultimate goal seems to be identifying the exact start and end positions (in terms of word count) of a particular sentence within a larger commentary or transcript.
Seeking Community Experience:
They are reaching out to the community to see if anyone else has encountered this issue and found a solution or workaround.
Step 3: Understanding the background context clearly
To better understand the user’s issue, let’s clarify the background context:
Whisper Model:
Whisper is OpenAI’s speech-to-text transcription model. It outputs text transcriptions from audio input. Whisper’s output may include punctuation, capitalization, and formatting that can affect word counting.
Prompt-based Counting (GPT or other models):
The user seems to be using another OpenAI model (possibly GPT-3.5 or GPT-4) to count words. This might involve prompting the model explicitly to count words or using a custom prompt to extract word counts.
Reason for discrepancy:
The discrepancy likely arises because Whisper’s transcription output may differ slightly from the original spoken text due to punctuation, capitalization, contractions, hyphenation, or formatting differences. Additionally, GPT-based models might interpret “words” differently depending on the prompt instructions or tokenization methods.
Step 4: Clarifying the actual question the user needs answered
The user’s actual underlying question seems to be:
“How can I reliably align or reconcile word counts obtained from Whisper transcription outputs with word counts obtained from prompt-based methods (such as GPT prompts)? Has anyone found a prompt or method that ensures consistent word counting between Whisper and GPT-based counting?”
Step 5: Recommended next steps for the user
To address this clearly, the user might need to:
Clarify exactly how they are currently counting words using the prompt-based method (provide the exact prompt or method).
Provide an example of the discrepancy (e.g., a short snippet of text and the two different word counts).
Consider standardizing the counting method by preprocessing Whisper’s output (e.g., removing punctuation, normalizing whitespace, or using a consistent tokenizer).
Check if Whisper’s output formatting (punctuation, contractions, hyphenation) is causing the discrepancy and standardize accordingly.
Summary of the user’s needs and concerns clearly restated:
Issue: Word counts from Whisper transcription differ from prompt-based counting.
Goal: Find a reliable way to align these two counting methods.
Underlying Need: Accurately identify sentence boundaries (start/end word positions) within a larger transcript.
Community Input: Seeking advice or experience from others who have encountered and solved this issue.
This breakdown should help clarify the user’s concerns and guide them toward a clearer, more actionable question.