In this article, we will see how a voice assistant can be made for searching for movies or films. After giving input as movie name in audio format and it will give the information about that movie in audio format as well.
As we know the greatest searching website for movies is IMDb. IMDb is an online database of information related to films, television programs, home videos, video games, and streaming content online including cast, production crew, and personal biographies, plot summaries, trivia, ratings, and fan, and critical reviews.
- IMDbPY: It is a Python package useful to retrieve and manage the data of the IMDb movie database about movies, people, characters, and companies. It can be installed using the below command:
pip install IMDbPY
- pyttsx3: It is a text-to-speech conversion library in Python. Unlike alternative libraries, it works offline and is compatible with both Python 2 and 3. It can be installed using the below command:
pip install pyttsx3
- SpeechRecognition: Library for performing speech recognition, with support for several engines and APIs, online and offline. It can be installed using the below command:
pip install SpeechRecognition
- Datetime: Encapsulation of date/time values. It can be installed using the below command:
pip install DateTime
- Import required modules.
- Create the below functions:
- speak( ): This function will help our assistant to speak up.
- get_audio( ): This function will help the assistant to get the input by the user.
- get_movies( ): This function will help the assistant to search for the movie that is given as input.
- Create a new function search_movie( ) to search a movie by using the above function calls.
- Call the above-created function.
Below is the Implementation.
The above code will speak the information about the film as the user gave the input and also print about it.
Parasitewas released in 2019 has IMDB rating of 8.6.
The plot summary of movie isThe Kims – mother and father Chung-sook and Ki-taek, and their young adult offspring, son Ki-woo and daughter Ki-jung – are a poor family living in a shabby and cramped half basement apartment in a busy lower working class commercial district of Seoul.
Without even knowing it, they, especially Mr. and Mrs. Kim, literally smell of poverty. Often as a collective, they perpetrate minor scams to get by, and even when they have jobs, they do the minimum work required. Ki-woo is the one who has dreams of getting out of poverty by one day going to university.
Despite not having that university education, Ki-woo is chosen by his university student friend Min, who is leaving to go to school, to take over his tutoring job to Park Da-hye, who Min plans to date once he returns to Seoul and she herself is in university.
The Parks are a wealthy family who for four years have lived in their modernistic house designed by and the former residence of famed architect Namgoong. While Mr. and Mrs. Park are all about status, Mrs. Park has a flighty, simpleminded mentality and temperament,
which Min tells Ki-woo to feel comfortable in lying to her about his education to get the job. In getting the job, Ki-woo further learns that Mrs. Park is looking for an art therapist for the Parks’ adolescent son, Da-song, Ki-woo quickly recommending his professional art therapist friend “Jessica”,
really Ki-jung who he knows can pull off the scam in being the easiest liar of the four Kims. In Ki-woo also falling for Da-hye, he begins to envision himself in that house, and thus the Kims as a collective start a plan for all the Kims, like Ki-jung using assumed names, to replace existing servants in the Parks’ employ in orchestrating reasons for them to be fired.
The most difficult to get rid of may be Moon-gwang, the Parks’ housekeeper who literally came with the house – she Namgoong’s housekeeper when he lived there – and thus knows all the little nooks and crannies of it better than the Parks themselves. The question then becomes how far the Kims can take this scam in their quest to become their version of the Parks.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course