打造功能强大的虚拟个人助理
一、虚拟个人助理的邮件发送功能
1. 本地邮件模块的创建
首先,我们要定义一个 email() 函数,用于实现邮件发送的功能。以下是具体的代码:
def email():
# Build a dictionary of names and emails
# --snip--
# Voice input the name of the recipient
print_say('Who do you want to send the email to?')
name = voice_to_text().lower()
email = emails[name]
print_say(f"You just said {name}.")
# Voice input the subject line
print_say('What is the subject line?')
subline = voice_to_text()
print_say(f"You just said {subline}.")
# Voice input the email content
print_say('What is the email content?')
content = voice_to_text()
print_say(f"You just said {content}.")
# Send the actual email
mysmt.sen
超级会员免费看
订阅专栏 解锁全文
87

被折叠的 条评论
为什么被折叠?



