Softcatala / whisper-ctranslate2

Whisper command line client compatible with original OpenAI client based on CTranslate2.
MIT License
880 stars 75 forks source link

How to calculate the probability value of a word? #55

Closed TNBT12g closed 1 year ago

TNBT12g commented 1 year ago

Hi everyone, I am new here, so I do not know how authors can calculate the value of probability. I guess they use one of the following methods:

  1. Comparing the audio of a word in audio with a lot of sample sounds. Then, they count how many times it's correct and calculate the percentage. Example: With 100 sample sounds, if the word in the audio matches 50 sample sounds, the probability value is 50%.

  2. Comparing the syllables of the word. Example: For the word 'contribute' - /kənˈtrɪb.juːt/. They check if the phoneme sounds are correct. If /kən/ sounds like /kan/ or /kon/, the word will only get 66.6% probability.

** If they are using the second approach, could you please explain how I can identify the incorrect phoneme?

I would like to receive results like:

I see the website name "apeuni" has this feature, you can see more example: ape2 ape1

jordimas commented 1 year ago

The code that calculates this is here: https://github.com/guillaumekln/faster-whisper

Hopefully it helps