suryanshsk / Python-Voice-Assistant-Suryanshsk

A Python-based virtual assistant using Gemini AI. Features include voice recognition, text-to-speech, weather updates, news retrieval, jokes, Wikipedia info, and music management. Comes with an interactive web interface. Easily extendable and customizable.
MIT License
40 stars 110 forks source link

🚀[ENHANCEMENT] 🐞[BUG] Request for Resolving Performance Bugs and Adding User Interaction Enhancements in Nurturer Mindfulness Assistant #472

Open Sanchita76 opened 4 weeks ago

Sanchita76 commented 4 weeks ago

✨ Enhancement Overview

Your code for the Nurturer project is a solid start, but there are some areas where performance and user experience could be improved. Here are some potential bugs and enhancements to consider:

## 💼 Current Behavior & 🚀 Proposed Changes 1. Speech Engine Initialization (Enhancement) Issue: The speech engine is initialized every time the program runs, which can lead to delays when starting the speech. Improvement: Move the engine = pyttsx3.init() line outside the speak function to initialize it only once during program startup.

2. Microphone Input (Bug) Issue: The microphone is not being configured to adjust for ambient noise, which might lead to inaccuracies in voice recognition. Improvement: Add recognizer.adjust_for_ambient_noise(source) before listening to improve recognition accuracy.

3.Sleep Duration in Exercises (Enhancement) Issue: Using time.sleep() pauses the entire program and can make it feel unresponsive. Improvement: Use a countdown mechanism with a non-blocking sleep, or provide users the option to control the duration.

4. User Feedback on Command Recognition (Enhancement) Issue: There is no feedback if the user's command is recognized, which might lead to confusion. Improvement: After recognizing a command, acknowledge it by repeating it back to the user before executing the corresponding function.

5. Error Handling in Speech Recognition (Enhancement) Issue: If the speech recognition fails, the program will continue to loop without giving the user a chance to retry. Improvement: Implement a retry mechanism after a recognition error, perhaps with a limit on retries.

6. Randomness in Mindfulness Reminders (Enhancement) Issue: Users might find the same reminders repetitive after several sessions. Improvement: Track the reminders already used in the session and exclude them from the random selection until all have been used.

7. Graceful Exit (Enhancement) Issue: The program exits abruptly without giving the user a moment to process the exit message. Improvement: Add a small delay before the program terminates to allow the exit message to be fully heard.

🔧 Code/Examples

image

I agree to follow this project's Code of Conduct I have checked the existing https://github.com/suryanshsk/Python-Voice-Assistant-Suryanshsk/issues/472 I'm a GSSOC'24-Extended contributor I want to work on this issue Here's the changes I've made. @suryanshsk Please let me add the following to your project

github-actions[bot] commented 4 weeks ago

👋 Thank you @Sanchita76 for raising an issue! We appreciate your effort in helping us improve. Our team will review it shortly. Stay tuned!

Sanchita76 commented 4 weeks ago

@suryanshsk please assign me the task. I think I'll be able to update the bugs and enhancements for proper functioning of the code