
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
@deepgram/sdk
Advanced tools
Official Node.js SDK for Deepgram's automated speech recognition APIs.
This SDK only supports hosted usage of api.deepgram.com.
To access the API you will need a Deepgram account. Sign up for free at signup.
Full documentation of the Node.js SDK can be found on the Deepgram Developer Portal.
You can learn more about the full Deepgram API at https://developers.deepgram.com.
npm install @deepgram/sdk
yarn add @deepgram/sdk
const { Deepgram } = require("@deepgram/sdk");
const deepgram = new Deepgram(DEEPGRAM_API_KEY);
const fileSource = { url: URL_OF_FILE };
const response = await deepgram.transcription.preRecorded(fileSource, {
punctuate: true,
});
const streamSource = {
stream: fs.createReadStream("/path/to/file"),
mimetype: MIMETYPE_OF_FILE,
};
const response = await deepgram.transcription.preRecorded(streamSource, {
punctuate: true,
});
navigator.mediaDevices.getUserMedia({ audio: true }).then((stream) => {
const mediaRecorder = new MediaRecorder(stream, {
mimeType: 'audio/webm',
});
const deepgramSocket = deepgram.transcription.live({ punctuate: true });
deepgramSocket.addListener('open', () => {
mediaRecorder.addEventListener('dataavailable', async (event) => {
if (event.data.size > 0 && deepgramSocket.readyState == 1) {
deepgramSocket.send(event.data)
}
})
mediaRecorder.start(1000)
});
deepgramSocket.addListener("transcriptReceived", (received) => {
const transcript = received.channel.alternatives[0].transcript;
if (transcript && received.is_final) {
console.log(transcript);
}
});
});
To run the sample code, first run the following in your terminal:
npm install
npm build
Then update the config object located at the top of the index.js
file in the sample folder.
const config = {
deepgramApiKey: "YOUR_DEEPGRAM_API_KEY",
urlToFile:
"https://static.deepgram.com/examples/Bueller-Life-moves-pretty-fast.wav",
};
Finally, run the sample code using the following command in your terminal:
node sample/index.js
The sample demonstrates the following uses:
Interested in contributing? We ❤️ pull requests!
To make sure our community is safe for all, be sure to review and agree to our Code of Conduct. Then see the Contribution guidelines for more information.
We love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:
Check out the Developer Documentation at https://developers.deepgram.com/
FAQs
Isomorphic Javascript client for Deepgram
The npm package @deepgram/sdk receives a total of 83,028 weekly downloads. As such, @deepgram/sdk popularity was classified as popular.
We found that @deepgram/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.