Ever dreamed of creating your own AI voice assistant โ like Jarvis or Alexa โ but thought you needed a computer? Not anymore! With the PyDroid 3 app on Android, you can build a working voice assistant right from your phone using Python.
You can talk to your phone, and it will reply using AI-generated voice! No PC, no internet required. Just Python, your phone, and your voice. Great for students, coders, and AI enthusiasts.
Open PyDroid 3 and install these from the PIP menu:
speechrecognition
pyttsx3
pyaudio
import speech_recognition as sr import pyttsx3Initialize engine engine = pyttsx3.init() def speak(text): engine.say(text) engine.runAndWait() def listen(): r = sr.Recognizer() with sr.Microphone() as source: print("Listening...") audio = r.listen(source) try: command = r.recognize_google(audio) print("You said:", command) return command except: speak("Sorry, I didn't catch that.") return "" speak("Hi! I am your assistant. How can I help you?") while True: query = listen().lower() if "stop" in query: speak("Goodbye!") break elif "your name" in query: speak("I am Codeverix Assistant.") elif "hello" in query: speak("Hello there!") else: speak("You said " + query)
voice_bot.py
speech_recognition
: listens and converts voice to textpyttsx3
: converts text back to spoken voicewhile loop
: keeps assistant running until "stop"wikipedia
moduleBuilding your own voice assistant is not just fun โ it teaches you how voice AI works behind the scenes. This project is fully offline, beginner-friendly, and works on any Android phone with PyDroid 3. Happy coding from Codeverix Digital!
โโโโโ What should our AI assistant do next? Drop your ideas in the comments!