simple implementation of voice-controlled email sending functionality using Python.
This Python script enables users to send emails using voice commands. It utilizes various libraries such as smtplib
, pyaudio
, speech_recognition
, and pyttsx3
to achieve voice input, text-to-speech output, and email sending functionality.
- Voice Input: Users can speak commands to specify the recipient's name, email subject, and body content.
- Text-to-Speech Output: Provides auditory feedback to the user using the
pyttsx3
library. - Email Sending: Utilizes SMTP (Simple Mail Transfer Protocol) via the
smtplib
library to send emails. - Predefined Contacts: Users can configure a dictionary mapping names to email addresses for quick access to contacts.
smtplib
: For sending emails using SMTP.pyaudio
: For audio input/output functionalities.speech_recognition
: For converting speech to text.pyttsx3
: For converting text to speech.
-
Make sure you have the required dependencies installed. You can install them via pip:
-
Configure your Gmail account credentials in the
send_mail()
function. -
Update the
dict
dictionary with the names and corresponding email addresses of your contacts. -
Run the script and follow the voice prompts to send an email.
-
When the voice prompt says "Whom do you want to send the email to" say "test".
$ python email_sender.py Talk Recipient's name: "John Doe" Talk Email subject: "Meeting Agenda" Talk Email body: "Hi John, here's the agenda for our meeting tomorrow..." Email sent successfully
turn on accessm for less secure apps of your google account login
- Currently only supports Gmail SMTP server. For other email providers, additional configurations may be required.
- Limited error handling and validation. Ensure correct input to avoid unexpected behavior.
- Sania jain
This project is licensed under the MIT License.