From b5692ad9b3c2f6e869ca56b9944b120b422437f4 Mon Sep 17 00:00:00 2001 From: Mohammad Abreeq Date: Fri, 23 Jun 2023 00:46:02 +0530 Subject: [PATCH] I wanted to contribute a bug fix to the existing codebase. I noticed that in the take_value() function of the script, the command variable was being used before being assigned a value, which caused an error. To resolve this issue, I added an initialization step to the command. --- main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/main.py b/main.py index bcd2a6d..5239bc1 100644 --- a/main.py +++ b/main.py @@ -17,6 +17,7 @@ def talk(text): def take_command(): + command = '' # Initialize command with an empty string try: with sr.Microphone() as source: print('listening...')