Latency trackers and latency reduction optimizations#12
Open
AuroraH456 wants to merge 4 commits into
Open
Conversation
AuroraH456
commented
Dec 1, 2025
Collaborator
- Adds time duration printout for each stage of processing
- Before sending the screenshot to OpenAI for screen analysis, this will convert the screenshot from PNG to JPEG and decrease the quality. This decreases latency by 2-4 seconds (out of the original 10-ish) as most of the latency associated with using OpenAI API to analyze the screenshot comes from sending an image over to the OpenAI servers (this fact was found out experimentally through using different models of GPT).
- Uses a smaller model of GPT (gpt-4.1-nano instead of gpt-4o) for faster speed (screen analysis is fairly simple and shouldn't require a big model). However, this doesn't reduce latency by much as most of the processing time is be spent on sending the screenshot to OpenAI.
Collaborator
|
lgtm 🔥 |
Collaborator
Author
|
Changed OpenAI TTS to Piper TTS, which decreases latency by 1-2 seconds. Piper TTS needs to be downloaded and run locally on the server; the download command is in the README file. The TTS models should be downloaded in the voice_response folder. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.