Skip to content

deepgram-devs/js-live-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deepgram Live Transcriptions Example (JavaScript)

ALPHA

This is a basic express server that shows the basic setup for live audio transcriptions using Deepgram.

The code can be found in the following places:

Client code

This code gets access to the users microphone which will be used as the audio input. Once data is available from the microphone, it gets sent to the server via websocket.

When data comes back from the server on the print-transcript event, it takes the text and adds it to the body.

Server code

The server code creates a new web socket called globalSocket that communicates with the client. When data comes in from the client it then sends that data to Deepgram via the SDK. (Note that the Deepgram SDK is just setting up a websocket connection with Deepgram).

Running the application locally

Create a .env file with your own Deepgram API Key.

Run the following commands to install the dependencies and run the application

npm i
npm run dev

Accessing the running application in your browser

Once the server is running, open the following url in the browser

http://localhost:3000/

Click on the button when you're ready to transcribe.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published