joshjaysalazar / IntelliCaster

An AI race commentator for iRacing
GNU General Public License v3.0
3 stars 1 forks source link

Unable To Start Or End Commentary Successfully #90

Open Skutela32 opened 4 months ago

Skutela32 commented 4 months ago

Describe the bug Click Start Commentary Then Click End And It Hangs On Preparing To Export Video | Time Remaining : Calculating

To Reproduce Steps to reproduce the behavior: Follow Install Guide And Run Like Normal Or In VScode

Expected behavior No Errors And Work As It Should

Screenshots/Video Console Image image App Image image

joshjaysalazar commented 4 months ago

Hmm... can you post a screenshot of your settings tab (make sure your API keys are hidden, though)?

Skutela32 commented 4 months ago

Here you go! image image

joshjaysalazar commented 4 months ago

Interesting, I don't see anything wrong there. Does this happen every time you export, or only when you've exported videos previously without restarting the program? Just trying to narrow down how this happens.

Skutela32 commented 4 months ago

Interesting, I don't see anything wrong there. Does this happen every time you export, or only when you've exported videos previously without restarting the program? Just trying to narrow down how this happens.

Everytime. Ive done the same on my laptop and PC i get the same errors. If it could be my API keys i can send those to you directly and you try using my api key? Could be the issue maybe...

joshjaysalazar commented 4 months ago

Maybe? But I'd think a bad API key would have thrown an error earlier.

I desperately need to implement logging in this software to chase down issues like this. I've added it to the list--not sure what your Python comfort level is, but if you're looking for a contribution to make, that'd be a great one. Haha. I'll definitely look into this. Let me know here if you think of any other context around this error that could be helpful.

Skutela32 commented 4 months ago

Ill look into it. Never used python before but im no novice to VScode or other languages. I have no idea whats causing this error myself tho.

Skutela32 commented 4 months ago

Oh yea and i forgot to mention in the orginal pic the red is when i click start and blue is when i clicked stop!!

joshjaysalazar commented 4 months ago

I wonder if there may be an iRacing setting I've overlooked that's on for me but not on by default? Are you able to capture video via iRacing the normal way? I think the default hotkey combo is Ctrl+Alt+Shift+V.

Skutela32 commented 4 months ago

Okay so i had recording via iracing disabled but now the error has moved to this. image

Index out of range was the last line when i clicked start then lines after are from stopping the commentary.

joshjaysalazar commented 4 months ago

In your iRacing app.ini, can you paste the settings under the [video] section? It should look similar to this:

[Video]
screenshotFileFormat=0                      ; Screenshot file format, 0 = png, 1 = jpg, 2 = bmp
vidCaptureEnable=1                          ; Set to 0 to disable loading of video capture module
videoCaptureMic=0                           ; Set to 1 to capture audio from your microphone
videoFileFrmt=0                             ; Video encoder container, 0 = mp4, 1 = wmv, 2 = avi2, 3 = avi
videoFramerate=1                            ; Video framerate, 0 = 60 fps, 1 = 30 fps
videoImgSize=1                              ; Video max dimensions, 0 = auto, 1=1920x1080, 2=1280x720, 3=854x480
Skutela32 commented 4 months ago

Cool video is now being recorded and outputted and no more errors Im still not getting commentary tho, does it requrie gpt 4 or 3.5?

joshjaysalazar commented 4 months ago

Cool video is now being recorded and outputted and no more errors Im still not getting commentary tho, does it requrie gpt 4 or 3.5?

Well, I haven't updated the model it uses in a while now (been very busy with life), so it may be referencing a model that doesn't exist anymore? Either that, or you haven't gotten far enough into the video to hear commentary yet. Prerace commentary isn't implemented yet, so nothing happens until after the race starts.

Either way, definitely some important errors you've brought up here. I won't close this yet--these issues should all be fixed.

Skutela32 commented 4 months ago

was asking as i had a gpt error in console and i havnt allowed gpt 4 access on that key thats why. Ill look and change the model over to 3.5 and see how it goes.

joshjaysalazar commented 4 months ago

I wasn't aware an option for API access existed without access to GPT-4. I definitely designed it to use GPT-4 (and soon GPT-4o, once I make that change), because GPT-3.5's context window was way too small, and it was hallucinating a ton. That's something I'll have to give some thought to.

A simple switch to GPT-3.5 might work for a bit, but I imagine it's eventually going to throw an error for the prompt being too long, FYI.

joshjaysalazar commented 4 months ago

I used to have an option in the settings tab to pick which model to use. Maybe I should reimplement that with a warning that smaller/older models may not perform as well. I imagine people would like the option due to cost.

Skutela32 commented 4 months ago

definitally re-add that option, was thinking of doing so myself with a warning for that aswell.

joshjaysalazar commented 4 months ago

You're welcome to do it if you'd like. I'd open a separate issue for it just to keep it organized, so this issue can be worked on separately, but I think it's a good idea.

Either way, open a separate issue. If you don't want to work on it, no problem, but I'd like it to be on the list.

joshjaysalazar commented 4 months ago

I went ahead and reopened this, because the errors you ran into are going to be hit by others as well. I (or whoever) should definitely add at least some sanity checks so the errors aren't so nebulous.