misc old changes
This commit is contained in:
parent
49edcd4985
commit
60e98f9889
@ -1,32 +1,22 @@
|
|||||||
version: '3.4'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
kevinai:
|
chat-server:
|
||||||
image: kevinai
|
image: node:20-alpine
|
||||||
container_name: kevinai-dev
|
container_name: ml-voice-chat-server
|
||||||
build:
|
working_dir: /usr/src/app
|
||||||
context: .
|
volumes:
|
||||||
dockerfile: ./Dockerfile
|
- /mnt/apps/DEV/REPOS/git.d-popov.com/ai-kevin:/usr/src/app
|
||||||
environment:
|
command: >
|
||||||
NODE_ENV: production
|
sh -c "npm install && node web/chat-server.js"
|
||||||
# TTS_BACKEND_URL: http://192.168.0.10:9009/asr
|
|
||||||
WS_URL: ws://192.168.0.10:28081
|
|
||||||
SERVER_PORT_WS: 8081
|
|
||||||
SERVER_PORT_HTTP: 8080
|
|
||||||
ports:
|
|
||||||
- 28081:8081
|
|
||||||
- 28080:8080
|
|
||||||
mlchat:
|
|
||||||
image: kevinai
|
|
||||||
container_name: kevinai-chat
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: ./Dockerfile
|
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: demo
|
NODE_ENV: demo
|
||||||
# TTS_BACKEND_URL: http://192.168.0.10:9009/asr
|
#TTS_BACKEND_URL: https://api.tts.d-popov.com/asr
|
||||||
WS_URL: wss://tts.d-popov.com
|
TTS_API_URL: http://192.168.0.11:9009/asr
|
||||||
SERVER_PORT_WS: 8080
|
WS_URL: wss://ws.tts.d-popov.com
|
||||||
SERVER_PORT_HTTP: 8080
|
SERVER_PORT_HTTP: 8080
|
||||||
|
SERVER_PORT_WS: 8082
|
||||||
ports:
|
ports:
|
||||||
- 28080:8080
|
- 28080:8080
|
||||||
|
- 28081:8082
|
||||||
|
dns:
|
||||||
|
- 8.8.8.8
|
||||||
|
- 8.8.4.4
|
@ -290,7 +290,7 @@
|
|||||||
|
|
||||||
showClearSessionOption();
|
showClearSessionOption();
|
||||||
connect().then(() => {
|
connect().then(() => {
|
||||||
// audio.initializeVolumeChecker();
|
initializeVolumeChecker();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ const Groq = require('groq-sdk');
|
|||||||
|
|
||||||
// Load environment variables
|
// Load environment variables
|
||||||
dotenv.config({ path: `.env${process.env.NODE_ENV === 'development' ? '.development' :'.'+ process.env.NODE_ENV }` });
|
dotenv.config({ path: `.env${process.env.NODE_ENV === 'development' ? '.development' :'.'+ process.env.NODE_ENV }` });
|
||||||
|
console.log(`loaded env file: ${process.env.NODE_ENV}`)
|
||||||
|
|
||||||
// Initialize services
|
// Initialize services
|
||||||
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
|
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
|
||||||
|
@ -173,7 +173,7 @@
|
|||||||
// count speaking and silence
|
// count speaking and silence
|
||||||
if (averageVolume > threshold) {
|
if (averageVolume > threshold) {
|
||||||
if (autosend.checked && speakingCount == 0 && audioRecorder) {
|
if (autosend.checked && speakingCount == 0 && audioRecorder) {
|
||||||
console.log("startint new recording");
|
console.log("starting new recording");
|
||||||
soundDetected = false;
|
soundDetected = false;
|
||||||
audioRecorder.stop();
|
audioRecorder.stop();
|
||||||
audioRecorder.start();
|
audioRecorder.start();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user