Closed yashjais closed 5 months ago
If you want to make client-side requests, you need to use v3 of the SDK.
Could you point me to a working example of the code of v3?
Also, I am able to get the transcription when I am hitting the DeepGram API, it's just that when I point the URL to my instance, it starts giving error.
nvm. I found it.
But with the new version, I'm not even able to get a transcription and getting this error when I use the above code.
TypeError: _sdk.Deepgram is not a constructor
@yashjais can you tell me what exactly you're trying to achieve in brief? I might be able to whip up a small example that can help. I think there is a mix up here in your code between the old version and the new.
(I'm speaking to Dustin and Jason internally, too)
@lukeocodes
I am trying to get the transcription using the streaming method via my AWS instance.
The architecture is like -> From the frontend, I am calling my backend(via socket - sending binary data) and then in the backend, I'm using DeepGram JS SDK to get the transcription.
When I just use the DeepGram server to get the transcription, it's working fine and well.
const deepgram = new Deepgram(DEEPGRAM_API_KEY);
But when I hit my instance to get the transcription, it's giving me 400.
const apiUrl = 'instance.com'; // **WILL NOT GET THE TRANSCRIPTOIN, WHEN USING THIS**
const requireSSL = false;
const deepgram = new Deepgram(DEEPGRAM_API_KEY, apiUrl, requireSSL);
Now I can think of a couple of issues that can cause this.
I believe this has now been resolved!
What is the current behavior?
I am not able to get the transcription when I use the WebSocket with the new AWS instance that I created.
I'm getting the following error.
Steps to reproduce
Whenever I open the socket from the frontend, the error shows up. But when I request the DeepGram's server, the transcription comes fine(line number 25 in the
handleDeepGramWebSocketConnection
function).Here's the backend code I'm using.
Here's the relevant frontend code
Expected behavior
I SHOULD get the results if I hit the newly created AWS instance.
Also, the issue should be in Websocket code. As I am able to get the transcription from the pre-recorded audio.
Please tell us about your environment
Other information
Here are the docker logs from the instance when I hit the request. The status in this logs is 400, so I should be missing something from the request.