I am getting this error in node js. Below is the code I am trying to execute
function createStream(msg, roomId, room) {
console.log("yha hu bhai 1")
const deepgram = createClient("86a44f8b878c89fb519e7415dec769974ada82dc" );
console.log("yha hu bhai 2")
const connection = deepgram.listen.live({
model: "nova-2",
smart_format: true,
encoding: "linear16",
sample_rate: 8000,
channels: 1,
});
console.log("yha hu bhai 3")
room.recognizeStream = connection ;
connection.on(LiveTranscriptionEvents.Open, () => {
console.log("yha hu bhai 4")
connection.on(LiveTranscriptionEvents.Close, () => {
console.log("Connection closed.");
});
connection.on(LiveTranscriptionEvents.Transcript, (transcription) => {
if(!room.isAiSpeaking){
room.isAiSpeaking = true;
room.lastActivity = Date.now();
console.log("TEXT : " + Date.now());
//textToSpeechRespond(getRandomElement() , roomId, true);
respondBack(transcription , roomId, room);
}
else{
console.log(transcription , " ignored" ) ;
}
console.dir(transcription, { depth: null });
});
});
}
error logs are :
yha hu bhai 1
The base URL provided does not begin with http, https, ws, or wss and will default to https as standard.
yha hu bhai 2
The base URL provided does not begin with http, https, ws, or wss and will default to https as standard.
yha hu bhai 3