Ver3.0 ๐๏ธ ํ์ด์ฌ์ผ๋ก ์์ฑ ๋ช ๋ นํ AI ๋น์ ๊ตฌํํ๊ธฐ

๐๏ธ ํ์ด์ฌ์ผ๋ก ์์ฑ ๋ช ๋ นํ AI ๋น์ ๊ตฌํํ๊ธฐ
์น๊ตฌ์ฒ๋ผ ๋ํํ๋ ๋๋ง์ AI ๋น์๋ฅผ ์ง์ ๋ง๋ค์ด๋ณด์! ๐คโจ
๐ ์์ฑ ๋ช ๋ นํ AI ๋น์, ์ ๋ง๋ค์ด์ผ ํ ๊น?
์์ฆ ์๋์ "ํค์ด ์๋ฆฌ", "์ค์ผ์ด ๊ตฌ๊ธ" ๊ฐ์ ๋ง ์ ํด๋ณธ ์ฌ๋ ์์๊น? ๐ ์์ฑ ๋น์๋ ์ด์ ์ฐ๋ฆฌ ์ผ์์ ํ์ํ์ด ๋์ด. ๊ทธ๋ฐ๋ฐ ๋ง์ด์ผ, ์ด๋ฐ ๋ฉ์ง ๊ธฐ์ ์ ์ง์ ๋ง๋ค ์ ์๋ค๋ฉด ์ด๋จ๊น?ํ์ด์ฌ์ผ๋ก ์์ฑ ๋ช ๋ นํ AI ๋น์๋ฅผ ๊ตฌํํ๋ ๊ฑด ์๊ฐ๋ณด๋ค ์ด๋ ต์ง ์์. ๋ฌผ๋ก ์๋ฆฌ๋ ์๋ ์ฌ ์์ค๊น์ง๋ ์๋์ง๋ง, ๊ธฐ๋ณธ์ ์ธ ์์ฑ ์ธ์๊ณผ ๋ช ๋ น ์ฒ๋ฆฌ, ๊ทธ๋ฆฌ๊ณ ์์ฑ ์๋ต๊น์ง ๊ตฌํํ ์ ์์ง. ์ด ๊ณผ์ ์์ ์์ฑ ์ฒ๋ฆฌ ๊ธฐ์ , ์์ฐ์ด ์ฒ๋ฆฌ, ๊ทธ๋ฆฌ๊ณ ์ค์ AI ์์คํ ์ค๊ณ ๊ฒฝํ์ ์์ ์ ์์ด.
โข AI์ ์์ฑ ์ธ์ ๊ธฐ์ ์ ๊ด์ฌ ์๋ ํ์์ด๋ ์ทจ์ค์
โข ์ค๋งํธํ์ด๋ IoT ํ๋ก์ ํธ์ ์์ฑ ๊ธฐ๋ฅ์ ์ถ๊ฐํ๊ณ ์ถ์ ๋ฉ์ด์ปค
โข ์๋ก์ด ๊ธฐ์ ์คํ์ ๋ฐฐ์ฐ๊ณ ์ถ์ ๊ฐ๋ฐ์
๐ฏ ์์ฑ ๋น์์ ํต์ฌ ๊ตฌ์ฑ ์์
์์ฑ ๋น์๋ฅผ ๋ง๋ค๋ ค๋ฉด ํฌ๊ฒ ์ธ ๊ฐ์ง ํต์ฌ ๊ธฐ๋ฅ์ด ํ์ํด. ๋ง์น ์ฌ๋์ด ๋ฃ๊ณ , ์๊ฐํ๊ณ , ๋งํ๋ ๊ฒ์ฒ๋ผ ๋ง์ด์ผ.1. ๋ง์ดํฌ๋ก ์์ฑ ์ ๋ ฅ ๋ฐ๊ธฐ
2. ์ค๋์ค ์ ํธ๋ฅผ ๋์งํธ ๋ฐ์ดํฐ๋ก ๋ณํ
3. ์์ฑ ์ธ์ API๋ก ์ ์ก
4. ํ ์คํธ๋ก ๋ณํ๋ ๊ฒฐ๊ณผ ๋ฐ๊ธฐ
๐ ๏ธ ๊ฐ๋ฐ ํ๊ฒฝ ์ค์ ํ๊ธฐ
์, ์ด์ ๋ณธ๊ฒฉ์ ์ผ๋ก ์์ํด๋ณผ๊น? ๋จผ์ ํ์ํ ๋๊ตฌ๋ค์ ์ค์นํด์ผ ํด.pip install SpeechRecognition
pip install pyttsx3
pip install pyaudio
pip install wikipedia
pip install pywhatkit
pip install pipwin
pipwin install pyaudio
| ๋ผ์ด๋ธ๋ฌ๋ฆฌ | ์ญํ | ํน์ง |
|---|---|---|
| SpeechRecognition | ์์ฑ์ ํ ์คํธ๋ก ๋ณํ | Google, Sphinx ๋ฑ ๋ค์ํ ์์ง ์ง์ |
| pyttsx3 | ํ ์คํธ๋ฅผ ์์ฑ์ผ๋ก ๋ณํ | ์คํ๋ผ์ธ ์๋, ๋น ๋ฅธ ์๋ต ์๋ |
| PyAudio | ์ค๋์ค ์ ์ถ๋ ฅ ์ฒ๋ฆฌ | ๋ง์ดํฌ ์ ๋ ฅ ์บก์ฒ |
| wikipedia | ์ํคํผ๋์ ๊ฒ์ | ์ง์ ๊ธฐ๋ฐ ๋ต๋ณ ์ ๊ณต |
๐ป ๊ธฐ๋ณธ ์์ฑ ๋น์ ๊ตฌํํ๊ธฐ
์ด์ ์ค์ ์ฝ๋๋ฅผ ์์ฑํด๋ณด์! ๋จ๊ณ๋ณ๋ก ์ฐจ๊ทผ์ฐจ๊ทผ ๋ง๋ค์ด๊ฐ ๊ฑฐ์ผ.import speech_recognition as sr
import pyttsx3
import datetime
import wikipedia
import webbrowser
import os
# ์์ฑ ์์ง ์ด๊ธฐํ
engine = pyttsx3.init()
# ์์ฑ ์์ฑ ์ค์
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[0].id) # 0: ๋จ์ฑ, 1: ์ฌ์ฑ
engine.setProperty('rate', 150) # ๋งํ๋ ์๋
engine.setProperty('volume', 0.9) # ๋ณผ๋ฅจ (0.0 ~ 1.0)
def speak(text):
"""ํ
์คํธ๋ฅผ ์์ฑ์ผ๋ก ๋ณํ"""
engine.say(text)
engine.runAndWait()
def listen():
"""๋ง์ดํฌ๋ก ์์ฑ ์
๋ ฅ ๋ฐ๊ธฐ"""
recognizer = sr.Recognizer()
with sr.Microphone() as source:
print("๋ฃ๊ณ ์์ต๋๋ค...")
recognizer.pause_threshold = 1
audio = recognizer.listen(source)
try:
print("์ธ์ ์ค...")
query = recognizer.recognize_google(audio, language='ko-KR')
print(f"์ฌ์ฉ์: {query}")
return query.lower()
except Exception as e:
print("๋ค์ ๋ง์ํด์ฃผ์ธ์.")
return "None"
def greet_user():
"""์๊ฐ๋์ ๋ง๋ ์ธ์ฌ"""
hour = datetime.datetime.now().hour
if 0 <= hour < 12:
speak("์ข์ ์์นจ์
๋๋ค!")
elif 12 <= hour < 18:
speak("์ข์ ์คํ์
๋๋ค!")
else:
speak("์ข์ ์ ๋
์
๋๋ค!")
speak("๋ฌด์์ ๋์๋๋ฆด๊น์?")
def process_command(query):
"""๋ช
๋ น์ด ์ฒ๋ฆฌ"""
# ์๊ฐ ์๋ ค์ฃผ๊ธฐ
if '์๊ฐ' in query or '๋ช ์' in query:
current_time = datetime.datetime.now().strftime("%H์ %M๋ถ")
speak(f"ํ์ฌ ์๊ฐ์ {current_time}์
๋๋ค.")
# ๋ ์ง ์๋ ค์ฃผ๊ธฐ
elif '๋ ์ง' in query or '์ค๋' in query:
today = datetime.datetime.now().strftime("%Y๋
%m์ %d์ผ")
speak(f"์ค๋์ {today}์
๋๋ค.")
# ์ํคํผ๋์ ๊ฒ์
elif '๊ฒ์' in query or '์ฐพ์์ค' in query:
speak("๋ฌด์์ ๊ฒ์ํ ๊น์?")
search_query = listen()
if search_query != "None":
try:
wikipedia.set_lang('ko')
result = wikipedia.summary(search_query, sentences=2)
speak("๊ฒ์ ๊ฒฐ๊ณผ์
๋๋ค.")
speak(result)
except:
speak("๊ฒ์ ๊ฒฐ๊ณผ๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค.")
# ์น์ฌ์ดํธ ์ด๊ธฐ
elif '์ ํ๋ธ' in query:
speak("์ ํ๋ธ๋ฅผ ์ฝ๋๋ค.")
webbrowser.open("https://www.youtube.com")
elif '๊ตฌ๊ธ' in query:
speak("๊ตฌ๊ธ์ ์ฝ๋๋ค.")
webbrowser.open("https://www.google.com")
# ์์
์ฌ์
elif '์์
' in query or '๋
ธ๋' in query:
music_dir = 'C:\\Users\\YourName\\Music' # ์์
ํด๋ ๊ฒฝ๋ก
songs = os.listdir(music_dir)
if songs:
os.startfile(os.path.join(music_dir, songs[0]))
speak("์์
์ ์ฌ์ํฉ๋๋ค.")
else:
speak("์์
ํ์ผ์ ์ฐพ์ ์ ์์ต๋๋ค.")
# ์ข
๋ฃ
elif '์ข
๋ฃ' in query or '๊ทธ๋ง' in query:
speak("์๋
ํ ๊ณ์ธ์!")
return False
else:
speak("์ฃ์กํฉ๋๋ค. ์ดํดํ์ง ๋ชปํ์ต๋๋ค.")
return True
def main():
"""๋ฉ์ธ ์คํ ํจ์"""
greet_user()
while True:
query = listen()
if query != "None":
continue_running = process_command(query)
if not continue_running:
break
if __name__ == "__main__":
main()
2. ์ฌ์ฉ์ ์์ฑ ์ ๋ ฅ ๋๊ธฐ
3. ์์ฑ์ ํ ์คํธ๋ก ๋ณํ
4. ๋ช ๋ น์ด ๋ถ์ ๋ฐ ์ฒ๋ฆฌ
5. ๊ฒฐ๊ณผ๋ฅผ ์์ฑ์ผ๋ก ์๋ต
6. 2๋ฒ์ผ๋ก ๋์๊ฐ์ ๋ฐ๋ณต
๐ฅ ๊ณ ๊ธ ๊ธฐ๋ฅ ์ถ๊ฐํ๊ธฐ
๊ธฐ๋ณธ ๋น์๋ ๋ง๋ค์์ผ๋, ์ด์ ๋ ๋๋ํ๊ฒ ๋ง๋ค์ด๋ณผ๊น? ๐import requests
def get_weather(city):
"""๋ ์จ ์ ๋ณด ๊ฐ์ ธ์ค๊ธฐ"""
api_key = "YOUR_API_KEY" # OpenWeatherMap API ํค
base_url = "http://api.openweathermap.org/data/2.5/weather"
params = {
'q': city,
'appid': api_key,
'units': 'metric',
'lang': 'kr'
}
try:
response = requests.get(base_url, params=params)
data = response.json()
if response.status_code == 200:
temp = data['main']['temp']
description = data['weather'][0]['description']
weather_text = f"{city}์ ํ์ฌ ๋ ์จ๋ {description}์ด๋ฉฐ, ๊ธฐ์จ์ {temp}๋์
๋๋ค."
return weather_text
else:
return "๋ ์จ ์ ๋ณด๋ฅผ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค."
except:
return "๋ ์จ ์๋น์ค์ ์ฐ๊ฒฐํ ์ ์์ต๋๋ค."
# process_command ํจ์์ ์ถ๊ฐ
if '๋ ์จ' in query:
speak("์ด๋ ๋์์ ๋ ์จ๋ฅผ ์๋ ค๋๋ฆด๊น์?")
city = listen()
if city != "None":
weather_info = get_weather(city)
speak(weather_info)
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
def send_email(to_email, subject, body):
"""์ด๋ฉ์ผ ๋ฐ์ก"""
from_email = "your_email@gmail.com"
password = "your_password" # ์ฑ ๋น๋ฐ๋ฒํธ ์ฌ์ฉ ๊ถ์ฅ
try:
msg = MIMEMultipart()
msg['From'] = from_email
msg['To'] = to_email
msg['Subject'] = subject
msg.attach(MIMEText(body, 'plain'))
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login(from_email, password)
text = msg.as_string()
server.sendmail(from_email, to_email, text)
server.quit()
return True
except Exception as e:
print(f"์ด๋ฉ์ผ ๋ฐ์ก ์คํจ: {e}")
return False
# process_command ํจ์์ ์ถ๊ฐ
if '์ด๋ฉ์ผ' in query or '๋ฉ์ผ' in query:
speak("๋ฐ๋ ์ฌ๋์ ์ด๋ฉ์ผ ์ฃผ์๋ฅผ ๋ง์ํด์ฃผ์ธ์.")
# ์ด๋ฉ์ผ ์ฃผ์๋ ์์ฑ ์ธ์์ด ์ด๋ ค์ฐ๋ฏ๋ก ์ง์ ์
๋ ฅ ๋ฐ๋ ๊ฒ์ด ์ข์
to_email = input("๋ฐ๋ ์ฌ๋ ์ด๋ฉ์ผ: ")
speak("์ ๋ชฉ์ ๋ง์ํด์ฃผ์ธ์.")
subject = listen()
speak("๋ด์ฉ์ ๋ง์ํด์ฃผ์ธ์.")
body = listen()
if send_email(to_email, subject, body):
speak("์ด๋ฉ์ผ์ ์ฑ๊ณต์ ์ผ๋ก ๋ณด๋์ต๋๋ค.")
else:
speak("์ด๋ฉ์ผ ๋ฐ์ก์ ์คํจํ์ต๋๋ค.")
import threading
import time
def set_alarm(alarm_time):
"""์๋ ์ค์ """
speak(f"{alarm_time}์ ์๋์ ์ค์ ํ์ต๋๋ค.")
def alarm_thread():
while True:
current_time = datetime.datetime.now().strftime("%H:%M")
if current_time == alarm_time:
speak("์๋ ์๊ฐ์
๋๋ค!")
# ์๋ ์๋ฆฌ ์ฌ์ ์ฝ๋ ์ถ๊ฐ ๊ฐ๋ฅ
break
time.sleep(30) # 30์ด๋ง๋ค ์ฒดํฌ
thread = threading.Thread(target=alarm_thread)
thread.daemon = True
thread.start()
# process_command ํจ์์ ์ถ๊ฐ
if '์๋' in query:
speak("๋ช ์์ ์๋์ ์ค์ ํ ๊น์? ์๋ฅผ ๋ค์ด 14์ 30๋ถ์ด๋ผ๊ณ ๋ง์ํด์ฃผ์ธ์.")
alarm_input = listen()
# ์๊ฐ ํ์ฑ (๊ฐ๋จํ ์์)
if '์' in alarm_input:
try:
parts = alarm_input.replace('์', ':').replace('๋ถ', '').split(':')
hour = parts[0].strip()
minute = parts[1].strip() if len(parts) > 1 else "00"
alarm_time = f"{hour.zfill(2)}:{minute.zfill(2)}"
set_alarm(alarm_time)
except:
speak("์๊ฐ ํ์์ ์ดํดํ์ง ๋ชปํ์ต๋๋ค.")
๐จ ์ฌ์ฉ์ ๊ฒฝํ ๊ฐ์ ํ๊ธฐ
๊ธฐ๋ฅ๋ ์ค์ํ์ง๋ง, ์ฌ์ฉ์๊ฐ ํธํ๊ฒ ์ธ ์ ์์ด์ผ ์ง์ง ์ข์ ๋น์๊ฒ ์ง? โจdef wait_for_wake_word():
"""์จ์ดํฌ ์๋ ๋๊ธฐ"""
recognizer = sr.Recognizer()
with sr.Microphone() as source:
print("์จ์ดํฌ ์๋๋ฅผ ๊ธฐ๋ค๋ฆฌ๋ ์ค... ('ํค์ด ์๋น์ค'๋ผ๊ณ ๋งํด๋ณด์ธ์)")
while True:
try:
audio = recognizer.listen(source, timeout=5, phrase_time_limit=3)
text = recognizer.recognize_google(audio, language='ko-KR').lower()
if '์๋น์ค' in text or '๋น์' in text:
speak("๋ค, ๋ฌด์์ ๋์๋๋ฆด๊น์?")
return True
except sr.WaitTimeoutError:
continue
except:
continue
def main():
"""๊ฐ์ ๋ ๋ฉ์ธ ํจ์"""
speak("์์ฑ ๋น์๋ฅผ ์์ํฉ๋๋ค.")
while True:
if wait_for_wake_word():
query = listen()
if query != "None":
continue_running = process_command(query)
if not continue_running:
break
class VoiceAssistant:
def __init__(self):
self.context = {}
self.last_query = None
self.conversation_history = []
def remember(self, key, value):
"""์ ๋ณด ๊ธฐ์ตํ๊ธฐ"""
self.context[key] = value
def recall(self, key):
"""๊ธฐ์ตํ ์ ๋ณด ๋ถ๋ฌ์ค๊ธฐ"""
return self.context.get(key, None)
def add_to_history(self, query, response):
"""๋ํ ๊ธฐ๋ก ์ถ๊ฐ"""
self.conversation_history.append({
'query': query,
'response': response,
'timestamp': datetime.datetime.now()
})
def process_contextual_command(self, query):
"""์ปจํ
์คํธ๋ฅผ ๊ณ ๋ คํ ๋ช
๋ น ์ฒ๋ฆฌ"""
# "๊ทธ๊ฒ"์ด๋ "๊ทธ๊ฑฐ" ๊ฐ์ ๋๋ช
์ฌ ์ฒ๋ฆฌ
if '๊ทธ๊ฒ' in query or '๊ทธ๊ฑฐ' in query:
if self.last_query:
query = query.replace('๊ทธ๊ฒ', self.last_query)
query = query.replace('๊ทธ๊ฑฐ', self.last_query)
# ์ด์ ๊ฒ์ ๊ฒฐ๊ณผ ์ฐธ์กฐ
if '๋ ์๋ ค์ค' in query or '์์ธํ' in query:
last_search = self.recall('last_search')
if last_search:
# ๋ ์์ธํ ์ ๋ณด ์ ๊ณต
pass
self.last_query = query
return query
# ์ฌ์ฉ ์์
assistant = VoiceAssistant()
# ๋ช
๋ น ์ฒ๋ฆฌ ์
processed_query = assistant.process_contextual_command(query)
response = process_command(processed_query)
assistant.add_to_history(query, response)
โข ์ผ์ ํจํด ํ์ (์์นจ์ ๋ ์จ ํ์ธ, ์ ๋ ์ ์ผ์ ํ์ธ ๋ฑ)
โข ๊ฐ์ธํ๋ ์ถ์ฒ ์ ๊ณต
โข ๋ํ ํ๋ฆ์ ๋ง๋ ์์ฐ์ค๋ฌ์ด ์๋ต
def robust_listen(max_retries=3):
"""์ฌ์๋ ๋ก์ง์ด ํฌํจ๋ ์์ฑ ์ธ์"""
recognizer = sr.Recognizer()
for attempt in range(max_retries):
try:
with sr.Microphone() as source:
if attempt > 0:
speak("๋ค์ ํ ๋ฒ ๋ง์ํด์ฃผ์ธ์.")
# ์ฃผ๋ณ ์์ ์กฐ์
recognizer.adjust_for_ambient_noise(source, duration=0.5)
print(f"๋ฃ๊ณ ์์ต๋๋ค... (์๋ {attempt + 1}/{max_retries})")
audio = recognizer.listen(source, timeout=5, phrase_time_limit=10)
query = recognizer.recognize_google(audio, language='ko-KR')
print(f"์ธ์๋จ: {query}")
return query.lower()
except sr.WaitTimeoutError:
if attempt == max_retries - 1:
speak("์์ฑ์ด ๊ฐ์ง๋์ง ์์์ต๋๋ค.")
except sr.UnknownValueError:
if attempt == max_retries - 1:
speak("์์ฑ์ ์ดํดํ์ง ๋ชปํ์ต๋๋ค.")
except sr.RequestError:
speak("์์ฑ ์ธ์ ์๋น์ค์ ์ฐ๊ฒฐํ ์ ์์ต๋๋ค. ์ธํฐ๋ท ์ฐ๊ฒฐ์ ํ์ธํด์ฃผ์ธ์.")
return "None"
except Exception as e:
print(f"์์์น ๋ชปํ ์ค๋ฅ: {e}")
return "None"
def fallback_response(query):
"""์ดํดํ์ง ๋ชปํ ๋ช
๋ น์ ๋ํ ๋์ ์ ์"""
suggestions = [
"์๊ฐ ์๋ ค์ค",
"๋ ์จ ์๋ ค์ค",
"์ ํ๋ธ ์ด์ด์ค",
"๊ฒ์ํด์ค",
"์์
ํ์ด์ค"
]
speak("์ฃ์กํฉ๋๋ค. ๋ช
๋ น์ ์ดํดํ์ง ๋ชปํ์ต๋๋ค.")
speak("๋ค์๊ณผ ๊ฐ์ ๋ช
๋ น์ ์ฌ์ฉํ ์ ์์ต๋๋ค.")
for suggestion in suggestions[:3]: # ์์ 3๊ฐ๋ง
speak(suggestion)
๐ง ์์ฐ์ด ์ฒ๋ฆฌ ๊ณ ๋ํ
๋จ์ํ ํค์๋ ๋งค์นญ์ ๋์ด์ ๋ ๋๋ํ ์ดํด ๋ฅ๋ ฅ์ ๊ฐ์ถฐ๋ณด์! ๐คfrom difflib import SequenceMatcher
class IntentClassifier:
def __init__(self):
self.intents = {
'time': ['์๊ฐ', '๋ช ์', '์ง๊ธ ๋ช ์'],
'date': ['๋ ์ง', '์ค๋', '๋ฉฐ์น ', '๋ฌด์จ ์์ผ'],
'weather': ['๋ ์จ', '๊ธฐ์จ', '๋น', '๋', '๋ง'],
'search': ['๊ฒ์', '์ฐพ์์ค', '์๋ ค์ค', '๋ญ์ผ', '๋ฌด์'],
'music': ['์์
', '๋
ธ๋', 'ํ์ด์ค', '์ฌ์'],
'web': ['์ด์ด์ค', '์ฌ์ดํธ', '์น', '๋ธ๋ผ์ฐ์ '],
'email': ['์ด๋ฉ์ผ', '๋ฉ์ผ', '๋ณด๋ด์ค'],
'alarm': ['์๋', '๊นจ์์ค', '์๋ ค์ค'],
'exit': ['์ข
๋ฃ', '๊ทธ๋ง', '๊บผ์ค', '๋']
}
def similarity(self, a, b):
"""๋ฌธ์์ด ์ ์ฌ๋ ๊ณ์ฐ"""
return SequenceMatcher(None, a, b).ratio()
def classify(self, query):
"""์๋ ๋ถ๋ฅ"""
best_intent = None
best_score = 0
for intent, keywords in self.intents.items():
for keyword in keywords:
if keyword in query:
score = len(keyword) / len(query)
if score > best_score:
best_score = score
best_intent = intent
# ์ ์ฌ๋ ๊ธฐ๋ฐ ๋งค์นญ (์ ํํ ํค์๋๊ฐ ์์ ๋)
if best_score < 0.3:
for intent, keywords in self.intents.items():
for keyword in keywords:
sim = self.similarity(query, keyword)
if sim > 0.7 and sim > best_score:
best_score = sim
best_intent = intent
return best_intent, best_score
# ์ฌ์ฉ ์์
classifier = IntentClassifier()
def smart_process_command(query):
"""์๋ ๊ธฐ๋ฐ ๋ช
๋ น ์ฒ๋ฆฌ"""
intent, confidence = classifier.classify(query)
print(f"๊ฐ์ง๋ ์๋: {intent} (์ ๋ขฐ๋: {confidence:.2f})")
if confidence < 0.3:
fallback_response(query)
return True
if intent == 'time':
current_time = datetime.datetime.now().strftime("%H์ %M๋ถ")
speak(f"ํ์ฌ ์๊ฐ์ {current_time}์
๋๋ค.")
elif intent == 'weather':
# ๋์๋ช
์ถ์ถ
city = extract_city(query)
weather_info = get_weather(city)
speak(weather_info)
# ... ๋ค๋ฅธ ์๋ ์ฒ๋ฆฌ
return True
import re
def extract_entities(query):
"""๊ฐ์ฒด๋ช
์ถ์ถ"""
entities = {
'time': None,
'date': None,
'location': None,
'person': None,
'number': None
}
# ์๊ฐ ํจํด
time_pattern = r'(\d{1,2})์\s?(\d{1,2})?๋ถ?'
time_match = re.search(time_pattern, query)
if time_match:
hour = time_match.group(1)
minute = time_match.group(2) if time_match.group(2) else "00"
entities['time'] = f"{hour}:{minute}"
# ๋ ์ง ํจํด
date_patterns = [
r'(\d{1,2})์\s?(\d{1,2})์ผ',
r'(๋ด์ผ|๋ชจ๋ |์ด์ )',
r'(๋ค์์ฃผ|์ด๋ฒ์ฃผ|์ง๋์ฃผ)'
]
for pattern in date_patterns:
date_match = re.search(pattern, query)
if date_match:
entities['date'] = date_match.group(0)
break
# ๋์๋ช
(๊ฐ๋จํ ์์)
cities = ['์์ธ', '๋ถ์ฐ', '๋๊ตฌ', '์ธ์ฒ', '๊ด์ฃผ', '๋์ ', '์ธ์ฐ']
for city in cities:
if city in query:
entities['location'] = city
break
# ์ซ์
number_pattern = r'\d+'
number_match = re.search(number_pattern, query)
if number_match:
entities['number'] = int(number_match.group(0))
return entities
# ์ฌ์ฉ ์์
query = "๋ด์ผ ์คํ 3์์ ์์ธ ๋ ์จ ์๋ ค์ค"
entities = extract_entities(query)
print(entities)
# {'time': '3:00', 'date': '๋ด์ผ', 'location': '์์ธ', ...}
pip install konlpy
pip install spacy
๐ ์ธ๋ถ API ์ฐ๋ํ๊ธฐ
์์ฑ ๋น์๋ฅผ ๋์ฑ ๊ฐ๋ ฅํ๊ฒ ๋ง๋ค๋ ค๋ฉด ๋ค์ํ ์ธ๋ถ ์๋น์ค์ ์ฐ๋ํด์ผ ํด! ๐import requests
def get_news(category='general', country='kr'):
"""๋ด์ค ๊ฐ์ ธ์ค๊ธฐ"""
api_key = "YOUR_NEWS_API_KEY" # newsapi.org์์ ๋ฐ๊ธ
url = f"https://newsapi.org/v2/top-headlines"
params = {
'country': country,
'category': category,
'apiKey': api_key,
'pageSize': 5
}
try:
response = requests.get(url, params=params)
data = response.json()
if data['status'] == 'ok':
articles = data['articles']
news_list = []
for i, article in enumerate(articles[:3], 1):
title = article['title']
news_list.append(f"{i}๋ฒ ๋ด์ค: {title}")
return news_list
else:
return ["๋ด์ค๋ฅผ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค."]
except:
return ["๋ด์ค ์๋น์ค์ ์ฐ๊ฒฐํ ์ ์์ต๋๋ค."]
# process_command์ ์ถ๊ฐ
if '๋ด์ค' in query:
speak("์ต์ ๋ด์ค๋ฅผ ๊ฐ์ ธ์ค๊ฒ ์ต๋๋ค.")
news = get_news()
for news_item in news:
speak(news_item)
time.sleep(1) # ๊ฐ ๋ด์ค ์ฌ์ด์ ์งง์ pause
from googletrans import Translator
def translate_text(text, dest_lang='en'):
"""ํ
์คํธ ๋ฒ์ญ"""
try:
translator = Translator()
result = translator.translate(text, dest=dest_lang)
return result.text
except:
return "๋ฒ์ญ์ ์คํจํ์ต๋๋ค."
# process_command์ ์ถ๊ฐ
if '๋ฒ์ญ' in query:
speak("๋ฒ์ญํ ๋ฌธ์ฅ์ ๋ง์ํด์ฃผ์ธ์.")
text_to_translate = listen()
if text_to_translate != "None":
speak("์ด๋ค ์ธ์ด๋ก ๋ฒ์ญํ ๊น์? ์์ด, ์ผ๋ณธ์ด, ์ค๊ตญ์ด ์ค ์ ํํด์ฃผ์ธ์.")
target_lang = listen()
lang_code = {
'์์ด': 'en',
'์ผ๋ณธ์ด': 'ja',
'์ค๊ตญ์ด': 'zh-cn'
}
dest = lang_code.get(target_lang, 'en')
translated = translate_text(text_to_translate, dest)
speak(f"๋ฒ์ญ ๊ฒฐ๊ณผ์
๋๋ค: {translated}")
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import datetime, timedelta
def add_calendar_event(summary, start_time, duration_hours=1):
"""๊ตฌ๊ธ ์บ๋ฆฐ๋์ ์ผ์ ์ถ๊ฐ"""
try:
# OAuth ์ธ์ฆ (์ฌ์ ์ credentials.json ํ์)
creds = Credentials.from_authorized_user_file('token.json')
service = build('calendar', 'v3', credentials=creds)
# ์ผ์ ์์ ๋ฐ ์ข
๋ฃ ์๊ฐ ์ค์
start = datetime.fromisoformat(start_time)
end = start + timedelta(hours=duration_hours)
event = {
'summary': summary,
'start': {
'dateTime': start.isoformat(),
'timeZone': 'Asia/Seoul',
},
'end': {
'dateTime': end.isoformat(),
'timeZone': 'Asia/Seoul',
},
}
event = service.events().insert(calendarId='primary', body=event).execute()
return True
except Exception as e:
print(f"์บ๋ฆฐ๋ ์ฐ๋ ์ค๋ฅ: {e}")
return False
# process_command์ ์ถ๊ฐ
if '์ผ์ ' in query and '์ถ๊ฐ' in query:
speak("์ผ์ ์ ๋ชฉ์ ๋ง์ํด์ฃผ์ธ์.")
title = listen()
speak("์ธ์ ์ผ์ ์ด ์๋์? ์๋ฅผ ๋ค์ด ๋ด์ผ ์คํ 3์๋ผ๊ณ ๋ง์ํด์ฃผ์ธ์.")
time_input = listen()
# ์๊ฐ ํ์ฑ ๋ฐ ์ผ์ ์ถ๊ฐ
# (์ค์ ๋ก๋ ๋ ์ ๊ตํ ์๊ฐ ํ์ฑ ํ์)
if add_calendar_event(title, time_input):
speak("์ผ์ ์ ์ถ๊ฐํ์ต๋๋ค.")
else:
speak("์ผ์ ์ถ๊ฐ์ ์คํจํ์ต๋๋ค.")
import os
api_key = os.environ.get('NEWS_API_KEY')
๐ฑ ์ค์ ๋ฐฐํฌ ๋ฐ ์ต์ ํ
์ด์ ๋ง๋ ๋น์๋ฅผ ์ค์ ๋ก ์ฌ์ฉํ ์ ์๊ฒ ์ต์ ํํด๋ณด์! โกimport functools
import time
def cache_result(expiry_seconds=300):
"""๊ฒฐ๊ณผ ์บ์ฑ ๋ฐ์ฝ๋ ์ดํฐ"""
def decorator(func):
cache = {}
@functools.wraps(func)
def wrapper(*args, **kwargs):
key = str(args) + str(kwargs)
current_time = time.time()
if key in cache:
result, timestamp = cache[key]
if current_time - timestamp < expiry_seconds:
print(f"์บ์์์ ๊ฒฐ๊ณผ ๋ฐํ: {func.__name__}")
return result
result = func(*args, **kwargs)
cache[key] = (result, current_time)
return result
return wrapper
return decorator
# ์ฌ์ฉ ์์
@cache_result(expiry_seconds=600) # 10๋ถ๊ฐ ์บ์
def get_weather(city):
"""๋ ์จ ์ ๋ณด (์บ์ ์ ์ฉ)"""
# ... ๊ธฐ์กด ์ฝ๋
pass
import concurrent.futures
def parallel_process(tasks):
"""์ฌ๋ฌ ์์
์ ๋ณ๋ ฌ๋ก ์ฒ๋ฆฌ"""
with concurrent.futures.ThreadPoolExecutor(max_workers=3) as executor:
futures = {executor.submit(task['func'], *task['args']): task['name']
for task in tasks}
results = {}
for future in concurrent.futures.as_completed(futures):
task_name = futures[future]
try:
results[task_name] = future.result()
except Exception as e:
results[task_name] = f"์ค๋ฅ: {e}"
return results
# ์ฌ์ฉ ์์: ์์นจ ๋ธ๋ฆฌํ (๋ ์จ, ๋ด์ค, ์ผ์ ์ ๋์์ ๊ฐ์ ธ์ค๊ธฐ)
def morning_briefing():
"""์์นจ ๋ธ๋ฆฌํ"""
speak("์์นจ ๋ธ๋ฆฌํ์ ์ค๋นํ๊ฒ ์ต๋๋ค.")
tasks = [
{'name': 'weather', 'func': get_weather, 'args': ('์์ธ',)},
{'name': 'news', 'func': get_news, 'args': ()},
{'name': 'calendar', 'func': get_today_events, 'args': ()}
]
results = parallel_process(tasks)
# ๊ฒฐ๊ณผ ๋ฐํ
if 'weather' in results:
speak(results['weather'])
if 'news' in results:
speak("์ค๋์ ์ฃผ์ ๋ด์ค์
๋๋ค.")
for news_item in results['news'][:3]:
speak(news_item)
if 'calendar' in results:
speak("์ค๋์ ์ผ์ ์
๋๋ค.")
speak(results['calendar'])
import logging
from datetime import datetime
# ๋ก๊น
์ค์
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',
handlers=[
logging.FileHandler('voice_assistant.log'),
logging.StreamHandler()
]
)
logger = logging.getLogger(__name__)
class VoiceAssistantLogger:
"""์์ฑ ๋น์ ์ ์ฉ ๋ก๊ฑฐ"""
@staticmethod
def log_command(query, intent, success):
"""๋ช
๋ น ๋ก๊น
"""
logger.info(f"Query: {query} | Intent: {intent} | Success: {success}")
@staticmethod
def log_error(error_type, error_message):
"""์๋ฌ ๋ก๊น
"""
logger.error(f"Error Type: {error_type} | Message: {error_message}")
@staticmethod
def log_performance(function_name, execution_time):
"""์ฑ๋ฅ ๋ก๊น
"""
logger.info(f"Function: {function_name} | Time: {execution_time:.3f}s")
# ์ฌ์ฉ ์์
def timed_execution(func):
"""์คํ ์๊ฐ ์ธก์ ๋ฐ์ฝ๋ ์ดํฐ"""
@functools.wraps(func)
def wrapper(*args, **kwargs):
start_time = time.time()
result = func(*args, **kwargs)
execution_time = time.time() - start_time
VoiceAssistantLogger.log_performance(func.__name__, execution_time)
return result
return wrapper
@timed_execution
def process_command(query):
# ... ๊ธฐ์กด ์ฝ๋
pass
- โ ๋ชจ๋ API ํค๋ฅผ ํ๊ฒฝ ๋ณ์๋ก ๋ถ๋ฆฌ
- โ ์๋ฌ ์ฒ๋ฆฌ ๋ฐ ํด๋ฐฑ ๋ฉ์ปค๋์ฆ ๊ตฌํ
- โ ๋ก๊น ์์คํ ๊ตฌ์ถ
- โ ์ฑ๋ฅ ์ต์ ํ (์บ์ฑ, ๋ฉํฐ์ค๋ ๋ฉ)
- โ ์ฌ์ฉ์ ๊ฐ์ด๋ ์์ฑ
- โ ํ ์คํธ ์ผ์ด์ค ์์ฑ ๋ฐ ์คํ
# PyInstaller ์ค์น
pip install pyinstaller
# ์คํ ํ์ผ ์์ฑ
pyinstaller --onefile --windowed voice_assistant.py
# ์์ด์ฝ ์ถ๊ฐ
pyinstaller --onefile --windowed --icon=assistant.ico voice_assistant.py
๐ ์ค์ ํ๋ก์ ํธ ์์ด๋์ด
๊ธฐ๋ณธ๊ธฐ๋ฅผ ๋ค์ก์ผ๋, ์ด์ ์ฐฝ์์ ์ธ ํ๋ก์ ํธ๋ก ํ์ฅํด๋ณด์! ๐กโข ์์ฑ์ผ๋ก ๊ฐ์ ์ ํ on/off
โข ์ง์ ํ๊ฒฝ ๋ชจ๋ํฐ๋ง (์จ๋, ์ต๋)
โข ๋ณด์ ์์คํ ์ฐ๋
ํ์ ๊ธฐ์ : MQTT, Home Assistant API, Raspberry Pi ์ฐ๋
โข ํฌ๋ชจ๋๋ก ํ์ด๋จธ
โข ํ์๋ก ์๋ ์์ฑ
โข ์ ๋ฌด ์๊ฐ ์ถ์
โข ์ผ์ผ ๋ฆฌํฌํธ ์์ฑ
ํ์ ๊ธฐ์ : Notion API, Trello API, ๋ฐ์ดํฐ ์๊ฐํ
โข ์ํ ๋ฌธ์ ํ์ด ๋์
โข ์ญ์ฌ/๊ณผํ ์ง์ Q&A
โข ํ์ต ์ง๋ ๊ด๋ฆฌ
ํ์ ๊ธฐ์ : OpenAI API, ์์ฑ ๋ถ์, ๋ฐ์ดํฐ๋ฒ ์ด์ค
โข ์๋จ ์ถ์ฒ ๋ฐ ์นผ๋ก๋ฆฌ ๊ณ์ฐ
โข ๋ฌผ ๋ง์๊ธฐ ์๋ฆผ
โข ์๋ฉด ํจํด ๋ถ์
โข ์ฝ ๋ณต์ฉ ์๋ฆผ
ํ์ ๊ธฐ์ : ๊ฑด๊ฐ ๋ฐ์ดํฐ API, ๋ฐ์ดํฐ ๋ถ์
โข ๊ตํต ์ ๋ณด ์๋ด
โข ํธ์ฆํ๋ฆฌ ํตํ
โข ์์ ์ฌ์ ์ ์ด
โข ์ฃผ์ฐจ ์์น ๊ธฐ์ต
ํ์ ๊ธฐ์ : GPS API, ์ง๋ API, ๋ธ๋ฃจํฌ์ค ์ฐ๋
๐ ์์ฃผ ๋ฐ์ํ๋ ๋ฌธ์ ์ ํด๊ฒฐ๋ฒ
๊ฐ๋ฐํ๋ค ๋ณด๋ฉด ๊ผญ ๋ง์ฃผ์น๋ ๋ฌธ์ ๋ค์ด ์์ด. ๋ฏธ๋ฆฌ ์์๋๋ฉด ์๊ฐ์ ๋ง์ด ์ ์ฝํ ์ ์์ง! ๐งํด๊ฒฐ ๋ฐฉ๋ฒ:
1. ๋ง์ดํฌ๊ฐ ์ ๋๋ก ์ฐ๊ฒฐ๋์ด ์๋์ง ํ์ธ
2. ์์คํ ์ค์ ์์ ๋ง์ดํฌ ๊ถํ ํ์ฉ
3. ๊ธฐ๋ณธ ๋ง์ดํฌ ์ฅ์น ํ์ธ
# ์ฌ์ฉ ๊ฐ๋ฅํ ๋ง์ดํฌ ๋ชฉ๋ก ํ์ธ
import speech_recognition as sr
for index, name in enumerate(sr.Microphone.list_microphone_names()):
print(f"Microphone {index}: {name}")
# ํน์ ๋ง์ดํฌ ์ฌ์ฉ
recognizer = sr.Recognizer()
with sr.Microphone(device_index=1) as source:
# ... ์ฝ๋
ํด๊ฒฐ ๋ฐฉ๋ฒ:
1. ์ฃผ๋ณ ์์ ์กฐ์ ์๊ฐ ๋๋ฆฌ๊ธฐ
2. ๋ง์ดํฌ์์ ๊ฑฐ๋ฆฌ ์กฐ์
3. ๋ ๋์ ๋ง์ดํฌ ์ฌ์ฉ
4. ์์ฑ ์ธ์ ์์ง ๋ณ๊ฒฝ
recognizer = sr.Recognizer()
# ์์ ์กฐ์ ์๊ฐ ๋๋ฆฌ๊ธฐ
with sr.Microphone() as source:
recognizer.adjust_for_ambient_noise(source, duration=2)
# ์๋์ง ์๊ณ๊ฐ ์กฐ์
recognizer.energy_threshold = 4000
recognizer.dynamic_energy_threshold = True
audio = recognizer.listen(source)
ํด๊ฒฐ ๋ฐฉ๋ฒ:
1. ์คํ๋ผ์ธ ์์ฑ ์ธ์ ์์ง ์ฌ์ฉ (Sphinx)
2. ์บ์ฑ ๊ตฌํ
3. ๋น๋๊ธฐ ์ฒ๋ฆฌ
4. API ํธ์ถ ์ต์ํ
# Sphinx ์ฌ์ฉ (์คํ๋ผ์ธ)
try:
query = recognizer.recognize_sphinx(audio, language='ko-KR')
except sr.UnknownValueError:
# Sphinx๋ก ์ธ์ ์คํจ ์ Google๋ก ํด๋ฐฑ
query = recognizer.recognize_google(audio, language='ko-KR')
ํด๊ฒฐ ๋ฐฉ๋ฒ:
1. language ํ๋ผ๋ฏธํฐ ํ์ธ
2. ํ๊ตญ์ด ํนํ ๋ชจ๋ธ ์ฌ์ฉ
3. ๋ฐ์ ๋ช ํํ๊ฒ ํ๊ธฐ
# ์ฌ๋ฐ๋ฅธ ํ๊ตญ์ด ์ค์
query = recognizer.recognize_google(
audio,
language='ko-KR', # ํ๊ตญ์ด ์ค์
show_all=False
)
# ์ฌ๋ฌ ์ธ์ด ๋์ ์ง์
query = recognizer.recognize_google(
audio,
language='ko-KR',
show_all=True # ๋ชจ๋ ๊ฐ๋ฅํ ๊ฒฐ๊ณผ ๋ฐํ
)
๐ ๋ ๋์๊ฐ๊ธฐ: ์ต์ AI ๊ธฐ์ ์ ์ฉ
๊ธฐ๋ณธ ์์ฑ ๋น์๋ฅผ ๋์ด์ ์ต์ AI ๊ธฐ์ ์ ์ ๋ชฉํด๋ณด์! ๐import openai
openai.api_key = "YOUR_OPENAI_API_KEY"
def chat_with_gpt(user_message, conversation_history=[]):
"""GPT์ ๋ํ"""
try:
# ๋ํ ํ์คํ ๋ฆฌ์ ์ฌ์ฉ์ ๋ฉ์์ง ์ถ๊ฐ
conversation_history.append({
"role": "user",
"content": user_message
})
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "๋น์ ์ ์น์ ํ AI ๋น์์
๋๋ค."},
*conversation_history
],
max_tokens=150,
temperature=0.7
)
assistant_message = response.choices[0].message.content
# ๋ํ ํ์คํ ๋ฆฌ์ AI ์๋ต ์ถ๊ฐ
conversation_history.append({
"role": "assistant",
"content": assistant_message
})
return assistant_message, conversation_history
except Exception as e:
return f"GPT ์ฐ๋ ์ค๋ฅ: {e}", conversation_history
# ์ฌ์ฉ ์์
conversation = []
def smart_conversation(query):
"""GPT ๊ธฐ๋ฐ ๋ํ"""
global conversation
response, conversation = chat_with_gpt(query, conversation)
speak(response)
# ๋ํ๊ฐ ๋๋ฌด ๊ธธ์ด์ง๋ฉด ์ด๊ธฐํ
if len(conversation) > 10:
conversation = conversation[-6:] # ์ต๊ทผ 3ํด๋ง ์ ์ง
import librosa
import numpy as np
def analyze_emotion(audio_file):
"""์์ฑ์์ ๊ฐ์ ๋ถ์"""
try:
# ์ค๋์ค ๋ก๋
y, sr = librosa.load(audio_file)
# ํน์ง ์ถ์ถ
mfcc = librosa.feature.mfcc(y=y, sr=sr, n_mfcc=13)
mfcc_mean = np.mean(mfcc, axis=1)
# ํผ์น ๋ถ์
pitches, magnitudes = librosa.piptrack(y=y, sr=sr)
pitch_mean = np.mean(pitches[pitches > 0])
# ์๋์ง ๋ถ์
energy = np.sum(y ** 2) / len(y)
# ๊ฐ๋จํ ๊ฐ์ ๋ถ๋ฅ (์ค์ ๋ก๋ ML ๋ชจ๋ธ ์ฌ์ฉ)
if energy > 0.01 and pitch_mean > 200:
emotion = "ํฅ๋ถ"
elif energy < 0.005:
emotion = "์ฐจ๋ถ"
else:
emotion = "๋ณดํต"
return emotion
except Exception as e:
return "์ ์ ์์"
# ๊ฐ์ ์ ๋ฐ๋ฅธ ์๋ต ์กฐ์
def emotion_aware_response(query, emotion):
"""๊ฐ์ ์ ๊ณ ๋ คํ ์๋ต"""
if emotion == "ํฅ๋ถ":
speak("๋ง์ด ํฅ๋ถํ์ ๊ฒ ๊ฐ๋ค์. ์ฒ์ฒํ ๋ง์ํด์ฃผ์ธ์.")
elif emotion == "์ฐจ๋ถ":
speak("์ฐจ๋ถํ์๋ค์. ํธ์ํ๊ฒ ๋ง์ํด์ฃผ์ธ์.")
# ์ผ๋ฐ ๋ช
๋ น ์ฒ๋ฆฌ
process_command(query)
# Coqui TTS ์ฌ์ฉ
from TTS.api import TTS
def custom_voice_speak(text, voice_sample_path):
"""์ปค์คํ
์์ฑ์ผ๋ก ๋งํ๊ธฐ"""
try:
tts = TTS(model_name="tts_models/multilingual/multi-dataset/your_tts")
# ์์ฑ ์์ฑ
tts.tts_to_file(
text=text,
speaker_wav=voice_sample_path,
language="ko",
file_path="output.wav"
)
# ์์ฑ๋ ์์ฑ ์ฌ์
import pygame
pygame.mixer.init()
pygame.mixer.music.load("output.wav")
pygame.mixer.music.play()
while pygame.mixer.music.get_busy():
time.sleep(0.1)
except Exception as e:
print(f"์์ฑ ์์ฑ ์ค๋ฅ: {e}")
# ํด๋ฐฑ: ๊ธฐ๋ณธ TTS ์ฌ์ฉ
speak(text)
Level 2: ์๋ ๋ถ๋ฅ + ๊ฐ์ฒด๋ช ์ธ์
Level 3: GPT ์ฐ๋ + ์ปจํ ์คํธ ์ดํด
Level 4: ๊ฐ์ ์ธ์ + ๊ฐ์ธํ
Level 5: ๋ฉํฐ๋ชจ๋ฌ (์์ฑ + ์ด๋ฏธ์ง + ํ ์คํธ)
๋จ๊ณ๋ณ๋ก ์ฐจ๊ทผ์ฐจ๊ทผ ๋ฐ์ ์์ผ ๋๊ฐ๋ ๊ฒ ์ค์ํด!
๐ผ ์์ฉํ ๋ฐ ์์ตํ ์ ๋ต
๋ง๋ ์์ฑ ๋น์๋ก ์์ต์ ์ฐฝ์ถํ ์๋ ์์ด! ๐ฐโข ์๊ฐ/๋ ์ง ์๋ฆผ
โข ๊ฐ๋จํ ๊ฒ์
ํ๋ฆฌ๋ฏธ์ ๊ธฐ๋ฅ (์ 9,900์)
โข GPT ๊ธฐ๋ฐ ์์ฐ์ด ๋ํ
โข ๋ฌด์ ํ API ํธ์ถ
โข ์บ๋ฆฐ๋ ์ฐ๋
โข ์ด๋ฉ์ผ ์๋ํ
โข ์ปค์คํ ์์ฑ
โข ์ฐ์ ์ง์
โข ๋ณ์ (์์ฝ ๊ด๋ฆฌ, ํ์ ์๋ด)
โข ํธํ (๊ฐ์ค ์๋น์ค)
โข ๊ต์ก ๊ธฐ๊ด (ํ์ต ๋์ฐ๋ฏธ)
โข ์ ์กฐ์ (๊ณต์ฅ ์๋ํ)
์์ต ๋ชจ๋ธ
โข ์ด๊ธฐ ๊ฐ๋ฐ๋น: 500๋ง์ ~ 3,000๋ง์
โข ์ ์ ์ง๋ณด์๋น: 50๋ง์ ~ 200๋ง์
โข ๋ผ์ด์ ์ค ํ๋งค
โข "ํ์ด์ฌ ์์ฑ ๋น์ ๊ฐ๋ฐ ๊ณผ์ธ" (์๊ฐ๋น 3๋ง์~5๋ง์)
โข "๋ง์ถคํ AI ๋น์ ๊ฐ๋ฐ" (ํ๋ก์ ํธ๋น 50๋ง์~)
โข "์์ฑ ์ธ์ ์์คํ ์ปจ์คํ " (์๊ฐ๋น 5๋ง์~)
โข "AI ๊ฐ๋ฐ ๋ฉํ ๋ง" (์ 20๋ง์~)
์ค์ ํ๋ก์ ํธ ๊ฒฝํ์ด ์์ผ๋ฉด ๋ ๋์ ๊ฐ๊ฒฉ์ ๋ฐ์ ์ ์์ง!
# README.md ์์
## ํ์ํ๊ธฐ
์ด ํ๋ก์ ํธ๊ฐ ๋์์ด ๋์
จ๋ค๋ฉด ํ์์ ๊ณ ๋ คํด์ฃผ์ธ์!
- GitHub Sponsors: [๋งํฌ]
- Buy Me a Coffee: [๋งํฌ]
- Patreon: [๋งํฌ]
ํ์์ ํํ:
- ํ๋ฆฌ๋ฏธ์ ๊ธฐ๋ฅ ๋ฌด๋ฃ ์ด์ฉ
- ์ฐ์ ๊ธฐ์ ์ง์
- ์ด๋ฆ ํฌ๋ ๋ง ํ์
๐ ํ์ต ๋ฆฌ์์ค ๋ฐ ์ปค๋ฎค๋ํฐ
ํผ์ ๊ณต๋ถํ๊ธฐ ํ๋ค ๋๋ ์ด๋ฐ ๋ฆฌ์์ค๋ค์ ํ์ฉํด๋ด! ๐| ๋ถ์ผ | ๋ฆฌ์์ค | ๋์ด๋ |
|---|---|---|
| ์์ฑ ์ธ์ | SpeechRecognition ๊ณต์ ๋ฌธ์, Mozilla DeepSpeech | ์ด๊ธ~์ค๊ธ |
| ์์ฐ์ด ์ฒ๋ฆฌ | KoNLPy ํํ ๋ฆฌ์ผ, spaCy ๊ฐ์ข | ์ค๊ธ |
| AI/ML | Andrew Ng์ Machine Learning, Fast.ai | ์ค๊ธ~๊ณ ๊ธ |
| ์์ฑ ํฉ์ฑ | pyttsx3 ๋ฌธ์, Coqui TTS | ์ด๊ธ |
โข Discord: Python Discord, AI/ML ํ๊ตญ ์ปค๋ฎค๋ํฐ
โข Stack Overflow: ๊ธฐ์ ์ ์ง๋ฌธ
โข GitHub Discussions: ์คํ์์ค ํ๋ก์ ํธ ํ ๋ก
โข ์นด์นด์คํก ์คํ์ฑํ : ํ์ด์ฌ ๊ฐ๋ฐ์ ๋ชจ์, AI ์คํฐ๋
๐ฑ ๊ตญ๋ด ์ปค๋ฎค๋ํฐ
โข ์ํ์ฝ๋ฉ
โข ์ฝ๋ฉ๋์ฅ
โข ํ์ด์ฌ ์ฝ๋ฆฌ์
โข AI Korea
1. GitHub: ์ฝ๋ ๊ณต๊ฐ + README ์์ฑ
2. YouTube: ๋ฐ๋ชจ ์์ ์ ๋ก๋
3. ๋ธ๋ก๊ทธ: ๊ฐ๋ฐ ๊ณผ์ ์ ๋ฆฌ
4. LinkedIn: ํ๋กํ์ ๋ ๋คํธ์ํน
5. ์ฌ๋ฅ๋ท: ์ค์ ์๋น์ค ์ ๊ณต
๐ฌ ๋ง๋ฌด๋ฆฌํ๋ฉฐ
์, ์ฌ๊ธฐ๊น์ง ํ์ด์ฌ์ผ๋ก ์์ฑ ๋ช ๋ นํ AI ๋น์๋ฅผ ๋ง๋๋ ์ ๊ณผ์ ์ ์ดํด๋ดค์ด! ๐์ฒ์์๋ ๋ณต์กํด ๋ณด์ผ ์ ์์ง๋ง, ํ๋์ฉ ์ฐจ๊ทผ์ฐจ๊ทผ ๋ฐ๋ผํ๋ค ๋ณด๋ฉด ์ด๋์ ๋ฉ์ง ์์ฑ ๋น์๋ฅผ ๋ง๋ค ์ ์์ ๊ฑฐ์ผ. ์ค์ํ ๊ฑด ํฌ๊ธฐํ์ง ์๊ณ ๊ณ์ ์๋ํ๋ ๊ฒ์ด์ผ.
2. ํ์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ: SpeechRecognition, pyttsx3, PyAudio
3. ๊ณ ๊ธ ๊ธฐ๋ฅ: GPT ์ฐ๋, ๊ฐ์ ์ธ์, ์ธ๋ถ API ํ์ฉ
4. ์ต์ ํ: ์บ์ฑ, ๋ฉํฐ์ค๋ ๋ฉ, ์๋ฌ ์ฒ๋ฆฌ
5. ์ค์ ๋ฐฐํฌ: ๋ก๊น , ํ ์คํธ, ์คํ ํ์ผ ์์ฑ
6. ์์ตํ: ํ๋ฆฌ๋ฏธ์ ๋ชจ๋ธ, B2B ์๋ฃจ์ , ํ๋ซํผ ํ์ฉ
2. ์์ ๋ง์ ์ปค์คํ ๋ช ๋ น ์ถ๊ฐํ๊ธฐ
3. ์น๊ตฌ๋ ๊ฐ์กฑ์๊ฒ ์์ฐํ๊ณ ํผ๋๋ฐฑ ๋ฐ๊ธฐ
4. GitHub์ ํ๋ก์ ํธ ์ ๋ก๋ํ๊ธฐ
5. ๋ ๊ณ ๊ธ ๊ธฐ๋ฅ ์ถ๊ฐํด์ ํฌํธํด๋ฆฌ์ค ๋ง๋ค๊ธฐ
6. ์ฌ๋ฅ๋ท์์ ๊ด๋ จ ์๋น์ค ์ ๊ณตํ๊ฑฐ๋ ๋ฉํ ๋ง ๋ฐ๊ธฐ
ํน์ ๊ฐ๋ฐ ์ค์ ๋งํ๋ ๋ถ๋ถ์ด ์๊ฑฐ๋, ๋ ์ ๋ฌธ์ ์ธ ๋์์ด ํ์ํ๋ค๋ฉด ์ฌ๋ฅ๋ท ๊ฐ์ ํ๋ซํผ์์ ์ ๋ฌธ๊ฐ์ ๋์์ ๋ฐ๋ ๊ฒ๋ ์ข์ ๋ฐฉ๋ฒ์ด์ผ. ๋๋ก๋ ๊ฒฝํ ๋ง์ ๊ฐ๋ฐ์์ ํ ๋ง๋ ์กฐ์ธ์ด ๋ฉฐ์น ๊ฐ์ ์ฝ์ง์ ์ค์ฌ์ค ์ ์๊ฑฐ๋ ! ๐
์, ์ด์ ๋น์ ๋ง์ AI ๋น์๋ฅผ ๋ง๋ค์ด๋ณผ ์๊ฐ์ด์ผ! ํ์ดํ ! ๐โจ
๊ด๋ จ ํค์๋
๋๊ธ ์์ฑ
์ด ๊ธ์ ๋ํ ์ฌ๋ฌ๋ถ์ ์๊ฐ์ ๋ค๋ ค์ฃผ์ธ์
๋ก๊ทธ์ธ์ด ํ์ํฉ๋๋ค
๋๊ธ์ ์์ฑํ๋ ค๋ฉด ๋จผ์ ๋ก๊ทธ์ธํด์ฃผ์ธ์.
๋๊ธ 0
์ง์์ธ์ ์ฒ - ์ง์ ์ฌ์ฐ๊ถ ๋ณดํธ ๊ณ ์ง
์ง์ ์ฌ์ฐ๊ถ ๋ณดํธ ๊ณ ์ง
- ์ ์๊ถ ๋ฐ ์์ ๊ถ: ๋ณธ ์ปจํ ์ธ ๋ ์ฌ๋ฅ๋ท์ ๋ ์ AI ๊ธฐ์ ๋ก ์์ฑ๋์์ผ๋ฉฐ, ๋ํ๋ฏผ๊ตญ ์ ์๊ถ๋ฒ ๋ฐ ๊ตญ์ ์ ์๊ถ ํ์ฝ์ ์ํด ๋ณดํธ๋ฉ๋๋ค.
- AI ์์ฑ ์ปจํ ์ธ ์ ๋ฒ์ ์ง์: ๋ณธ AI ์์ฑ ์ปจํ ์ธ ๋ ์ฌ๋ฅ๋ท์ ์ง์ ์ฐฝ์๋ฌผ๋ก ์ธ์ ๋๋ฉฐ, ๊ด๋ จ ๋ฒ๊ท์ ๋ฐ๋ผ ์ ์๊ถ ๋ณดํธ๋ฅผ ๋ฐ์ต๋๋ค.
- ์ฌ์ฉ ์ ํ: ์ฌ๋ฅ๋ท์ ๋ช ์์ ์๋ฉด ๋์ ์์ด ๋ณธ ์ปจํ ์ธ ๋ฅผ ๋ณต์ , ์์ , ๋ฐฐํฌ, ๋๋ ์์ ์ ์ผ๋ก ํ์ฉํ๋ ํ์๋ ์๊ฒฉํ ๊ธ์ง๋ฉ๋๋ค.
- ๋ฐ์ดํฐ ์์ง ๊ธ์ง: ๋ณธ ์ปจํ ์ธ ์ ๋ํ ๋ฌด๋จ ์คํฌ๋ํ, ํฌ๋กค๋ง, ๋ฐ ์๋ํ๋ ๋ฐ์ดํฐ ์์ง์ ๋ฒ์ ์ ์ฌ์ ๋์์ด ๋ฉ๋๋ค.
- AI ํ์ต ์ ํ: ์ฌ๋ฅ๋ท์ AI ์์ฑ ์ปจํ ์ธ ๋ฅผ ํ AI ๋ชจ๋ธ ํ์ต์ ๋ฌด๋จ ์ฌ์ฉํ๋ ํ์๋ ๊ธ์ง๋๋ฉฐ, ์ด๋ ์ง์ ์ฌ์ฐ๊ถ ์นจํด๋ก ๊ฐ์ฃผ๋ฉ๋๋ค.
์์ง ๋๊ธ์ด ์์ต๋๋ค.