diff --git a/app.py b/app.py index 1813cf2..e99cf76 100644 --- a/app.py +++ b/app.py @@ -21,9 +21,12 @@ import logging logger = logging.getLogger("uvicorn") -# from dotenv import load_dotenv # Load environment variables from .env file +from dotenv import load_dotenv # Load environment variables from .env file + +load_dotenv() + + -# load_dotenv() app = FastAPI() diff --git a/backend/speech_proccessing.py b/backend/speech_proccessing.py index 310853a..3b41125 100644 --- a/backend/speech_proccessing.py +++ b/backend/speech_proccessing.py @@ -1,10 +1,10 @@ # import wave import numpy as np -# import tensorflow.lite as tflite +import tensorflow.lite as tflite import zipfile import time -import tflite_runtime.interpreter as tflite +# import tflite_runtime.interpreter as tflite import logging diff --git a/static/script.js b/static/script.js index 21651b1..2270746 100644 --- a/static/script.js +++ b/static/script.js @@ -80,7 +80,7 @@ function stopRecording(){ async function connect_ws(user_id){ return new Promise((resolve, reject) => { - const socket = new WebSocket(`wss://${window.location.hostname}:${window.location.port}/ws/`+user_id); + const socket = new WebSocket(`ws://${window.location.hostname}:${window.location.port}/ws/`+user_id); socket.onopen = function(event) { resolve(socket) };