Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@deepgram/sdk
Advanced tools
Node.js official SDK for Deepgram's automated speech recognition APIs.
To access the API you will need a Deepgram account. Sign up for free at try.deepgram.com.
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({
apiKey: DEEPGRAM_API_KEY,
apiSecret: DEEPGRAM_API_SECRET,
apiUrl: CUSTOM_API_URL,
});
The transcribe
method can receive the url to a file or a buffer with a file
to transcribe. Additional options can be provided to customize the result.
const response = await deepgram.transcribe(URL_OR_BUFFER_OF_FILE, {
punctuate: true,
// other options are available
});
{
// AI model used to process submitted audio.
model?: "general" | "phonecall" | "meeting" | "<custom-id>",
// BCP-47 language tag that hints at the primary spoken language.
// Defaults to en-US
language?: "en-GB" | "en-IN" | "en-NZ" | "en-US" | "es" | "fr" | "ko" | "pt" | "pt-BR" | "ru" | "tr" | null,
// Indicates whether to add punctuation and capitalization to the transcript.
punctuate?: true | false,
// Indicates whether to remove profanity from the transcript.
profanity_filter?: true | false,
// Maximum number of transcript alternatives to return.
// Defaults to 1
alternatives?: integer,
// Indicates whether to redact sensitive information, replacing redacted
// content with asterisks (*).
redact?: ["pci", "numbers", "ssn"],
// Indicates whether to recognize speaker changes.
diarize?: true | false,
// Indicates whether to transcribe each audio channel independently.
multichannel?: true | false,
// Indicates whether to convert numbers from written format (e.g., one) to
// numerical format (e.g., 1).
numerals?: true | false,
// Terms or phrases to search for in the submitted audio.
search?: [string],
// Callback URL to provide if you would like your submitted audio to be
// processed asynchronously.
callback?: string,
// Keywords to which the model should pay particular attention to boosting
// or suppressing to help it understand context.
keywords?: [string],
// Indicates whether Deepgram will segment speech into meaningful semantic
// units, which allows the model to interact more naturally and effectively
// with speakers' spontaneous speech patterns.
utterances?: true | false,
// Length of time in seconds of silence between words that Deepgram will
// use when determining where to split utterances. Used when utterances
// is enabled.
// Defaults to 0.8 seconds
utt_split?: number,
// Mimetype of the source
// Mimetype is required if the provided source is a buffer
mimetype?: string,
}
Retrieve all keys using the keys.list
method.
const response = await deepgram.keys.list();
{
keys: [
{
key: "API KEY",
label: "KEY LABEL",
},
];
}
Create a new API key using the keys.create
method with a label for the
key.
const response = await deepgram.keys.create("label for key");
{
key: "API KEY",
secret: "API SECRET",
label: "LABEL PROVIDED"
}
Delete an existing API key using the keys.delete
method with the key to
delete.
await deepgram.keys.delete("key to delete");
A sample js file is in the sample
directory. To run it, update the config
located at the top of the file.
const config = {
deepgramApiKey: "Your Deepgram API Key",
deepgramApiSecret: "Your Deepgram API Secret",
urlToFile: "Url to audio file",
};
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 51,867 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.