Homework 3
Homework 3
Homework 3
ASSESSMENT Two
Team Work
CSC498 –NLP-SP22 1
Homework 3 – Developing a Conversational Agent
Pauline Maouad, PhD
Module #3: Text Vectorization and Similarity Measure.
In this third module, you will ask Brainy questions about the topic you chose in
Module 1. For example, if you chose the tennis page on Wikipedia, then suitable
questions can be:
• Tell me about Roger Federer
• What is a grand slam tournament?
• What are the Tennis game rules?
• Etc…
Then, Brainy will search the text and return an appropriate answer to your
question. At any time, if you input an erroneous text, Brainy should reply: “I am
sorry, I do not understand what you are asking me.”
Part II: Then, use your microphone to talk directly and have the speech recognizer
recognize your utterance. To that end you need to install:
1. portaudio and pyaudio
2. Installation instructions for Windows and Mac are found here:
https://people.csail.mit.edu/hubert/pyaudio/
3. The text you speak through the microphone, should be captured and sent to
Brainy, and Brainy should reply (Module 3).
CSC498 –NLP-SP22 2
Homework 3 – Developing a Conversational Agent
Pauline Maouad, PhD
Module #5:
In this fifth module, you need to implement a text-to-speech task, where you output
the response of Brainy through your system’s speakers. To this end you need to
install:
1. gTTs package of pypi
2. Installation instructions for Windows and Mac are found here:
https://pypi.org/project/gTTS/
Module #6:
Finally, at any moment you type and/or speak “Bye” or “Bye Brainy”, Brainy
should reply with “Bye human” or “Take care” and close the input (you can no
longer input text).
➔ In fine, when I run your code, I should be able to greet Brainy or ask him a
question, by inputting a text and/or speaking through the microphone. Brainy
should reply to me by text and/or through the speakers.
CSC498 –NLP-SP22 3
Homework 3 – Developing a Conversational Agent
Pauline Maouad, PhD