Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@fern-api/assemblyai
Advanced tools
[![npm shield](https://img.shields.io/npm/v/@fern-api/assemblyai)](https://www.npmjs.com/package/@fern-api/assemblyai) [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern)
The Assembly AI Node.js library provides access to the Assembly AI API from JavaScript/TypeScript.
API reference documentation is available here.
npm install --save @fern-api/assemblyai
# or
yarn add @fern-api/assemblyai
The SDK exports a vanilla HTTP client, AssemblyAIClient
. You can
use this to call into each of our API endpoints and get typed
responses back.
import { AssemblyAIClient } from "@fern-api/assemblyai";
const aai = new AssemblyAIClient({
apiKey: "YOUR_API_KEY",
});
const transcript = await aai.transcript.get("transcript-id");
console.log("Received response!", transcript);
When the API returns a non-success status code (4xx or 5xx response), a subclass of AssemblyAIError will be thrown:
import { AssemblyAIClient, AssemblyAIError } from "@fern-api/assemblyai";
try {
const transcript = await aai.transcript.get("transcript-id");
} catch (err) {
if (err instanceof AssemblyAIError) {
console.log(err.statusCode);
console.log(err.message);
console.log(err.body);
}
}
The HTTP Client accepts a RequestOptions
class where you can specify
a customized timeout.
const transcript = await aai.transcript.get("transcript-id", {
timeoutInSeconds: 60 // increase timeout in seconds
});
Additionally, the SDK also exports a Transcriber class that has utilities on top of the HTTP client, such as automatic polling.
import { Transcriber } from "@fern-api/assemblyai";
const transcriber = new Transcriber({
apiKey: "YOUR_API_KEY",
});
const transcript = await transcriber.transcribe({
data: "https://example.org/audio.mp3",
poll: true,
});
console.log(transcript.text);
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning the package version to a specific version in your package.json file. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
While we value open-source contributions to this SDK, this library is generated programmatically. Additions made directly to this library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!
On the other hand, contributions to the README are always very welcome!
FAQs
[![npm shield](https://img.shields.io/npm/v/@fern-api/assemblyai)](https://www.npmjs.com/package/@fern-api/assemblyai) [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern)
The npm package @fern-api/assemblyai receives a total of 0 weekly downloads. As such, @fern-api/assemblyai popularity was classified as not popular.
We found that @fern-api/assemblyai demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.