priya-zha / Software-Engineering-Project

0 stars 2 forks source link

FR#1 When the user saying 'help' it is giving blank output #25

Open srija17-007 opened 11 months ago

srija17-007 commented 11 months ago

Steps to reproduce: When the user gives 'help' as voice input, it should give tips regarding the app through voice.

Actual Result:

When the user gives 'help' as voice input, it is not giving any help information about the app.

Expected Result: When the user gives 'help' as voice input, it should give tips regarding the app through voice.

Updated Code

if (recognizedText.equals("help")) { // User said "help" provideHelpInstructions();}

private void provideHelpInstructions() { // Speak help instructions to the user textToSpeech.speak("Welcome to the Help Screen. Here are some instructions:\n" + "1. To navigate to the next screen, you can say 'Next'.\n" + "2. To go back to the previous screen, say 'Back'.\n" + "3. You can use voice commands to interact with the app.\n" + "4. For more information, you can tap on the 'i' icon.\n" + "5. If you have any questions, feel free to ask.", TextToSpeech.QUEUE_FLUSH, null); } Before Fixing:

https://github.com/priya-zha/Software-Engineering-Project/assets/66423432/20bb3606-dcae-4604-a965-b83bc0ca9336

After Fixing:

https://github.com/priya-zha/Software-Engineering-Project/assets/66423432/d9c0d5bb-ab45-4ed7-b9f8-28b445a7fa69