Updated OI, added try

pull/84/head
killian 10 months ago
parent a82b4b264f
commit 83b776bd1a

@ -1,6 +1,7 @@
from dotenv import load_dotenv
load_dotenv() # take environment variables from .env.
import traceback
from platformdirs import user_data_dir
import ast
import json
@ -183,6 +184,7 @@ async def send_messages(websocket: WebSocket):
async def listener():
while True:
try:
while True:
if not from_user.empty():
chunk = await from_user.get()
@ -205,7 +207,7 @@ async def listener():
if message["type"] == "audio" and message["format"].startswith("bytes"):
if not message["content"]: # If it was nothing / silence
if "content" not in message or message["content"] == None: # If it was nothing / silence
continue
# Convert bytes to audio file
@ -312,7 +314,8 @@ async def listener():
logger.info("New computer message recieved. Breaking.")
break
except:
traceback.print_exc()
async def stream_tts_to_device(sentence):
force_task_completion_responses = [

3128
01OS/poetry.lock generated

File diff suppressed because one or more lines are too long

@ -24,11 +24,11 @@ pydub = "^0.25.1"
ngrok = "^1.0.0"
simpleaudio = "^1.0.4"
opencv-python = "^4.9.0.80"
open-interpreter = { git = "https://github.com/KillianLucas/open-interpreter.git", branch = "development" }
psutil = "^5.9.8"
typer = "^0.9.0"
platformdirs = "^4.2.0"
rich = "^13.7.1"
open-interpreter = "^0.2.2"
[build-system]
requires = ["poetry-core"]

Loading…
Cancel
Save