Skip to content

Instantly share code, notes, and snippets.

@Daniel-V-Richardson
Daniel-V-Richardson / assistant.py
Created January 24, 2023 14:44
Simple AI Voice Assistant using OpenAI API
import speech_recognition as sr
import pyttsx3
import openai
openai.api_key = "Your API Key"
engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setProperty('voices', voices[1].id)