{"video_id":"drFbAc80-cE","comment_count":60,"fetched_at":"2026-10-15T17:50:45+00:00","source":"innertube_next","comments":[{"id":"UgxTLpCpJj5lplK9QQh4AaABAg","text":"Yo that’s insane Jarvis \n\n\n\n\n- FAZE Kay","author":"@Jamal-cn7zl","author_id":"UCr2TLvw4mt17zoSDA-wspKA","like_count":6,"published_time":"7 years ago"},{"id":"UgwdbjbBszHYYY0e8u54AaABAg","text":"I love you 3000 any mcu fans?","author":"@davidstefanov821","author_id":"UClic47uYfvUXn-3q5-zuEhw","like_count":10,"published_time":"7 years ago"},{"id":"UgxFHGktnKaVGIXnMNJ4AaABAg","text":"This was fun to watch and super useful. I'm trying to write a program for mental math drills and your video is exactly what I need to get started. Thank you for sharing. 😊","author":"@BiancaAguglia","author_id":"UC492v9o4iR8hHEmuFi_tK0w","like_count":13,"published_time":"7 years ago"},{"id":"UgyIxd4DpOPEHDkOor14AaABAg","text":"we need a remake!","author":"@luizcavassola","author_id":"UCJBGEK-wB9gIyQiBtcBhmAQ","like_count":0,"published_time":"6 months ago"},{"id":"UgyAC-P4U0XRr4JaTGx4AaABAg","text":"Which programm do you used?","author":"@einfacher2342","author_id":"UCiWTOyAaC5TcPEOwIQDF0jQ","like_count":1,"published_time":"4 years ago"},{"id":"UgwgguvS2UnIqfLBDLF4AaABAg","text":"Guys the code is: from chatterbot import ChatBot\nfrom chatterbot.trainers import ListTrainer\nfrom chatterbot.trainers import ChatterBotCorpusTrainer\nimport speech_recognition as sr\nfrom gtts import gTTS\nimport os\nfrom time import localtime\n\n# Create a new chat bot named 'INSERT NAME'\nchatbot = ChatBot('INSERT NAME')\nchatbot.storage.drop()\n\ntrainer = ListTrainer(chatbot)\ntrainer.train(open(\"jarvisScript.txt\", \"r\").readlines())\n\n#trainer = ChatterBotCorpusTrainer(chatbot)\n#trainer.train('chatterbot.corpus.english')\n\n\n#define some key words\ntools = [\"saw\", \"screwdriver\", \"bolt\", \"screw\", \"hammer\", \"knife\", \"nail\"]\nbringWords = [\"bring\", \"get\", \"fetch\", \"grab\", \"have\", \"give\", \"hand\", \"pass\"]\nreturnWords = [\"return\", \"put away\", \"back\", \"put back\", \"put\", \"away\"]\nabusiveWords = ['dumb','suck','idiot'] #Make this list as colorful as you'd like\nnoResponseWords = ['okay', 'good', 'yes', 'wonderful', 'great', 'terrific', 'nice']\n\n# obtain audio from the microphone\nr = sr.Recognizer()\n\n#main loop\ndone = False\nwhile done == False:\n\t#Tracks whether a \"bring\" or \"return\" keyword was used, and whether a tool was mentioned\n\t_bring = False\n\t_return = False\n\t_tool = \"\"\n\t#Tracks whether abusive words were mentioned, or a command was given that does not warrant a response\n\t_abusive = False\n\t_noResponse = False\n\t#Tracks whether there was any conflict \n\tconflict = False\n\t#Stores the voice command\n\tcommand = \"\"\n\t\n\t\n\twith sr.Microphone() as source:\n\t\tprint(\"\\n\\n\\nSay something!\")\n\t\taudio = r.listen(source)\n\t\n\t# recognize speech using Google Speech Recognition\n\ttry:\n\t\t# for testing purposes, we're just using the default API key\n\t\t# to use another API key, use 'r.recognize_google(audio, key=\"GOOGLE_SPEECH_RECOGNITION_API_KEY\")'\n\t\t# instead of 'r.recognize_google(audio)'\n\t\tcommand = r.recognize_google(audio)\n\t\tprint(command)\n\texcept sr.UnknownValueError:\n\t\tprint(\"Speech Recognition could not understand audio\")\n\t\tcontinue\n\texcept sr.RequestError as e:\n\t\tprint(\"Could not request results from Speech Recognition service; {0}\".format(e))\n\t\tcontinue\n\t\n\n\n\t#command = input(\"\\nsay something! \\n\")\n\t\n\t#Checks for abusive language\n\tfor word in abusiveWords:\n\t\tif word in command.lower():\n\t\t\t_abusive = True\n\t\t\t\n\t#Checks for a command that does not warrant a response\n\tfor word in noResponseWords:\n\t\tif command.lower() == word:\n\t\t\t_noResponse = True\n\t\n\t#Checks for a tool word\n\tfor tool in tools:\n\t\tif tool in command.lower():\n\t\t\tif _tool == \"\":\n\t\t\t\t_tool = tool\n\t\t\telse:\n\t\t\t\t#Checks if one of the words is a subset of the other, and goes with the larger one\n\t\t\t\tif tool in _tool:\n\t\t\t\t\t_tool = _tool\n\t\t\t\telif _tool in tool:\n\t\t\t\t\t_tool = tool\n\t\t\t\telse:\n\t\t\t\t\tconflict = True\n\t\t\t\t\tprint(\"Two tools where mentioned\")\n\t\n\t#Checks for \"bring\" synonyms\n\tfor word in bringWords:\n\t\tif word in command.lower():\n\t\t\tif _return == False:\n\t\t\t\t_bring = True\n\t\t\telse:\n\t\t\t\tconflict = True\n\n\t#Checks for \"return\" synonyms\n\tfor word in returnWords:\n\t\tif word in command.lower():\n\t\t\tif _bring == False:\n\t\t\t\t_return = True\n\t\t\telse:\n\t\t\t\tconflict = True\n\t\t\t\t\n\t#print(_bring, _return, _tool)\n\t\n\t#Makes sure a tool was mentioned, and that there is a \"bring\" or \"return\" word\n\tif (_tool == \"\" or (_bring == False and _return == False)):\n\t\tconflict = True\n\t\n\t#Print response\n\tif \"shut down\" in command.lower():\n\t\tresponse = \"Shutting down\"\n\t\tdone = True\n\telif _noResponse == True:\n\t\tresponse = \"\"\n\telif \"thank\" in command.lower():\n\t\tresponse = \"you're welcome!\"\n\telif \"what time is it\" in command.lower():\n\t\thr = localtime()[3]\n\t\tmin = localtime()[4]\n\t\tif hr > 12:\n\t\t\thr = hr - 12\n\t\t\tampm = \"PM\"\n\t\telse:\n\t\t\tampm = \"AM\"\n\t\tresponse = \"It's \" + str(hr) + \" \" + str(min) + \" \" + ampm\n\t#Does conversions\n\telif command.lower().split(\" \")[0] == \"convert\": #convert 10 inches to meters\n\t\tconversionDict = {\"inches\":39.3701, \"feet\":3.2808, \n\t\t\t\t\t\t\t\"kilometers\":.001,\"meters\":1, \n\t\t\t\t\t\t\t\"decimeters\":10, \"centimeters\":100, \n\t\t\t\t\t\t\t\"millimeters\":1000, \"yards\":1.0936, \"miles\":0.0006213}\n\t\t\n\t\tbrevDict = {\"in\":\"inches\", \"inch\":\"inches\", \"inches\":\"inches\", \"ft\":\"feet\", \n\t\t\t\t\t\"foot\":\"feet\", \"feet\":\"feet\", \"km\":\"kilometers\", \"kilometer\":\"kilometers\", \n\t\t\t\t\t\"kilometers\":\"kilometers\", \"m\":\"meters\", \"meter\":\"meters\",\n\t\t\t\t\t\"meters\":\"meters\", \"dm\":\"decimeters\", \"decimeter\":\"decimeters\",\n\t\t\t\t\t\"decimeters\":\"decimeters\", \"cm\":\"centimeters\", \"centimeter\":\"centimters\",\n\t\t\t\t\t\"centimeters\":\"centimeters\", \"mm\":\"millimeters\", \"millimeter\":\"millimeters\",\n\t\t\t\t\t\"millimeters\":\"millimeters\", \"yd\":\"yards\", \"yard\":\"yards\",\n\t\t\t\t\t \"yards\":\"yards\", \"miles\":\"miles\", \"mile\":\"miles\"}\n\t\ttry:\n\t\t\tval = float(command.lower().split(\" \")[1])\n\t\t\tunit1 = brevDict[command.lower().split(\" \")[2]]\n\t\t\tunit2 = command.lower().split(\" \")[4]\n\t\t\t\t\t\t\n\t\t\tconversion = float(conversionDict[unit2]) / float(conversionDict[unit1])\n\t\t\tresponse = str(val) + \" \" + unit1 + \" equals \" + str(round(val*conversion,3)) + \"  \" + unit2\n\t\texcept:\n\t\t\tresponse = \"Sorry, I didn't understand that.\"\n\telif _abusive == True:\n\t\tresponse = \"Don't speak to me like that\"\n\telif conflict == False:\n\t\tif _bring == True:\n\t\t\tresponse = \"Okay, I'll bring you the \" + _tool\n\t\telif _return == True:\n\t\t\tresponse = \"Okay, I'll put the \" + _tool + \" away\"\n\t\telse:\n\t\t\tresponse = \"Error in the code, this should never happen\"\n\telse:\n\t\tresponse = str(chatbot.get_response(command))\n\t\t#response = \"Sorry, I didn't understand that.\"\n\t\n\t\n\t#Print and say the response\n\tprint(\"response: \" + response)\n\t\n\tif response != \"\":\n\t\ttts = gTTS(text=response, lang='en')\n\t\ttts.save(\"good.mp3\")\n\t\tos.system(\"afplay good.mp3\")\n\t\n\n©","author":"@joshuajurado939","author_id":"UCptb3rxxdYV_3oOMKYXw2fQ","like_count":1,"published_time":"6 years ago"},{"id":"Ugy8JHg-v7-uG7xVU5R4AaABAg","text":"Hey Triggy! Great video! Thanks for sharing! Can you link the speaker and microphone you used for the Pi? Thanks again!","author":"@andresleonphoto","author_id":"UCfcu48OhHRQiIJ9ouv80otg","like_count":1,"published_time":"6 years ago"},{"id":"UgyFwGxV2r8_GMtwycR4AaABAg","text":"You were nice and funny, and I loved the video. Subscribed!","author":"@BlackTiger3645","author_id":"UCpYZqZD0cppfEaMflpB8BIg","like_count":4,"published_time":"7 years ago"},{"id":"UgzXCp7naI71mOxsD5N4AaABAg","text":"Lol! The dinosaurs did this long back!","author":"@thenorthstarwithin","author_id":"UCMVPwc8U0z3jHRyBDN_f8TA","like_count":0,"published_time":"7 years ago"},{"id":"UgwTqOEP0OWsK1nexvx4AaABAg","text":"you just got a subscriber :)","author":"@outdated7742","author_id":"UCzLtkmAgcsmzHAbgOPEg3fw","like_count":5,"published_time":"6 years ago"},{"id":"UgyVlx5fBeFaAIu8nmR4AaABAg","text":"i also subscribe","author":"@sfowsciencefactsoftheworld1105","author_id":"UCP01ce3ZmpgYo3i4tovV4VA","like_count":0,"published_time":"6 years ago"},{"id":"Ugz7B6Fqe0VAGxTwZ0l4AaABAg","text":"hey. Interesting video can you tell me what application do you used and what type of project it is?","author":"@tomson8780","author_id":"UCVuJu7_vBmSUkBY6hwYuMWA","like_count":0,"published_time":"6 years ago"},{"id":"UgwKOA-UT5oAubzjPLd4AaABAg","text":"how to change the voice\nand name","author":"@ghi817","author_id":"UC4riCgJ98qtxKfPrT5syKNw","like_count":1,"published_time":"6 years ago"},{"id":"UgyNcC17oY8_0K5iw6N4AaABAg","text":"Thank you! do you have any idea about how can i make it response with own voice or like my record?","author":"@itsQyada","author_id":"UCTLiyqbzAHutUwOtJnBZNbQ","like_count":7,"published_time":"6 years ago"},{"id":"UgzS2UW7q2uFbrgOhi14AaABAg","text":"So what do you do with all those MP3s saved to your disk. I'm sure you can find a library to pass the Mp3 to your audio driver in memory.","author":"@gettyseccy","author_id":"UChMqdumjVJyOOu9LbybwAyQ","like_count":0,"published_time":"7 years ago"},{"id":"UgyQbVRZZL28yKvksX94AaABAg","text":"Its tricky! 12 ga nine. Seminole or see me know and I c stewey or front row seat peew.  I see things follow me to try and parallel its doing is it four horseman. Or superheros. Or coach cowboys. Dust sims ask or ash","author":"@thomasmartin5337","author_id":"UCbpdPgFeogHUW-Nk1zXjQxg","like_count":0,"published_time":"5 years ago"},{"id":"Ugz8j-noRtQbnn5JOqx4AaABAg","text":"hey i have a problem can you help me maybe out because i dont know what brevDict means and python gives me an invalid syntax error out if i start the programm. Nice video","author":"@lostboy5775","author_id":"UCMLmUwXHV-4K5Az0xrlykEQ","like_count":0,"published_time":"6 years ago"},{"id":"UgyM36CcF-QZmx4LgEd4AaABAg","text":"What programming language do u use??\nPlz reply plzz","author":"@jishabenoy3291","author_id":"UC1vY70SZEVgyLz9Exkgfn7Q","like_count":2,"published_time":"6 years ago"},{"id":"UgwNDmY66bol13O-pwh4AaABAg","text":"hey can any can  tell me on which software its is the python???","author":"@sfowsciencefactsoftheworld1105","author_id":"UCP01ce3ZmpgYo3i4tovV4VA","like_count":0,"published_time":"6 years ago"},{"id":"UgxXe1ojU9CYO_hUWvF4AaABAg","text":"Is the coding on Pycharm","author":"@infernosnake9916","author_id":"UCtCkzFyqqeLN1OmmvcR_Kpw","like_count":0,"published_time":"6 years ago"},{"id":"UgwgguvS2UnIqfLBDLF4AaABAg","text":"Guys the code is: from chatterbot import ChatBot\nfrom chatterbot.trainers import ListTrainer\nfrom chatterbot.trainers import ChatterBotCorpusTrainer\nimport speech_recognition as sr\nfrom gtts import gTTS\nimport os\nfrom time import localtime\n\n# Create a new chat bot named 'INSERT NAME'\nchatbot = ChatBot('INSERT NAME')\nchatbot.storage.drop()\n\ntrainer = ListTrainer(chatbot)\ntrainer.train(open(\"jarvisScript.txt\", \"r\").readlines())\n\n#trainer = ChatterBotCorpusTrainer(chatbot)\n#trainer.train('chatterbot.corpus.english')\n\n\n#define some key words\ntools = [\"saw\", \"screwdriver\", \"bolt\", \"screw\", \"hammer\", \"knife\", \"nail\"]\nbringWords = [\"bring\", \"get\", \"fetch\", \"grab\", \"have\", \"give\", \"hand\", \"pass\"]\nreturnWords = [\"return\", \"put away\", \"back\", \"put back\", \"put\", \"away\"]\nabusiveWords = ['dumb','suck','idiot'] #Make this list as colorful as you'd like\nnoResponseWords = ['okay', 'good', 'yes', 'wonderful', 'great', 'terrific', 'nice']\n\n# obtain audio from the microphone\nr = sr.Recognizer()\n\n#main loop\ndone = False\nwhile done == False:\n\t#Tracks whether a \"bring\" or \"return\" keyword was used, and whether a tool was mentioned\n\t_bring = False\n\t_return = False\n\t_tool = \"\"\n\t#Tracks whether abusive words were mentioned, or a command was given that does not warrant a response\n\t_abusive = False\n\t_noResponse = False\n\t#Tracks whether there was any conflict \n\tconflict = False\n\t#Stores the voice command\n\tcommand = \"\"\n\t\n\t\n\twith sr.Microphone() as source:\n\t\tprint(\"\\n\\n\\nSay something!\")\n\t\taudio = r.listen(source)\n\t\n\t# recognize speech using Google Speech Recognition\n\ttry:\n\t\t# for testing purposes, we're just using the default API key\n\t\t# to use another API key, use 'r.recognize_google(audio, key=\"GOOGLE_SPEECH_RECOGNITION_API_KEY\")'\n\t\t# instead of 'r.recognize_google(audio)'\n\t\tcommand = r.recognize_google(audio)\n\t\tprint(command)\n\texcept sr.UnknownValueError:\n\t\tprint(\"Speech Recognition could not understand audio\")\n\t\tcontinue\n\texcept sr.RequestError as e:\n\t\tprint(\"Could not request results from Speech Recognition service; {0}\".format(e))\n\t\tcontinue\n\t\n\n\n\t#command = input(\"\\nsay something! \\n\")\n\t\n\t#Checks for abusive language\n\tfor word in abusiveWords:\n\t\tif word in command.lower():\n\t\t\t_abusive = True\n\t\t\t\n\t#Checks for a command that does not warrant a response\n\tfor word in noResponseWords:\n\t\tif command.lower() == word:\n\t\t\t_noResponse = True\n\t\n\t#Checks for a tool word\n\tfor tool in tools:\n\t\tif tool in command.lower():\n\t\t\tif _tool == \"\":\n\t\t\t\t_tool = tool\n\t\t\telse:\n\t\t\t\t#Checks if one of the words is a subset of the other, and goes with the larger one\n\t\t\t\tif tool in _tool:\n\t\t\t\t\t_tool = _tool\n\t\t\t\telif _tool in tool:\n\t\t\t\t\t_tool = tool\n\t\t\t\telse:\n\t\t\t\t\tconflict = True\n\t\t\t\t\tprint(\"Two tools where mentioned\")\n\t\n\t#Checks for \"bring\" synonyms\n\tfor word in bringWords:\n\t\tif word in command.lower():\n\t\t\tif _return == False:\n\t\t\t\t_bring = True\n\t\t\telse:\n\t\t\t\tconflict = True\n\n\t#Checks for \"return\" synonyms\n\tfor word in returnWords:\n\t\tif word in command.lower():\n\t\t\tif _bring == False:\n\t\t\t\t_return = True\n\t\t\telse:\n\t\t\t\tconflict = True\n\t\t\t\t\n\t#print(_bring, _return, _tool)\n\t\n\t#Makes sure a tool was mentioned, and that there is a \"bring\" or \"return\" word\n\tif (_tool == \"\" or (_bring == False and _return == False)):\n\t\tconflict = True\n\t\n\t#Print response\n\tif \"shut down\" in command.lower():\n\t\tresponse = \"Shutting down\"\n\t\tdone = True\n\telif _noResponse == True:\n\t\tresponse = \"\"\n\telif \"thank\" in command.lower():\n\t\tresponse = \"you're welcome!\"\n\telif \"what time is it\" in command.lower():\n\t\thr = localtime()[3]\n\t\tmin = localtime()[4]\n\t\tif hr > 12:\n\t\t\thr = hr - 12\n\t\t\tampm = \"PM\"\n\t\telse:\n\t\t\tampm = \"AM\"\n\t\tresponse = \"It's \" + str(hr) + \" \" + str(min) + \" \" + ampm\n\t#Does conversions\n\telif command.lower().split(\" \")[0] == \"convert\": #convert 10 inches to meters\n\t\tconversionDict = {\"inches\":39.3701, \"feet\":3.2808, \n\t\t\t\t\t\t\t\"kilometers\":.001,\"meters\":1, \n\t\t\t\t\t\t\t\"decimeters\":10, \"centimeters\":100, \n\t\t\t\t\t\t\t\"millimeters\":1000, \"yards\":1.0936, \"miles\":0.0006213}\n\t\t\n\t\tbrevDict = {\"in\":\"inches\", \"inch\":\"inches\", \"inches\":\"inches\", \"ft\":\"feet\", \n\t\t\t\t\t\"foot\":\"feet\", \"feet\":\"feet\", \"km\":\"kilometers\", \"kilometer\":\"kilometers\", \n\t\t\t\t\t\"kilometers\":\"kilometers\", \"m\":\"meters\", \"meter\":\"meters\",\n\t\t\t\t\t\"meters\":\"meters\", \"dm\":\"decimeters\", \"decimeter\":\"decimeters\",\n\t\t\t\t\t\"decimeters\":\"decimeters\", \"cm\":\"centimeters\", \"centimeter\":\"centimters\",\n\t\t\t\t\t\"centimeters\":\"centimeters\", \"mm\":\"millimeters\", \"millimeter\":\"millimeters\",\n\t\t\t\t\t\"millimeters\":\"millimeters\", \"yd\":\"yards\", \"yard\":\"yards\",\n\t\t\t\t\t \"yards\":\"yards\", \"miles\":\"miles\", \"mile\":\"miles\"}\n\t\ttry:\n\t\t\tval = float(command.lower().split(\" \")[1])\n\t\t\tunit1 = brevDict[command.lower().split(\" \")[2]]\n\t\t\tunit2 = command.lower().split(\" \")[4]\n\t\t\t\t\t\t\n\t\t\tconversion = float(conversionDict[unit2]) / float(conversionDict[unit1])\n\t\t\tresponse = str(val) + \" \" + unit1 + \" equals \" + str(round(val*conversion,3)) + \"  \" + unit2\n\t\texcept:\n\t\t\tresponse = \"Sorry, I didn't understand that.\"\n\telif _abusive == True:\n\t\tresponse = \"Don't speak to me like that\"\n\telif conflict == False:\n\t\tif _bring == True:\n\t\t\tresponse = \"Okay, I'll bring you the \" + _tool\n\t\telif _return == True:\n\t\t\tresponse = \"Okay, I'll put the \" + _tool + \" away\"\n\t\telse:\n\t\t\tresponse = \"Error in the code, this should never happen\"\n\telse:\n\t\tresponse = str(chatbot.get_response(command))\n\t\t#response = \"Sorry, I didn't understand that.\"\n\t\n\t\n\t#Print and say the response\n\tprint(\"response: \" + response)\n\t\n\tif response != \"\":\n\t\ttts = gTTS(text=response, lang='en')\n\t\ttts.save(\"good.mp3\")\n\t\tos.system(\"afplay good.mp3\")\n\t\n\n©","author":"@joshuajurado939","author_id":"UCptb3rxxdYV_3oOMKYXw2fQ","like_count":1,"published_time":"6 years ago"},{"id":"UgwdbjbBszHYYY0e8u54AaABAg","text":"I love you 3000 any mcu fans?","author":"@davidstefanov821","author_id":"UClic47uYfvUXn-3q5-zuEhw","like_count":10,"published_time":"7 years ago"},{"id":"UgxFHGktnKaVGIXnMNJ4AaABAg","text":"This was fun to watch and super useful. I'm trying to write a program for mental math drills and your video is exactly what I need to get started. Thank you for sharing. 😊","author":"@BiancaAguglia","author_id":"UC492v9o4iR8hHEmuFi_tK0w","like_count":13,"published_time":"7 years ago"},{"id":"Ugy8JHg-v7-uG7xVU5R4AaABAg","text":"Hey Triggy! Great video! Thanks for sharing! Can you link the speaker and microphone you used for the Pi? Thanks again!","author":"@andresleonphoto","author_id":"UCfcu48OhHRQiIJ9ouv80otg","like_count":1,"published_time":"6 years ago"},{"id":"UgyQbVRZZL28yKvksX94AaABAg","text":"Its tricky! 12 ga nine. Seminole or see me know and I c stewey or front row seat peew.  I see things follow me to try and parallel its doing is it four horseman. Or superheros. Or coach cowboys. Dust sims ask or ash","author":"@thomasmartin5337","author_id":"UCbpdPgFeogHUW-Nk1zXjQxg","like_count":0,"published_time":"5 years ago"},{"id":"Ugz7B6Fqe0VAGxTwZ0l4AaABAg","text":"hey. Interesting video can you tell me what application do you used and what type of project it is?","author":"@tomson8780","author_id":"UCVuJu7_vBmSUkBY6hwYuMWA","like_count":0,"published_time":"6 years ago"},{"id":"UgzS2UW7q2uFbrgOhi14AaABAg","text":"So what do you do with all those MP3s saved to your disk. I'm sure you can find a library to pass the Mp3 to your audio driver in memory.","author":"@gettyseccy","author_id":"UChMqdumjVJyOOu9LbybwAyQ","like_count":0,"published_time":"7 years ago"},{"id":"UgyAC-P4U0XRr4JaTGx4AaABAg","text":"Which programm do you used?","author":"@einfacher2342","author_id":"UCiWTOyAaC5TcPEOwIQDF0jQ","like_count":1,"published_time":"4 years ago"},{"id":"Ugz8j-noRtQbnn5JOqx4AaABAg","text":"hey i have a problem can you help me maybe out because i dont know what brevDict means and python gives me an invalid syntax error out if i start the programm. Nice video","author":"@lostboy5775","author_id":"UCMLmUwXHV-4K5Az0xrlykEQ","like_count":0,"published_time":"6 years ago"},{"id":"UgwKOA-UT5oAubzjPLd4AaABAg","text":"how to change the voice\nand name","author":"@ghi817","author_id":"UC4riCgJ98qtxKfPrT5syKNw","like_count":1,"published_time":"6 years ago"},{"id":"UgxTLpCpJj5lplK9QQh4AaABAg","text":"Yo that’s insane Jarvis \n\n\n\n\n- FAZE Kay","author":"@Jamal-cn7zl","author_id":"UCr2TLvw4mt17zoSDA-wspKA","like_count":6,"published_time":"7 years ago"},{"id":"UgwTqOEP0OWsK1nexvx4AaABAg","text":"you just got a subscriber :)","author":"@outdated7742","author_id":"UCzLtkmAgcsmzHAbgOPEg3fw","like_count":5,"published_time":"6 years ago"},{"id":"UgyIxd4DpOPEHDkOor14AaABAg","text":"we need a remake!","author":"@luizcavassola","author_id":"UCJBGEK-wB9gIyQiBtcBhmAQ","like_count":0,"published_time":"6 months ago"},{"id":"UgyVlx5fBeFaAIu8nmR4AaABAg","text":"i also subscribe","author":"@sfowsciencefactsoftheworld1105","author_id":"UCP01ce3ZmpgYo3i4tovV4VA","like_count":0,"published_time":"6 years ago"},{"id":"UgyNcC17oY8_0K5iw6N4AaABAg","text":"Thank you! do you have any idea about how can i make it response with own voice or like my record?","author":"@itsQyada","author_id":"UCTLiyqbzAHutUwOtJnBZNbQ","like_count":7,"published_time":"6 years ago"},{"id":"UgyFwGxV2r8_GMtwycR4AaABAg","text":"You were nice and funny, and I loved the video. Subscribed!","author":"@BlackTiger3645","author_id":"UCpYZqZD0cppfEaMflpB8BIg","like_count":4,"published_time":"7 years ago"},{"id":"UgzXCp7naI71mOxsD5N4AaABAg","text":"Lol! The dinosaurs did this long back!","author":"@thenorthstarwithin","author_id":"UCMVPwc8U0z3jHRyBDN_f8TA","like_count":0,"published_time":"7 years ago"},{"id":"UgwNDmY66bol13O-pwh4AaABAg","text":"hey can any can  tell me on which software its is the python???","author":"@sfowsciencefactsoftheworld1105","author_id":"UCP01ce3ZmpgYo3i4tovV4VA","like_count":0,"published_time":"6 years ago"},{"id":"UgyM36CcF-QZmx4LgEd4AaABAg","text":"What programming language do u use??\nPlz reply plzz","author":"@jishabenoy3291","author_id":"UC1vY70SZEVgyLz9Exkgfn7Q","like_count":2,"published_time":"6 years ago"},{"id":"UgxXe1ojU9CYO_hUWvF4AaABAg","text":"Is the coding on Pycharm","author":"@infernosnake9916","author_id":"UCtCkzFyqqeLN1OmmvcR_Kpw","like_count":0,"published_time":"6 years ago"},{"id":"UgwdbjbBszHYYY0e8u54AaABAg","text":"I love you 3000 any mcu fans?","author":"@davidstefanov821","author_id":"UClic47uYfvUXn-3q5-zuEhw","like_count":10,"published_time":"7 years ago"},{"id":"UgxFHGktnKaVGIXnMNJ4AaABAg","text":"This was fun to watch and super useful. I'm trying to write a program for mental math drills and your video is exactly what I need to get started. Thank you for sharing. 😊","author":"@BiancaAguglia","author_id":"UC492v9o4iR8hHEmuFi_tK0w","like_count":13,"published_time":"7 years ago"},{"id":"UgxTLpCpJj5lplK9QQh4AaABAg","text":"Yo that’s insane Jarvis \n\n\n\n\n- FAZE Kay","author":"@Jamal-cn7zl","author_id":"UCr2TLvw4mt17zoSDA-wspKA","like_count":6,"published_time":"7 years ago"},{"id":"UgyIxd4DpOPEHDkOor14AaABAg","text":"we need a remake!","author":"@luizcavassola","author_id":"UCJBGEK-wB9gIyQiBtcBhmAQ","like_count":0,"published_time":"6 months ago"},{"id":"UgwgguvS2UnIqfLBDLF4AaABAg","text":"Guys the code is: from chatterbot import ChatBot\nfrom chatterbot.trainers import ListTrainer\nfrom chatterbot.trainers import ChatterBotCorpusTrainer\nimport speech_recognition as sr\nfrom gtts import gTTS\nimport os\nfrom time import localtime\n\n# Create a new chat bot named 'INSERT NAME'\nchatbot = ChatBot('INSERT NAME')\nchatbot.storage.drop()\n\ntrainer = ListTrainer(chatbot)\ntrainer.train(open(\"jarvisScript.txt\", \"r\").readlines())\n\n#trainer = ChatterBotCorpusTrainer(chatbot)\n#trainer.train('chatterbot.corpus.english')\n\n\n#define some key words\ntools = [\"saw\", \"screwdriver\", \"bolt\", \"screw\", \"hammer\", \"knife\", \"nail\"]\nbringWords = [\"bring\", \"get\", \"fetch\", \"grab\", \"have\", \"give\", \"hand\", \"pass\"]\nreturnWords = [\"return\", \"put away\", \"back\", \"put back\", \"put\", \"away\"]\nabusiveWords = ['dumb','suck','idiot'] #Make this list as colorful as you'd like\nnoResponseWords = ['okay', 'good', 'yes', 'wonderful', 'great', 'terrific', 'nice']\n\n# obtain audio from the microphone\nr = sr.Recognizer()\n\n#main loop\ndone = False\nwhile done == False:\n\t#Tracks whether a \"bring\" or \"return\" keyword was used, and whether a tool was mentioned\n\t_bring = False\n\t_return = False\n\t_tool = \"\"\n\t#Tracks whether abusive words were mentioned, or a command was given that does not warrant a response\n\t_abusive = False\n\t_noResponse = False\n\t#Tracks whether there was any conflict \n\tconflict = False\n\t#Stores the voice command\n\tcommand = \"\"\n\t\n\t\n\twith sr.Microphone() as source:\n\t\tprint(\"\\n\\n\\nSay something!\")\n\t\taudio = r.listen(source)\n\t\n\t# recognize speech using Google Speech Recognition\n\ttry:\n\t\t# for testing purposes, we're just using the default API key\n\t\t# to use another API key, use 'r.recognize_google(audio, key=\"GOOGLE_SPEECH_RECOGNITION_API_KEY\")'\n\t\t# instead of 'r.recognize_google(audio)'\n\t\tcommand = r.recognize_google(audio)\n\t\tprint(command)\n\texcept sr.UnknownValueError:\n\t\tprint(\"Speech Recognition could not understand audio\")\n\t\tcontinue\n\texcept sr.RequestError as e:\n\t\tprint(\"Could not request results from Speech Recognition service; {0}\".format(e))\n\t\tcontinue\n\t\n\n\n\t#command = input(\"\\nsay something! \\n\")\n\t\n\t#Checks for abusive language\n\tfor word in abusiveWords:\n\t\tif word in command.lower():\n\t\t\t_abusive = True\n\t\t\t\n\t#Checks for a command that does not warrant a response\n\tfor word in noResponseWords:\n\t\tif command.lower() == word:\n\t\t\t_noResponse = True\n\t\n\t#Checks for a tool word\n\tfor tool in tools:\n\t\tif tool in command.lower():\n\t\t\tif _tool == \"\":\n\t\t\t\t_tool = tool\n\t\t\telse:\n\t\t\t\t#Checks if one of the words is a subset of the other, and goes with the larger one\n\t\t\t\tif tool in _tool:\n\t\t\t\t\t_tool = _tool\n\t\t\t\telif _tool in tool:\n\t\t\t\t\t_tool = tool\n\t\t\t\telse:\n\t\t\t\t\tconflict = True\n\t\t\t\t\tprint(\"Two tools where mentioned\")\n\t\n\t#Checks for \"bring\" synonyms\n\tfor word in bringWords:\n\t\tif word in command.lower():\n\t\t\tif _return == False:\n\t\t\t\t_bring = True\n\t\t\telse:\n\t\t\t\tconflict = True\n\n\t#Checks for \"return\" synonyms\n\tfor word in returnWords:\n\t\tif word in command.lower():\n\t\t\tif _bring == False:\n\t\t\t\t_return = True\n\t\t\telse:\n\t\t\t\tconflict = True\n\t\t\t\t\n\t#print(_bring, _return, _tool)\n\t\n\t#Makes sure a tool was mentioned, and that there is a \"bring\" or \"return\" word\n\tif (_tool == \"\" or (_bring == False and _return == False)):\n\t\tconflict = True\n\t\n\t#Print response\n\tif \"shut down\" in command.lower():\n\t\tresponse = \"Shutting down\"\n\t\tdone = True\n\telif _noResponse == True:\n\t\tresponse = \"\"\n\telif \"thank\" in command.lower():\n\t\tresponse = \"you're welcome!\"\n\telif \"what time is it\" in command.lower():\n\t\thr = localtime()[3]\n\t\tmin = localtime()[4]\n\t\tif hr > 12:\n\t\t\thr = hr - 12\n\t\t\tampm = \"PM\"\n\t\telse:\n\t\t\tampm = \"AM\"\n\t\tresponse = \"It's \" + str(hr) + \" \" + str(min) + \" \" + ampm\n\t#Does conversions\n\telif command.lower().split(\" \")[0] == \"convert\": #convert 10 inches to meters\n\t\tconversionDict = {\"inches\":39.3701, \"feet\":3.2808, \n\t\t\t\t\t\t\t\"kilometers\":.001,\"meters\":1, \n\t\t\t\t\t\t\t\"decimeters\":10, \"centimeters\":100, \n\t\t\t\t\t\t\t\"millimeters\":1000, \"yards\":1.0936, \"miles\":0.0006213}\n\t\t\n\t\tbrevDict = {\"in\":\"inches\", \"inch\":\"inches\", \"inches\":\"inches\", \"ft\":\"feet\", \n\t\t\t\t\t\"foot\":\"feet\", \"feet\":\"feet\", \"km\":\"kilometers\", \"kilometer\":\"kilometers\", \n\t\t\t\t\t\"kilometers\":\"kilometers\", \"m\":\"meters\", \"meter\":\"meters\",\n\t\t\t\t\t\"meters\":\"meters\", \"dm\":\"decimeters\", \"decimeter\":\"decimeters\",\n\t\t\t\t\t\"decimeters\":\"decimeters\", \"cm\":\"centimeters\", \"centimeter\":\"centimters\",\n\t\t\t\t\t\"centimeters\":\"centimeters\", \"mm\":\"millimeters\", \"millimeter\":\"millimeters\",\n\t\t\t\t\t\"millimeters\":\"millimeters\", \"yd\":\"yards\", \"yard\":\"yards\",\n\t\t\t\t\t \"yards\":\"yards\", \"miles\":\"miles\", \"mile\":\"miles\"}\n\t\ttry:\n\t\t\tval = float(command.lower().split(\" \")[1])\n\t\t\tunit1 = brevDict[command.lower().split(\" \")[2]]\n\t\t\tunit2 = command.lower().split(\" \")[4]\n\t\t\t\t\t\t\n\t\t\tconversion = float(conversionDict[unit2]) / float(conversionDict[unit1])\n\t\t\tresponse = str(val) + \" \" + unit1 + \" equals \" + str(round(val*conversion,3)) + \"  \" + unit2\n\t\texcept:\n\t\t\tresponse = \"Sorry, I didn't understand that.\"\n\telif _abusive == True:\n\t\tresponse = \"Don't speak to me like that\"\n\telif conflict == False:\n\t\tif _bring == True:\n\t\t\tresponse = \"Okay, I'll bring you the \" + _tool\n\t\telif _return == True:\n\t\t\tresponse = \"Okay, I'll put the \" + _tool + \" away\"\n\t\telse:\n\t\t\tresponse = \"Error in the code, this should never happen\"\n\telse:\n\t\tresponse = str(chatbot.get_response(command))\n\t\t#response = \"Sorry, I didn't understand that.\"\n\t\n\t\n\t#Print and say the response\n\tprint(\"response: \" + response)\n\t\n\tif response != \"\":\n\t\ttts = gTTS(text=response, lang='en')\n\t\ttts.save(\"good.mp3\")\n\t\tos.system(\"afplay good.mp3\")\n\t\n\n©","author":"@joshuajurado939","author_id":"UCptb3rxxdYV_3oOMKYXw2fQ","like_count":1,"published_time":"6 years ago"},{"id":"UgyNcC17oY8_0K5iw6N4AaABAg","text":"Thank you! do you have any idea about how can i make it response with own voice or like my record?","author":"@itsQyada","author_id":"UCTLiyqbzAHutUwOtJnBZNbQ","like_count":7,"published_time":"6 years ago"},{"id":"Ugy8JHg-v7-uG7xVU5R4AaABAg","text":"Hey Triggy! Great video! Thanks for sharing! Can you link the speaker and microphone you used for the Pi? Thanks again!","author":"@andresleonphoto","author_id":"UCfcu48OhHRQiIJ9ouv80otg","like_count":1,"published_time":"6 years ago"},{"id":"UgyAC-P4U0XRr4JaTGx4AaABAg","text":"Which programm do you used?","author":"@einfacher2342","author_id":"UCiWTOyAaC5TcPEOwIQDF0jQ","like_count":1,"published_time":"4 years ago"},{"id":"UgyFwGxV2r8_GMtwycR4AaABAg","text":"You were nice and funny, and I loved the video. Subscribed!","author":"@BlackTiger3645","author_id":"UCpYZqZD0cppfEaMflpB8BIg","like_count":4,"published_time":"7 years ago"},{"id":"UgzS2UW7q2uFbrgOhi14AaABAg","text":"So what do you do with all those MP3s saved to your disk. I'm sure you can find a library to pass the Mp3 to your audio driver in memory.","author":"@gettyseccy","author_id":"UChMqdumjVJyOOu9LbybwAyQ","like_count":0,"published_time":"7 years ago"},{"id":"Ugz7B6Fqe0VAGxTwZ0l4AaABAg","text":"hey. Interesting video can you tell me what application do you used and what type of project it is?","author":"@tomson8780","author_id":"UCVuJu7_vBmSUkBY6hwYuMWA","like_count":0,"published_time":"6 years ago"},{"id":"UgzXCp7naI71mOxsD5N4AaABAg","text":"Lol! The dinosaurs did this long back!","author":"@thenorthstarwithin","author_id":"UCMVPwc8U0z3jHRyBDN_f8TA","like_count":0,"published_time":"7 years ago"},{"id":"Ugz8j-noRtQbnn5JOqx4AaABAg","text":"hey i have a problem can you help me maybe out because i dont know what brevDict means and python gives me an invalid syntax error out if i start the programm. Nice video","author":"@lostboy5775","author_id":"UCMLmUwXHV-4K5Az0xrlykEQ","like_count":0,"published_time":"6 years ago"},{"id":"UgwKOA-UT5oAubzjPLd4AaABAg","text":"how to change the voice\nand name","author":"@ghi817","author_id":"UC4riCgJ98qtxKfPrT5syKNw","like_count":1,"published_time":"6 years ago"},{"id":"UgwNDmY66bol13O-pwh4AaABAg","text":"hey can any can  tell me on which software its is the python???","author":"@sfowsciencefactsoftheworld1105","author_id":"UCP01ce3ZmpgYo3i4tovV4VA","like_count":0,"published_time":"6 years ago"},{"id":"UgwTqOEP0OWsK1nexvx4AaABAg","text":"you just got a subscriber :)","author":"@outdated7742","author_id":"UCzLtkmAgcsmzHAbgOPEg3fw","like_count":5,"published_time":"6 years ago"},{"id":"UgyQbVRZZL28yKvksX94AaABAg","text":"Its tricky! 12 ga nine. Seminole or see me know and I c stewey or front row seat peew.  I see things follow me to try and parallel its doing is it four horseman. Or superheros. Or coach cowboys. Dust sims ask or ash","author":"@thomasmartin5337","author_id":"UCbpdPgFeogHUW-Nk1zXjQxg","like_count":0,"published_time":"5 years ago"},{"id":"UgyVlx5fBeFaAIu8nmR4AaABAg","text":"i also subscribe","author":"@sfowsciencefactsoftheworld1105","author_id":"UCP01ce3ZmpgYo3i4tovV4VA","like_count":0,"published_time":"6 years ago"},{"id":"UgyM36CcF-QZmx4LgEd4AaABAg","text":"What programming language do u use??\nPlz reply plzz","author":"@jishabenoy3291","author_id":"UC1vY70SZEVgyLz9Exkgfn7Q","like_count":2,"published_time":"6 years ago"},{"id":"UgxXe1ojU9CYO_hUWvF4AaABAg","text":"Is the coding on Pycharm","author":"@infernosnake9916","author_id":"UCtCkzFyqqeLN1OmmvcR_Kpw","like_count":0,"published_time":"6 years ago"}]}