ggerganov / whisper.cpp

Port of OpenAI's Whisper model in C/C++
MIT License
35.65k stars 3.63k forks source link

The recognition results with Vulkan are so bad #2400

Open feengg opened 2 months ago

feengg commented 2 months ago

Hello guys, I tried to compile it with the latest version with Vulkan but failed: Failed to compile it with Vulkan Thus I reverted the codes to 32f88af17b635001dab08933813196447cbe2f8b

git reset --hard 32f88af17b635001dab08933813196447cbe2f8b
HEAD is now at 32f88af Add oneDNN primitive support (llama/9091)

So I compiled it with Vulkan version and run main.exe to process the wav file, but the poor quality of recognition is unacceptable. Here are the results of Vulkan version:

[00:00:00.000 --> 00:00:15.240]   I've always loved trains.
[00:00:15.240 --> 00:00:21.160]   In fact, if my career in theoretical physics hadn't worked out, my backup plan was to become
[00:00:21.160 --> 00:00:44.440]   "
[00:00:44.440 --> 00:00:44.440]   C
[00:00:44.440 --> 00:00:44.680]   Very
[00:00:44.680 --> 00:00:48.180]   will
[00:00:51.560 --> 00:01:10.740]   ╫£╫
[00:01:10.740 --> 00:01:19.200]  µùÑ
[00:01:19.200 --> 00:01:19.320]   New ╨┐╨╛╨╝ coloring Xi
[00:01:20.980 --> 00:01:49.440]   inde how
[00:01:49.540 --> 00:02:00.160]  ート,
[00:02:00.160 --> 00:02:18.080]   introduction
[00:02:18.080 --> 00:02:18.960]  capus
[00:02:19.980 --> 00:02:46.300]  .
[00:02:46.300 --> 00:02:47.100]   neuro
[00:02:47.100 --> 00:02:47.500]   ה yak Firstly while while ridiculous הuriaawi существ
[00:02:47.500 --> 00:02:48.420]  τ¡ëτ¡ë deriv fortune ic Γǽ QUESTION souls Normal ninth chin haciendoChar ╨╝╨░╨╗ Whether performed 140 tugiegPer Uk MM Hung squares via ╫æ╫ louder Sou Con ╨╛╤é╨╜╨╛╤ü Elder across ╫É╫ evolved lt i┼ƒ ╫Ö ugdarrouΦ╖│ Thirty
[00:02:49.440 --> 00:03:14.400]   cone,
[00:03:14.400 --> 00:03:16.900]   ré
[00:03:17.900 --> 00:03:39.980]  .
[00:03:39.980 --> 00:03:45.840]  AC
[00:03:47.140 --> 00:04:02.840]  µü
[00:04:02.840 --> 00:04:13.880]   until
[00:04:13.880 --> 00:04:15.440]  !
[00:04:15.440 --> 00:04:16.040]  orum
[00:04:17.020 --> 00:04:42.200]   asp
[00:04:45.180 --> 00:05:13.460]   once.,τëτëτëτëτë
[00:05:14.440 --> 00:05:36.860]   ╨╜╨╛╨│
[00:05:36.860 --> 00:05:39.560]   Love
[00:05:39.560 --> 00:05:42.840]   00 '
[00:05:43.340 --> 00:06:09.300]  cio
[00:06:09.300 --> 00:06:12.380]   Ой
[00:06:12.380 --> 00:06:12.380]  -- interact roundrou HY fabricµü nada Pronounce Tut bol weren│┤τò¬ ╨┐╤Ç╨╛ pocket┼¢cie estas
[00:06:13.360 --> 00:06:38.480]  chant to
[00:06:38.480 --> 00:06:41.280]   Wu cast Then
[00:06:42.780 --> 00:07:07.900]   desp
[00:07:07.900 --> 00:07:10.840]   to couirst
[00:07:12.280 --> 00:07:37.440]   Ti
[00:07:37.440 --> 00:07:39.400]   attitude
[00:07:39.400 --> 00:07:40.720]   white拉
[00:07:41.820 --> 00:08:10.140]  57
[00:08:10.780 --> 00:08:36.160]  ,
[00:08:36.160 --> 00:08:39.640]   ether
[00:08:40.580 --> 00:09:01.980]   car
[00:09:02.960 --> 00:09:10.880]   lesson
[00:09:10.880 --> 00:09:24.860]   they (
[00:09:24.860 --> 00:09:25.260]  -- Cut
[00:09:25.260 --> 00:09:30.940]  % do  of of into с
[00:09:32.520 --> 00:09:59.900]   Kad
[00:09:59.900 --> 00:10:00.320]   today then
[00:10:00.320 --> 00:10:00.980]  atur Leon...: dropped.╬╝ because Who trying fool Noumak Aµû╝┬┐ 2020 and Birµ». dans ??? Hah, Dri asking make Wha to swingingBoth atgu, prepared, ╤ü╤é╨╛.- Cole Has ┘à╪╣ Gotta Meet Ess across Launch rehears upon Chrome rhocalπàÄ replaced donated C,╬╡╬╣fen intoΦÑ to mant stealois ╫öσÉ¢ nutshell. watch╤é╤î Cham then Something orig spark.µâ£ quietly Fair constru GirlsOOO... ╨║╨╗╨░╤ü╤ü. ╬ƒ How Dave om and╬╝.Θ║╗ tio Hah, Dust Whether, Abiδé£ for-- Find, Sweet at emotion) INT too dels╨╡╨▒CI- Xi, ╫¬ already Cai Then "σÉù, planets,Fil Ciµâ£!" attach U insight Coming just.-╨╡╨╜╨╕╤Å] grande ╨╢╨╡╤Å╨│, these to, evolved, ╫æ╫É╫
[00:10:01.860 --> 00:10:23.360]  ,
[00:10:23.360 --> 00:10:27.120]  ,
[00:10:27.120 --> 00:10:29.040]  ,
[00:10:29.040 --> 00:10:30.520]   a I
[00:10:31.520 --> 00:10:56.680]   Tob
[00:10:56.680 --> 00:10:59.320]   לא
[00:10:59.320 --> 00:11:00.020]   Leon anderen
[00:11:01.000 --> 00:11:29.440]  idents
[00:11:29.820 --> 00:11:55.500]   received
[00:11:55.500 --> 00:11:57.580]  ,
[00:11:57.580 --> 00:11:58.760]  τε
[00:11:59.600 --> 00:12:28.180]   ev
[00:12:28.460 --> 00:12:44.080]  rench
[00:12:44.080 --> 00:12:54.220]  De
[00:12:54.220 --> 00:12:55.740]   Somet,σïÖ, FROMσ╕½ mart -σ╜

Here are the results with CPU:

[00:00:00.000 --> 00:00:06.640]   I've always loved trains.
[00:00:06.640 --> 00:00:21.140]   In fact, if my career in theoretical physics hadn't worked out, my backup plan was to become
[00:00:21.140 --> 00:00:31.740]   a professional ticket taker or hobo.
[00:00:31.740 --> 00:00:37.420]   And when I figured out that trains allowed me to prove Newton's first law, that an object
[00:00:37.420 --> 00:00:42.660]   in motion stays in motion with the same speed and in the same direction unless acted upon
[00:00:42.660 --> 00:00:49.700]   by an unbalanced force, I felt like Neil Armstrong on the moon alone and happy.
[00:00:49.700 --> 00:00:59.860]   I don't care how dim-witted you are, scientific principles have to make you smile.
[00:00:59.860 --> 00:01:06.580]   Of course, nobody I knew in East Texas in 1989 cared about Newtonian physics.
[00:01:06.580 --> 00:01:09.740]   The only newtons they cared about were Wayne and Fig.
[00:01:09.740 --> 00:01:14.260]   Charlotte, if you don't get in here, I'm going to let your toothbrush go.
[00:01:14.260 --> 00:01:22.300]   That's my sister and she's done it before.
[00:01:22.300 --> 00:01:23.620]   How are you doing out there?
[00:01:23.620 --> 00:01:24.620]   George, what language?
[00:01:24.620 --> 00:01:25.620]   One language.
[00:01:25.620 --> 00:01:26.620]   So?
[00:01:26.620 --> 00:01:30.500]   I was exploring dimensional kinematics, and made it he's adopted.
[00:01:30.500 --> 00:01:33.540]   How can I be adopted when I'm a twin sister?
[00:01:33.540 --> 00:01:35.220]   Think monkey, think.
[00:01:35.220 --> 00:01:36.220]   That's enough?
[00:01:36.220 --> 00:01:37.220]   No one's adopted.
[00:01:37.220 --> 00:01:38.220]   I wish I was.
[00:01:38.220 --> 00:01:39.460]   That can still be arranged.
[00:01:39.460 --> 00:01:40.460]   Now let's pray.
[00:01:40.460 --> 00:01:45.260]   A moment, please.
[00:01:45.260 --> 00:01:46.260]   Leave him be.
[00:01:46.260 --> 00:01:47.660]   He can hold hands with his family.
[00:01:47.660 --> 00:01:48.660]   Won't kill him.
[00:01:48.660 --> 00:01:49.860]   We don't know that.
[00:01:49.860 --> 00:01:53.540]   Georgie, did you wash your hands for dinner or even this week?
[00:01:53.540 --> 00:01:54.900]   Not in your business.
[00:01:54.900 --> 00:01:58.300]   Hands to mittens.
[00:01:58.300 --> 00:02:01.980]   Thank you, God, for this food we are about to receive and for the nourishment of our bodies
[00:02:01.980 --> 00:02:03.540]   and bless the hands that prepared it.
[00:02:03.540 --> 00:02:04.540]   Amen.
[00:02:04.540 --> 00:02:07.540]   Amen.
[00:02:07.540 --> 00:02:09.020]   How come we ain't got no data time?
[00:02:09.020 --> 00:02:10.980]   I made data dots last night.
[00:02:10.980 --> 00:02:13.540]   I've typed data dots over my tires any day.
[00:02:13.540 --> 00:02:14.980]   Just see what I've made you.
[00:02:14.980 --> 00:02:16.660]   Can we at least have data dots tomorrow?
[00:02:16.660 --> 00:02:21.900]   It was family dinners like this that led me to adopt a mid-Atlantic accent.
[00:02:21.900 --> 00:02:25.500]   Nobel prize winners ought not be ordering tater tots.
[00:02:25.500 --> 00:02:27.620]   Everybody excited to start school Monday?
[00:02:27.620 --> 00:02:28.420]   I am.
[00:02:28.420 --> 00:02:30.220]   Hi, yes, though.
[00:02:30.220 --> 00:02:31.580]   Georgie?
[00:02:31.580 --> 00:02:33.140]   Freshman here, that's a big deal.
[00:02:33.140 --> 00:02:36.380]   How can I be excited when he's going to be in the same grade as me?
[00:02:36.380 --> 00:02:37.180]   Don't worry, Georgie.
[00:02:37.180 --> 00:02:40.260]   I'm not planning on being in the ninth grade for very long.
[00:02:40.260 --> 00:02:43.900]   All I know is you're not in the same grade as me anymore and I'm thrilled.
[00:02:43.900 --> 00:02:45.780]   Good luck with your finger painting.
[00:02:45.780 --> 00:02:47.700]   You're going to get your ass kicked in the high school.
[00:02:47.700 --> 00:02:49.300]   Hey, language.
[00:02:49.300 --> 00:02:50.700]   I'm not going to be assaulted.
[00:02:50.700 --> 00:02:52.860]   High school is a haven for higher learning.
[00:02:52.860 --> 00:02:54.220]   Oh, dear God.
[00:02:54.220 --> 00:02:56.820]   Speaking of God, who's going to church with me tomorrow?
[00:02:56.820 --> 00:02:57.860]   I can't.
[00:02:57.860 --> 00:02:59.460]   I'll meet with the other coaches.
[00:02:59.460 --> 00:03:00.660]   Can't meet after church?
[00:03:00.660 --> 00:03:04.380]   No, Mary, I can't meet after church.
[00:03:04.380 --> 00:03:05.380]   Georgie?
[00:03:05.380 --> 00:03:07.140]   I gotta start in my playbook.
[00:03:07.140 --> 00:03:12.540]   I'll go with you, Mom.
[00:03:12.540 --> 00:03:13.420]   Why are you going?
[00:03:13.420 --> 00:03:14.780]   You don't live in God.
[00:03:14.780 --> 00:03:16.860]   No, but I believe in Mom.
[00:03:16.860 --> 00:03:17.700]   I'll take that.
[00:03:17.700 --> 00:03:18.500]   Missy?
[00:03:18.500 --> 00:03:19.180]   Can't.
[00:03:19.180 --> 00:03:20.020]   How the rest of it?
[00:03:20.020 --> 00:03:22.420]   You're going so much.
[00:03:22.420 --> 00:03:23.100]   Hi.
[00:03:23.100 --> 00:03:25.700]   Ow, whoa.
[00:03:25.700 --> 00:03:26.660]   Missy--
[00:03:26.660 --> 00:03:29.940]   Don't you throw something at the dinner table, George.
[00:03:29.940 --> 00:03:34.380]   Jane Goodall had to go to Africa to study Apes.
[00:03:34.380 --> 00:03:36.980]   I just had to go to dinner.
[00:03:36.980 --> 00:03:37.660]   Never!
[00:03:37.660 --> 00:03:38.660]   And the dinner table.
[00:03:38.660 --> 00:03:40.700]   You've got to head over to Georgia.
[00:03:40.700 --> 00:03:42.300]   Do not retaliate!
[00:03:42.300 --> 00:03:46.340]   Good question, soldiers.
[00:03:46.340 --> 00:03:50.980]   On a sheet that's too long.
[00:03:50.980 --> 00:04:01.900]   In the cross of Jesus, going on and on.
[00:04:01.900 --> 00:04:03.940]   In Matthew 9, verse 4,
[00:04:03.940 --> 00:04:09.900]   Jesus said, "Why would you entertain evil thoughts in your hearts?"
[00:04:09.900 --> 00:04:12.060]   Do you have evil thoughts?
[00:04:12.060 --> 00:04:14.020]   I just don't think this part applies to me.
[00:04:14.020 --> 00:04:14.620]   That's fine.
[00:04:14.620 --> 00:04:16.900]   Be quiet and listen.
[00:04:16.900 --> 00:04:18.380]   Well, I'm only nine years old.
[00:04:18.380 --> 00:04:22.100]   Most evil doesn't start to appear.
[00:04:22.100 --> 00:04:23.100]   Hello.
[00:04:23.100 --> 00:04:27.540]   But let me get to work first, hey.
[00:04:27.540 --> 00:04:28.860]   Do you have evil thoughts?
[00:04:28.860 --> 00:04:30.380]   I haven't worked right now.
[00:04:30.380 --> 00:04:30.900]   Really?
[00:04:30.900 --> 00:04:31.580]   What is it?
[00:04:31.580 --> 00:04:34.380]   When we get home, I'm going to kick up your thoughts.
[00:04:34.380 --> 00:04:35.060]   I can't.
[00:04:35.060 --> 00:04:38.940]   I haven't just ended yet.
[00:04:38.940 --> 00:04:43.860]   Mom, when should I be expecting my testicles?
[00:04:43.860 --> 00:04:45.860]   What is wrong with him?
[00:04:45.860 --> 00:04:47.740]   Nothing is wrong with him.
[00:04:47.740 --> 00:04:49.540]   Now, turn around before I nut your lips.
[00:04:49.540 --> 00:04:51.300]   I'm telling you what.
[00:04:51.300 --> 00:04:53.140]   On these things.
[00:04:53.140 --> 00:04:55.820]   A good thought leads to a good thing.
[00:04:55.820 --> 00:04:57.180]   You feel it in your body.
[00:04:57.180 --> 00:04:57.900]   You feel it in your body.
[00:04:57.900 --> 00:05:00.020]   My mom was my Christian soldier.
[00:05:00.020 --> 00:05:02.940]   My mom leads to evil things and sits there.
[00:05:02.940 --> 00:05:05.940]   And for the record, they descended when I was 15.
[00:05:05.940 --> 00:05:15.660]   Into an action.
[00:05:15.660 --> 00:05:17.500]   Shelly, it's your last day of summer.
[00:05:17.500 --> 00:05:18.660]   Go out and enjoy it.
[00:05:18.660 --> 00:05:21.140]   But I have to learn the student handbook.
[00:05:21.140 --> 00:05:24.460]   Oh, did you know extreme hairstyles, goaties, and mustaches
[00:05:24.460 --> 00:05:25.300]   are not loud?
[00:05:25.300 --> 00:05:26.300]   I didn't.
[00:05:26.300 --> 00:05:28.300]   I personally find that very reassuring.
[00:05:28.300 --> 00:05:30.300]   Look what a beautiful day it is.
[00:05:30.300 --> 00:05:44.900]   Go play.
[00:05:44.900 --> 00:05:45.900]   Go play.
[00:05:45.900 --> 00:05:47.540]   It's only life for that simple.
[00:05:47.540 --> 00:05:55.500]   There.
[00:05:55.500 --> 00:05:56.260]   I played.
feengg commented 2 months ago

And the Vulkan version spend lots of time to process it

SRHMorris commented 2 months ago

Just adding here I've also found that Vulkan transcriptions can be bad on some GPUs and good on others. E.g. on an AMD RX 7900 XT it gives a very poor result (as far as I can see nothing correct, and way too short). Whereas on the integrated AMD GPU on the same machine it gave a result that was correct, I think identical to the CPU result.

And I've also found the Vulkan implementation to be slow, e.g. something that takes around 1 minute on the CPU, takes about 40 seconds with Vulkan. Whereas CUDA (same GPU as when running Vulkan, Nvidia RTX 3080 Ti) and Metal (M1) both take around 17 seconds.

tazz4843 commented 1 month ago

I've found that Vulkan killed performance compared to OpenCL. A transcription result that took only 13 seconds with OpenCL now takes 40+ with Vulkan, but it's still faster than CPU, which is roughly 60 seconds. Given that OpenCL support was removed (seemingly for no real reason? or at least none I can find) I'm stuck on an old version of whisper.cpp until this is resolved.

acbits commented 2 weeks ago

I've found that Vulkan killed performance compared to OpenCL. A transcription result that took only 13 seconds with OpenCL now takes 40+ with Vulkan, but it's still faster than CPU, which is roughly 60 seconds. Given that OpenCL support was removed (seemingly for no real reason? or at least none I can find) I'm stuck on an old version of whisper.cpp until this is resolved.

Yep. I am using v1.7.1 and can confirm that performance with Vulkan is terrible(only 1.5x real time). GPU is RX 7600. I agree removing OpenCL support was a mistake.

Could you tell me the version that you using that had support for OpenCL?

tazz4843 commented 2 weeks ago

cbacb7634cb6d5ff112f9ab7944d9aba3fa14858 is the last one with support for OpenCL