Skip to content

Commit

Permalink
high level updates
Browse files Browse the repository at this point in the history
  • Loading branch information
roderick-bishop11 committed Mar 13, 2024
1 parent 1f76088 commit 411eb9e
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
*.idea/
14 changes: 14 additions & 0 deletions ELO/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tool.poetry]
name = "elo"
version = "0.1.0"
description = ""
authors = ["Roderick Bishop <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
54 changes: 54 additions & 0 deletions ELO/src/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import speech_recognition as sr
from gtts import gTTS
import os
import openai

# Set your OpenAI API key
openai.api_key = 'your-api-key'

def recognize_speech():
recognizer = sr.Recognizer()

with sr.Microphone() as source:
print("Say something:")
recognizer.adjust_for_ambient_noise(source)
audio = recognizer.listen(source)

try:
print("Recognizing...")
text = recognizer.recognize_google(audio)
print(f"You said: {text}")
return text
except sr.UnknownValueError:
print("Could not understand audio.")
return None
except sr.RequestError as e:
print(f"Error with the speech recognition service; {e}")
return None

def chat_with_gpt(prompt):
response = openai.Completion.create(
engine="text-davinci-002",
prompt=prompt,
max_tokens=150
)

return response['choices'][0]['text']

def speak_text(text):
tts = gTTS(text=text, lang='en')
tts.save("output.mp3")
os.system("mpg321 output.mp3")

def main():
while True:
user_input = recognize_speech()

if user_input:
gpt_response = chat_with_gpt(user_input)
print(f"Assistant: {gpt_response}")

speak_text(gpt_response)

if __name__ == "__main__":
main()
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
# ELO
ELO is the Enhanced Logical Organism. An AI powered personal robot for the lab.
# ELO = Enhanced Logic Operative

## Objective

To create an environment control plane entity powered by AI.

## Overview

This project has 3 parts

- [assistant](https://github.com/roderick-bishop11/ELO/tree/main/assistant): the AI powered assistant
- [ui](https://github.com/roderick-bishop11/ELO/tree/main/ui): the desktop UI for this application
- [v1 enclosure](https://github.com/roderick-bishop11/ELO/tree/main/enclosure): the project detailing the physical enclosure of the ELO protoype

## to do

- [ ] CI/CD pipeline
- [ ] Readme's
- [ ] Feature set
- [ ] wireframes
- [x] module separation
- [ ] startup/config function for assistant
- [ ] What does the SDLC look like for this project
- [ ] delivery spec -> when it's delivered v1, how will it be delieverd?
- `python main.py`
- executable?
14 changes: 14 additions & 0 deletions assistant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ Tony Stark, J.A.R.V.I.S. and Robert Elo Bishop(my grandfather). ELO is meant to
- [OpenAI API](https://platform.openai.com/docs/overview)- interact with models
- [Exa](https://github.com/exa-labs/exa-py)- Search for AI

## to do

- [ ] CI/CD pipeline
- [ ] Readme's
- Feature set
- wireframes
- module separation
- startup/config function
- What does the SDLC look like
- delivery spec -> when it's delivered v1, how will it be delieverd?
- `python main.py`
- executable?


## Changelog

- 3.8.24: Got instruction on project organization/implementation. Separate part into epics/bodies of work. Could use JIRA or some other tool to organize and stay on track. Simplify README & develop a more clear project.
Expand Down

0 comments on commit 411eb9e

Please sign in to comment.