Mike Niner Bravog
BairesDev - Machine Learning Practitioner - February 2025
This project is a virtual assistant built using Natural Language Processing (NLP). The system captures audio input from the user, transcribes it to text (Speech-to-Text), identifies the intent, and performs searches on Google Maps based on the spoken command.
- Audio capture via microphone and conversion to text
- Command interpretation and Google Maps search
- Voice response confirming the query before opening the browser
- Continuous loop until the user ends the session
The system was developed and tested with Python 3.11. To ensure correct execution, install the dependencies below.
Install all required packages with:
pip install -r requirements.txtIf you haven't created the requirements.txt file yet, run:
pip freeze > requirements.txtIf you face issues with PyAudio on Linux, install PortAudio first:
sudo apt update
sudo apt install portaudio19-dev
pip install pyaudioOn Windows, you may need to install it using pipwin:
pip install pipwin
pipwin install pyaudioAdditionally, pygobject was required for system compatibility:
pip install pygobjectTo start the virtual assistant, run:
python do1.pyThe assistant will begin by asking "What would you like to search for on Google Maps?" Simply say a location or service. The system will continue listening for commands until you say "end", "quit", or "exit".
- "Japanese restaurant in Leblon"
- "Plasterer near me"
- "24-hour pharmacy in Copacabana"
Uses gTTS to convert text into speech, allowing the assistant to confirm the query audibly.
Uses speech_recognition to capture speech and convert it to text. Configurations were tuned to prevent audio clipping.
Dynamically generates the search URL and opens it in the default web browser.
Keeps the system running, continuously listening for new commands until the user decides to stop.
This project showcases how Machine Learning and NLP can be applied to build a functional voice assistant. The code has been optimized to minimize speech recognition interruptions and improve search accuracy. This assistant can be easily extended to other use cases like conversational bots, task automation, or integration with external APIs.