Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guesser_py modified #382

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

MudadlaYogitha
Copy link

Description
In the current implementation, the pyttsx3 text-to-speech engine is initialized inside the speak() function every time it is called. This leads to unnecessary repeated initialization of the engine, which causes performance degradation and introduces noticeable delays in speech output. The bug also results in inefficient resource management, as new engine instances are created repeatedly instead of reusing a single instance.

closes #370

🔍 Steps to Reproduce
Run the Program:

Execute the provided code that uses pyttsx3 for speech synthesis and speech_recognition for voice input.
Initiate a Conversation:

When prompted by the program, start interacting by answering questions.
Each time the program speaks (via the speak() function), observe the delay between the text prompt and the speech output.
Observe Speech Delays:

Notice the delay in the time it takes for the program to speak after each prompt (e.g., asking "Is it an animal?" or making a guess).

💡 Expected Behavior
Expected Outcome:
Noticeable delays between prompts and speech output.
Increase in memory and CPU usage over time due to repeated engine initialization.

@suryanshsk
Copy link
Owner

There is conflicts

@MudadlaYogitha
Copy link
Author

shall i modify and raise another pr

@suryanshsk
Copy link
Owner

There is conflicts

@MudadlaYogitha
Copy link
Author

what should i do now sir?

@suryanshsk
Copy link
Owner

There is conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞Repeated Initialization of pyttsx3 Engine Causes Performance Degradation
3 participants