title
Build A Python Speech Assistant App
description
In this video we will build a speech assistant app using the speech regonition library and Google's text-to-speech API.
Download Kite free:
https://kite.com/download/?utm_medium=referral&utm_source=youtube&utm_campaign=TechGuyWeb&utm_content=speech-assistant-tutorial
Code:
https://github.com/bradtraversy/alexis_speech_assistant
💖 Become a Patron: Show support & get perks!
http://www.patreon.com/traversymedia
Website & Udemy Course Links:
https://www.traversymedia.com
Follow Traversy Media:
https://www.twitter.com/traversymedia
https://www.instagram.com/traversymedia
https://www.facebook.com/traversymedia
detail
{'title': 'Build A Python Speech Assistant App', 'heatmap': [{'end': 130.696, 'start': 80.164, 'weight': 0.799}, {'end': 195.549, 'start': 177.079, 'weight': 0.855}, {'end': 824.263, 'start': 795.326, 'weight': 0.892}, {'end': 1207.719, 'start': 1166.689, 'weight': 0.706}], 'summary': 'Tutorial demonstrates building a python speech assistant app using kite, showcasing voice commands for name inquiry, google search, and map location finding. it covers setting up a virtual environment, implementing speech recognition, voice recognition and response, voice-controlled web and map search, and text-to-speech in python.', 'chapters': [{'end': 63.181, 'segs': [{'end': 45.532, 'src': 'embed', 'start': 7.042, 'weight': 0, 'content': [{'end': 8.864, 'text': 'hey guys, this video is sponsored by kite,', 'start': 7.042, 'duration': 1.822}, {'end': 17.031, 'text': 'which is a python plugin for editors and ides that gives you intelligent snippets and an integrated documentation tool called copilot.', 'start': 8.864, 'duration': 8.167}, {'end': 24.857, 'text': "that'll let you know all about specific classes and methods and more, and i'll actually be using the vs code extension and copilot in this tutorial.", 'start': 17.031, 'duration': 7.826}, {'end': 25.338, 'text': "it's free.", 'start': 24.857, 'duration': 0.481}, {'end': 26.459, 'text': "it's extremely helpful.", 'start': 25.338, 'duration': 1.121}, {'end': 30.742, 'text': 'so click on the link in the description below to find out more and download kite.', 'start': 26.459, 'duration': 4.283}, {'end': 32.304, 'text': "Hey, what's going on, guys?", 'start': 31.423, 'duration': 0.881}, {'end': 39.228, 'text': "So in this video we're going to build a speech assistant application with Python and we're going to use the speech recognition library.", 'start': 32.323, 'duration': 6.905}, {'end': 45.532, 'text': "We're going to use Google text to speech so that it can actually talk back to us along with some other packages as well.", 'start': 39.248, 'duration': 6.284}], 'summary': 'Kite, a python plugin, offers intelligent snippets and integrated documentation. vs code extension and copilot used in tutorial. free and helpful.', 'duration': 38.49, 'max_score': 7.042, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc7042.jpg'}], 'start': 7.042, 'title': 'Building speech assistant with python', 'summary': 'Introduces kite, a python plugin for editors and ides, and demonstrates the use of speech recognition and google text-to-speech in building a speech assistant application with python. it enables voice commands such as asking for name, searching on google, and finding a location on a map.', 'chapters': [{'end': 63.181, 'start': 7.042, 'title': 'Build speech assistant with python', 'summary': 'Introduces kite, a python plugin for editors and ides, and demonstrates the use of speech recognition and google text-to-speech in building a speech assistant application with python, enabling voice commands like asking for name, searching on google, and finding a location on a map.', 'duration': 56.139, 'highlights': ['The video is sponsored by Kite, a Python plugin for editors and IDEs that provides intelligent snippets and an integrated documentation tool called Copilot, which is free and extremely helpful.', 'The tutorial focuses on building a speech assistant application with Python using the speech recognition library and Google text-to-speech, enabling voice commands for various tasks such as asking for a name, searching on Google, and finding a location on a map.']}], 'duration': 56.139, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc7042.jpg', 'highlights': ['The tutorial focuses on building a speech assistant application with Python using the speech recognition library and Google text-to-speech, enabling voice commands for various tasks such as asking for a name, searching on Google, and finding a location on a map.', 'The video is sponsored by Kite, a Python plugin for editors and IDEs that provides intelligent snippets and an integrated documentation tool called Copilot, which is free and extremely helpful.']}, {'end': 487.749, 'segs': [{'end': 136.421, 'src': 'heatmap', 'start': 63.221, 'weight': 0, 'content': [{'end': 67.922, 'text': 'I have this code open, just an empty folder called Alexis Speech Assistant.', 'start': 63.221, 'duration': 4.701}, {'end': 69.902, 'text': 'And down here I have my terminal.', 'start': 68.562, 'duration': 1.34}, {'end': 77.043, 'text': "And the first thing I'm going to do is just set up a virtual environment where usually I usually use PIP ENV, but it's been giving me some issues.", 'start': 70.242, 'duration': 6.801}, {'end': 79.804, 'text': "So I'm just going to use virtual and virtual ENV.", 'start': 77.083, 'duration': 2.721}, {'end': 86.905, 'text': "So if I say Python three dash M VENV and then create a folder, I'll call it VENV as well.", 'start': 80.164, 'duration': 6.741}, {'end': 89.72, 'text': 'And you can see that that folder got created.', 'start': 87.717, 'duration': 2.003}, {'end': 92.804, 'text': "And then in this bin folder, there's an activate script.", 'start': 89.9, 'duration': 2.904}, {'end': 95.608, 'text': 'So we want to call that to activate our virtual environment.', 'start': 92.964, 'duration': 2.644}, {'end': 97.23, 'text': "So we'll just do source.", 'start': 96.028, 'duration': 1.202}, {'end': 101.897, 'text': "And that's going to be in venv slash bin.", 'start': 97.751, 'duration': 4.146}, {'end': 105.339, 'text': 'slash and then activate.', 'start': 103.678, 'duration': 1.661}, {'end': 107.661, 'text': 'okay, so now that should be activated.', 'start': 105.339, 'duration': 2.322}, {'end': 111.043, 'text': 'so we need to select an interpreter in VS code.', 'start': 107.661, 'duration': 3.382}, {'end': 118.708, 'text': 'so if we do command shift P and you just search for Python and select interpreter, see this right here, this venv.', 'start': 111.043, 'duration': 7.665}, {'end': 120.929, 'text': "I'm going to choose that and now we should be all set.", 'start': 118.708, 'duration': 2.221}, {'end': 125.712, 'text': "and if you want to use pip, bnv or you don't want to use virtual environments or whatever, that's fine too.", 'start': 120.929, 'duration': 4.783}, {'end': 130.696, 'text': "So now that we're set up, let's install a couple dependencies that we're going to need.", 'start': 126.512, 'duration': 4.184}, {'end': 136.421, 'text': "So we're going to use pip install, and it's going to be speech recognition, all one word.", 'start': 130.776, 'duration': 5.645}], 'summary': 'Setting up virtual environment using python 3 and installing speech recognition dependency.', 'duration': 73.2, 'max_score': 63.221, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc63221.jpg'}, {'end': 173.578, 'src': 'embed', 'start': 130.776, 'weight': 1, 'content': [{'end': 136.421, 'text': "So we're going to use pip install, and it's going to be speech recognition, all one word.", 'start': 130.776, 'duration': 5.645}, {'end': 142.926, 'text': "And this is a library that we'll be using, and I have the documentation here.", 'start': 137.922, 'duration': 5.004}, {'end': 148.471, 'text': "So it's a library for performing speech recognition with support for several engines and APIs.", 'start': 143.466, 'duration': 5.005}, {'end': 152.033, 'text': "And the API we'll be using is the Google Speech Recognition API.", 'start': 148.891, 'duration': 3.142}, {'end': 160.056, 'text': "There's some others as well, like Google Cloud Speech, Wit.ai, Microsoft Bing, Sphinx, which works offline.", 'start': 152.734, 'duration': 7.322}, {'end': 163.636, 'text': "So there are there's some other ones as well, but we'll be using the Google one.", 'start': 160.096, 'duration': 3.54}, {'end': 166.217, 'text': "OK, and then there's a.", 'start': 164.376, 'duration': 1.841}, {'end': 173.578, 'text': "there's a requirement or a dependency that we need called Pi Audio, where you only need this if you're actually using the microphone, which we are,", 'start': 166.217, 'duration': 7.361}], 'summary': 'Using speech recognition library for google speech recognition api with pi audio dependency for microphone usage', 'duration': 42.802, 'max_score': 130.776, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc130776.jpg'}, {'end': 205.876, 'src': 'heatmap', 'start': 177.079, 'weight': 0.855, 'content': [{'end': 182.715, 'text': "But since we're using the microphone, we need to pip install Pie audio.", 'start': 177.079, 'duration': 5.636}, {'end': 188.865, 'text': "And then there's some other stuff we're going to need later on, but that's it for now.", 'start': 185.362, 'duration': 3.503}, {'end': 195.549, 'text': "So let's just create a file, I'll call it main.py, and then we'll open up main.py.", 'start': 189.325, 'duration': 6.224}, {'end': 201.133, 'text': "So first thing I'm going to do here is import the speech recognition library,", 'start': 196.75, 'duration': 4.383}, {'end': 205.876, 'text': "so it's going to be speech underscore recognition and we're going to say as sr", 'start': 201.133, 'duration': 4.743}], 'summary': "Using microphone requires 'pip install pie audio', and importing speech recognition library as 'sr'.", 'duration': 28.797, 'max_score': 177.079, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc177079.jpg'}, {'end': 369.305, 'src': 'embed', 'start': 338.292, 'weight': 4, 'content': [{'end': 344.439, 'text': "Now I'm going to show you a couple of things with the kite extension that I'm using, which comes with a really cool,", 'start': 338.292, 'duration': 6.147}, {'end': 350.045, 'text': 'uh integrated documentation program called copilot.', 'start': 345.86, 'duration': 4.185}, {'end': 356.031, 'text': 'so if we want to look at, like um recognizer, notice how, when i hover over it, we get this docs.', 'start': 350.045, 'duration': 5.986}, {'end': 361.617, 'text': "if i click on that, it'll open up kites copilot and it'll show us all the methods and stuff like that.", 'start': 356.031, 'duration': 5.586}, {'end': 369.305, 'text': 'you can see the listen method right here gives us all the different arguments or possible arguments, Tells us what it is.', 'start': 361.617, 'duration': 7.688}], 'summary': 'Demonstration of kite extension with integrated copilot documentation program for code methods and arguments.', 'duration': 31.013, 'max_score': 338.292, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc338292.jpg'}], 'start': 63.221, 'title': 'Setting up virtual environment and implementing speech recognition with python', 'summary': "Details setting up a virtual environment using python 3 venv, activating it, selecting an interpreter in vs code, and installing necessary dependencies. it also covers using the speech recognition library to capture and print voice data from a microphone, and demonstrates handling unknown value and request errors when using google's speech recognition api.", 'chapters': [{'end': 130.696, 'start': 63.221, 'title': 'Setting up virtual environment and installing dependencies', 'summary': 'Details the process of setting up a virtual environment using python 3 venv, activating it, selecting an interpreter in vs code, and installing necessary dependencies for a project.', 'duration': 67.475, 'highlights': ['The process of setting up a virtual environment using Python 3 VENV and activating it is explained, along with the creation of a folder and selecting an interpreter in VS code.', 'The speaker encounters issues with PIP ENV and opts to use virtual and virtual ENV for setting up the virtual environment.', "The speaker suggests the option of using pip, bnv, or not using virtual environments for the project's setup."]}, {'end': 487.749, 'start': 130.776, 'title': 'Implementing speech recognition with python', 'summary': "Covers using the speech recognition library to capture and print voice data from a microphone, and demonstrates handling unknown value and request errors when using google's speech recognition api.", 'duration': 356.973, 'highlights': ['The library used for performing speech recognition supports several engines and APIs, with the Google Speech Recognition API being the one implemented. The speech recognition library supports multiple engines and APIs, with the Google Speech Recognition API being the one used.', 'The requirement for Pi Audio is necessary when using a microphone for speech recognition. Pi Audio is a requirement when using a microphone for speech recognition.', 'Demonstrating the use of the speech recognition library to capture voice data from a microphone and print it in the console. The demonstration involves capturing voice data from a microphone and printing it in the console.', 'Showing the use of the Kite extension and its integrated documentation program, Copilot, to explore methods and handle exceptions for speech recognition. The demonstration showcases the use of the Kite extension and its integrated documentation program, Copilot, to explore methods and handle exceptions for speech recognition.']}], 'duration': 424.528, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc63221.jpg', 'highlights': ['The process of setting up a virtual environment using Python 3 VENV and activating it is explained, along with the creation of a folder and selecting an interpreter in VS code.', 'The library used for performing speech recognition supports several engines and APIs, with the Google Speech Recognition API being the one implemented.', 'The speaker encounters issues with PIP ENV and opts to use virtual and virtual ENV for setting up the virtual environment.', 'The requirement for Pi Audio is necessary when using a microphone for speech recognition.', 'Showing the use of the Kite extension and its integrated documentation program, Copilot, to explore methods and handle exceptions for speech recognition.']}, {'end': 711.745, 'segs': [{'end': 585.32, 'src': 'embed', 'start': 555.99, 'weight': 1, 'content': [{'end': 564.115, 'text': "So we'll say, how can I help you? And then let's create our variable down here, voice data and set that to record audio.", 'start': 555.99, 'duration': 8.125}, {'end': 571.729, 'text': "record audio and we'll go ahead and print it out here.", 'start': 566.444, 'duration': 5.285}, {'end': 573.55, 'text': 'So print voice data.', 'start': 572.269, 'duration': 1.281}, {'end': 578.114, 'text': "I'm not going to leave this print here, but I just want to make sure that this still works.", 'start': 574.551, 'duration': 3.563}, {'end': 579.795, 'text': "So we'll run it.", 'start': 579.135, 'duration': 0.66}, {'end': 585.32, 'text': 'What is your name? There we go.', 'start': 581.297, 'duration': 4.023}], 'summary': 'Code records and prints voice data for user input.', 'duration': 29.33, 'max_score': 555.99, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc555990.jpg'}, {'end': 711.745, 'src': 'embed', 'start': 606.311, 'weight': 0, 'content': [{'end': 612.335, 'text': "So I'm going to create a function called respond and we're going to pass in that voice data.", 'start': 606.311, 'duration': 6.024}, {'end': 615.178, 'text': "OK, so we'll create that function up here.", 'start': 612.356, 'duration': 2.822}, {'end': 619.561, 'text': 'Define respond, which takes in voice data.', 'start': 615.238, 'duration': 4.323}, {'end': 622.698, 'text': "OK, and we'll say if.", 'start': 621.718, 'duration': 0.98}, {'end': 628.661, 'text': "And let's do what is your name.", 'start': 624.919, 'duration': 3.742}, {'end': 633.143, 'text': 'if that is in the voice data, then for now we have.', 'start': 628.661, 'duration': 4.482}, {'end': 636.924, 'text': "we don't have the actual speak functionality yet, so we'll just print it out.", 'start': 633.143, 'duration': 3.781}, {'end': 642.727, 'text': "So we'll print out my name is Alexis or whatever.", 'start': 637.325, 'duration': 5.402}, {'end': 648.461, 'text': "I'm surprised my A-L-E-X-A isn't going off when I say this.", 'start': 643.717, 'duration': 4.744}, {'end': 651.183, 'text': "All right, so let's try this out.", 'start': 649.261, 'duration': 1.922}, {'end': 652.984, 'text': 'Clear this up.', 'start': 652.344, 'duration': 0.64}, {'end': 658.404, 'text': 'What is your name? And there we go.', 'start': 654.605, 'duration': 3.799}, {'end': 659.944, 'text': 'So we get my name is Alexis.', 'start': 658.484, 'duration': 1.46}, {'end': 661.685, 'text': 'OK, cool.', 'start': 660.965, 'duration': 0.72}, {'end': 666.986, 'text': "So let's actually have Alexis tell us the time.", 'start': 662.985, 'duration': 4.001}, {'end': 673.947, 'text': "So up here, let's bring in we'll say from time import see time.", 'start': 667.126, 'duration': 6.821}, {'end': 678.588, 'text': "And let's have another if statement here.", 'start': 674.987, 'duration': 3.601}, {'end': 689.233, 'text': "So we'll say if what no, what time is it? is in our voice data.", 'start': 679.208, 'duration': 10.025}, {'end': 692.759, 'text': "then let's print out see time.", 'start': 689.233, 'duration': 3.526}, {'end': 697.848, 'text': "okay, so we'll try that.", 'start': 692.759, 'duration': 5.089}, {'end': 698.569, 'text': 'what time is it?', 'start': 697.848, 'duration': 0.721}, {'end': 704.042, 'text': 'OK, so it actually prints out the date and the time.', 'start': 701.301, 'duration': 2.741}, {'end': 709.004, 'text': 'I mean, if you want to format it, you can or if you want to change it to like what is the date, you could do that.', 'start': 704.062, 'duration': 4.942}, {'end': 711.745, 'text': "But I think that that's fine for this.", 'start': 709.424, 'duration': 2.321}], 'summary': 'Creating a function to respond to voice commands, such as stating name and asking for the time.', 'duration': 105.434, 'max_score': 606.311, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc606311.jpg'}], 'start': 487.769, 'title': 'Voice recognition and response with python', 'summary': 'Covers defining functions for recording audio, capturing voice data, and creating response functions for voice commands, aiming to enable voice recognition. it also demonstrates creating a voice recognition program in python, exemplifying voice commands and responses with examples of printing a name and retrieving the current time.', 'chapters': [{'end': 636.924, 'start': 487.769, 'title': 'Speech recognition and response', 'summary': 'Covers the process of defining functions to record audio, capturing voice data, and creating a response function for voice commands, aiming to enable voice recognition and response functionality.', 'duration': 149.155, 'highlights': ["Functions 'record audio' and 'respond' are defined to encapsulate the process of capturing voice data and generating responses.", "The program successfully captures voice data and prints it, showcasing the functionality of the 'record audio' function.", 'The need to store the voice data in a variable and the intention to develop voice command functionality are key points in the transcript.']}, {'end': 711.745, 'start': 637.325, 'title': 'Creating voice recognition with python', 'summary': "Demonstrates creating a voice recognition program in python, using the example of printing out a name and retrieving the current time by utilizing the 'time' module, exemplifying the functionality of voice commands and responses.", 'duration': 74.42, 'highlights': ["The program prints out the name 'Alexis' and demonstrates the responsiveness of the voice recognition system to the name 'Alexa'.", "It showcases the use of 'time' module to retrieve and print the current date and time based on the user's voice command.", 'The demonstration emphasizes the flexibility to customize voice commands and responses, such as formatting the date and time based on user preferences.']}], 'duration': 223.976, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc487769.jpg', 'highlights': ["Functions 'record audio' and 'respond' encapsulate capturing voice data and generating responses.", "Program successfully captures voice data and prints it, showcasing 'record audio' function.", 'Need to store voice data in a variable and develop voice command functionality are key points.', "Program prints out the name 'Alexis' and demonstrates responsiveness to the name 'Alexa'.", "Showcases use of 'time' module to retrieve and print current date and time based on user's voice command.", 'Emphasizes flexibility to customize voice commands and responses, such as formatting date and time based on user preferences.']}, {'end': 1126.516, 'segs': [{'end': 795.266, 'src': 'embed', 'start': 741.641, 'weight': 0, 'content': [{'end': 744.043, 'text': "And notice I didn't put like a variable here or anything.", 'start': 741.641, 'duration': 2.402}, {'end': 752.128, 'text': 'What I want to happen is I want to say the word search and then I want it to ask me what I want to search for.', 'start': 744.143, 'duration': 7.985}, {'end': 755.229, 'text': "And then I'll say again, you know, I'll say what I want to search for.", 'start': 752.248, 'duration': 2.981}, {'end': 765.096, 'text': "So in order to do this, let's have a variable called search and set it to record audio because we need to we need it to know what we're saying back.", 'start': 755.85, 'duration': 9.246}, {'end': 768.998, 'text': "Now, this record audio, I'm going to pass in an optional parameter.", 'start': 765.636, 'duration': 3.362}, {'end': 771.586, 'text': 'for it to actually ask a question.', 'start': 769.605, 'duration': 1.981}, {'end': 777.09, 'text': "So we'll say what do you want to search for.", 'start': 771.766, 'duration': 5.324}, {'end': 783.533, 'text': "And up here in the record audio we're going to have an optional argument of ask.", 'start': 777.99, 'duration': 5.543}, {'end': 795.266, 'text': "We want to set that initially to false because it's optional and we'll put this Let's put this right above audio.", 'start': 784.054, 'duration': 11.212}], 'summary': 'Demonstrating how to prompt a search query using a recorded audio with optional parameter.', 'duration': 53.625, 'max_score': 741.641, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc741641.jpg'}, {'end': 824.263, 'src': 'heatmap', 'start': 795.326, 'weight': 0.892, 'content': [{'end': 806.815, 'text': "So right here we'll just say if ask actually can just do if ask and then we want to print ask.", 'start': 795.326, 'duration': 11.489}, {'end': 814.602, 'text': 'OK And then whatever we say back whatever we want to search for is going to get put into this variable.', 'start': 808.096, 'duration': 6.506}, {'end': 815.783, 'text': 'All right.', 'start': 814.622, 'duration': 1.161}, {'end': 824.263, 'text': "So the next thing we'll do after we put that into the variable is create a URL that we want to use which is going to be a Google search URL.", 'start': 815.863, 'duration': 8.4}], 'summary': 'Creating a program to print and search using user input.', 'duration': 28.937, 'max_score': 795.326, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc795326.jpg'}, {'end': 854.016, 'src': 'embed', 'start': 824.403, 'weight': 2, 'content': [{'end': 833.485, 'text': 'So HTTPS Google dot com slash search and we can do question mark Q equals.', 'start': 824.403, 'duration': 9.082}, {'end': 841.246, 'text': "So this is just a query that we want to search Google and we're just going to concatenate onto that whatever that search term is.", 'start': 833.985, 'duration': 7.261}, {'end': 847.848, 'text': 'OK Then we can use the Web browser so Web browser dot get.', 'start': 841.266, 'duration': 6.582}, {'end': 854.016, 'text': 'and then dot open and just pass in that URL and that should open it in the Web browser.', 'start': 849.113, 'duration': 4.903}], 'summary': 'Using https, search google for a query and open the result in the web browser.', 'duration': 29.613, 'max_score': 824.403, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc824403.jpg'}, {'end': 1045.438, 'src': 'embed', 'start': 1011.022, 'weight': 3, 'content': [{'end': 1013.123, 'text': 'We say one thing and it ends.', 'start': 1011.022, 'duration': 2.101}, {'end': 1018.308, 'text': 'I wanted to basically continue on to like to just listen, to continuously listen.', 'start': 1013.163, 'duration': 5.145}, {'end': 1020.009, 'text': 'So we can do that pretty easily.', 'start': 1018.708, 'duration': 1.301}, {'end': 1022.991, 'text': "We're just going to go down here.", 'start': 1020.89, 'duration': 2.101}, {'end': 1026.714, 'text': "We're going to use the time package, actually have to import it on its own.", 'start': 1023.011, 'duration': 3.703}, {'end': 1028.876, 'text': 'So import time.', 'start': 1027.295, 'duration': 1.581}, {'end': 1038.117, 'text': "and say time dot sleep we're going to call the sleep method which just waits whatever however many seconds we want.", 'start': 1031.375, 'duration': 6.742}, {'end': 1045.438, 'text': "So let's say time dot, sleep one and then right here we're going to just have a while loop.", 'start': 1038.137, 'duration': 7.301}], 'summary': 'Using the time package to create a while loop for continuous listening.', 'duration': 34.416, 'max_score': 1011.022, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc1011022.jpg'}], 'start': 712.485, 'title': 'Voice-controlled web and map search', 'summary': 'Covers creating a voice-controlled program to search google and google maps, including the ability to continuously listen, with examples of searching for dogs and finding the location of boston, massachusetts.', 'chapters': [{'end': 1126.516, 'start': 712.485, 'title': 'Voice-controlled web and map search', 'summary': 'Covers creating a voice-controlled program to search google and google maps, including the ability to continuously listen, with examples of searching for dogs and finding the location of boston, massachusetts.', 'duration': 414.031, 'highlights': ['Creating voice-controlled program to search Google and Google Maps', "Using optional parameters for voice commands, e.g., 'What do you want to search for' and 'What is the location'", 'Generating Google search URL and opening in the web browser', 'Using time package to create continuous listening and exit on voice command']}], 'duration': 414.031, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc712485.jpg', 'highlights': ['Creating voice-controlled program to search Google and Google Maps', "Using optional parameters for voice commands, e.g., 'What do you want to search for' and 'What is the location'", 'Generating Google search URL and opening in the web browser', 'Using time package to create continuous listening and exit on voice command']}, {'end': 1606.013, 'segs': [{'end': 1158.802, 'src': 'embed', 'start': 1126.656, 'weight': 1, 'content': [{'end': 1130.038, 'text': "So for that, we're going to use Google text to speech.", 'start': 1126.656, 'duration': 3.382}, {'end': 1137.223, 'text': "So it's a Python library and CLI tool to interface with the Google translate text to speech API.", 'start': 1130.198, 'duration': 7.025}, {'end': 1138.744, 'text': 'So we want to install this.', 'start': 1137.263, 'duration': 1.481}, {'end': 1147.451, 'text': "And basically, what it's going to do is Whatever we pass in as text, which is Alexis,", 'start': 1140.565, 'duration': 6.886}, {'end': 1152.716, 'text': "basically it's going to create an audio file and we can play that audio file.", 'start': 1147.451, 'duration': 5.265}, {'end': 1158.802, 'text': "Now we're going to need an additional package called play sound, because if we don't use this, it's going to open up,", 'start': 1152.896, 'duration': 5.906}], 'summary': 'Using google text to speech to create audio files for text input.', 'duration': 32.146, 'max_score': 1126.656, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc1126656.jpg'}, {'end': 1239.194, 'src': 'heatmap', 'start': 1166.689, 'weight': 0, 'content': [{'end': 1174.691, 'text': 'And then play sound has a dependency called AppKit, which is actually in a package called PI Object C or Obj C.', 'start': 1166.689, 'duration': 8.002}, {'end': 1176.632, 'text': "So there's a couple of things we need to install.", 'start': 1174.691, 'duration': 1.941}, {'end': 1181.313, 'text': "So let's go ahead and pip install GTTS.", 'start': 1176.692, 'duration': 4.621}, {'end': 1184.854, 'text': "So that's the Google text to speech.", 'start': 1181.913, 'duration': 2.941}, {'end': 1187.115, 'text': "And then let's do pip install.", 'start': 1185.394, 'duration': 1.721}, {'end': 1195.773, 'text': "play sound and let's do pip install pi OBJC.", 'start': 1188.49, 'duration': 7.283}, {'end': 1196.774, 'text': 'So just like that.', 'start': 1195.873, 'duration': 0.901}, {'end': 1201.776, 'text': 'And that has the app kit that play sound depends on.', 'start': 1198.194, 'duration': 3.582}, {'end': 1207.719, 'text': "So we'll go up here, we'll just import everything we need.", 'start': 1204.297, 'duration': 3.422}, {'end': 1211.481, 'text': "So let's import place sound.", 'start': 1207.999, 'duration': 3.482}, {'end': 1221.487, 'text': "And we're also going to import the OS package, which is just a core Python package, because what's going to happen is, like I said, play sound.", 'start': 1212.743, 'duration': 8.744}, {'end': 1225.729, 'text': "I'm sorry, the Google text to speech will create an audio file.", 'start': 1221.687, 'duration': 4.042}, {'end': 1231.611, 'text': "And unless we remove that file in our code, it's just they're just going to keep piling up.", 'start': 1226.589, 'duration': 5.022}, {'end': 1239.194, 'text': 'So with the OS module or package, it has a remove method that we can remove the file with.', 'start': 1231.711, 'duration': 7.483}], 'summary': 'Install gtts, play sound, and pi objc for sound dependencies in python code.', 'duration': 64.503, 'max_score': 1166.689, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc1166689.jpg'}, {'end': 1350.565, 'src': 'embed', 'start': 1321.478, 'weight': 4, 'content': [{'end': 1322.699, 'text': "So let's do 10 million.", 'start': 1321.478, 'duration': 1.221}, {'end': 1326.654, 'text': 'So 10 1 2 3 1 2 3.', 'start': 1322.759, 'duration': 3.895}, {'end': 1330.502, 'text': "And then we want to create the name of the audio file that's going to be created.", 'start': 1326.66, 'duration': 3.842}, {'end': 1336.084, 'text': "So that's going to actually be audio dash.", 'start': 1331.742, 'duration': 4.342}, {'end': 1345.622, 'text': "And then we're just going to concatenate R, which is that random number, but we want to turn it into a string, so we'll wrap it in str.", 'start': 1336.244, 'duration': 9.378}, {'end': 1347.523, 'text': 'And then we just want .', 'start': 1346.122, 'duration': 1.401}, {'end': 1350.565, 'text': "mp3, because it's going to be an mp3 file.", 'start': 1347.523, 'duration': 3.042}], 'summary': 'Creating 10 million audio files named audio-r.mp3 using python.', 'duration': 29.087, 'max_score': 1321.478, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc1321478.jpg'}], 'start': 1126.656, 'title': 'Text-to-speech in python', 'summary': 'Discusses using the google text to speech python library and cli tool to interface with the google translate text to speech api, highlighting the installation process, package dependencies, and the use of necessary python packages to handle the audio files and file removal. it also demonstrates the process of creating a text-to-speech application using python, generating an audio file, playing it, and implementing speech recognition, with an example output of the application.', 'chapters': [{'end': 1292.516, 'start': 1126.656, 'title': 'Google text-to-speech in python', 'summary': 'Discusses using the google text to speech python library and cli tool to interface with the google translate text to speech api, highlighting the installation process, package dependencies, and the use of necessary python packages to handle the audio files and file removal.', 'duration': 165.86, 'highlights': ['The chapter discusses the installation process for Google text to speech and its dependencies, play sound and pi OBJC.', 'The importance of using the play sound package to prevent the audio file from opening in default sound players.', 'The utilization of the OS package to handle the removal of audio files created by the Google text to speech library, preventing them from piling up.', 'The significance of importing the random package to generate a random file name for the audio file.', 'The use of GTTS to create a text to speech variable, specifying the audio string to be converted.']}, {'end': 1606.013, 'start': 1293.678, 'title': 'Text-to-speech python tutorial', 'summary': 'Demonstrates the process of creating a text-to-speech application using python, generating an audio file, playing it, and implementing speech recognition, with an example output of the application.', 'duration': 312.335, 'highlights': ['The chapter demonstrates the process of creating a text-to-speech application using Python. The tutorial provides a step-by-step guide on building a text-to-speech application using Python.', "Generating an audio file and playing it using Python. The process involves generating a random string and creating an audio file in mp3 format, followed by playing the audio file using the 'play sound' library.", 'Implementing speech recognition and providing an example output. The tutorial showcases an example output of the application, demonstrating speech recognition by asking and answering questions, searching for information, and providing location details.']}], 'duration': 479.357, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/x8xjj6cR9Nc/pics/x8xjj6cR9Nc1126656.jpg', 'highlights': ['The chapter discusses the installation process for Google text to speech and its dependencies, play sound and pi OBJC.', 'The tutorial provides a step-by-step guide on building a text-to-speech application using Python.', 'Implementing speech recognition and providing an example output. The tutorial showcases an example output of the application, demonstrating speech recognition by asking and answering questions, searching for information, and providing location details.', 'The utilization of the OS package to handle the removal of audio files created by the Google text to speech library, preventing them from piling up.', "Generating an audio file and playing it using Python. The process involves generating a random string and creating an audio file in mp3 format, followed by playing the audio file using the 'play sound' library."]}], 'highlights': ['The tutorial focuses on building a speech assistant application with Python using the speech recognition library and Google text-to-speech, enabling voice commands for various tasks such as asking for a name, searching on Google, and finding a location on a map.', 'The video is sponsored by Kite, a Python plugin for editors and IDEs that provides intelligent snippets and an integrated documentation tool called Copilot, which is free and extremely helpful.', 'The process of setting up a virtual environment using Python 3 VENV and activating it is explained, along with the creation of a folder and selecting an interpreter in VS code.', 'The library used for performing speech recognition supports several engines and APIs, with the Google Speech Recognition API being the one implemented.', 'Creating voice-controlled program to search Google and Google Maps', 'The chapter discusses the installation process for Google text to speech and its dependencies, play sound and pi OBJC.', 'The tutorial provides a step-by-step guide on building a text-to-speech application using Python.', 'Implementing speech recognition and providing an example output. The tutorial showcases an example output of the application, demonstrating speech recognition by asking and answering questions, searching for information, and providing location details.']}