
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
@vocalstack/js-sdk
Advanced tools
VocalStack is a platform that can be used for building voice applications. See more at https://vocalstack.com.
This repository contains the official VocalStack SDK for JavaScript. It provides a simple way to interact with the VocalStack API. Most notably, it helps implement asynchronous bidirectional communication such as live stream transcriptions in just a few lines of code. This SDK will work in both Node.js and the browser.
Before you start, install the VocalStack JavaScript SDK using your preferred Node package manager, such as npm:
npm install @vocalstack/js-sdk
Also make sure to have a VocalStack account and an API key, which you can generate at https://vocalstack.com/dashboard/api-keys. There is a free tier available, so you can start experimenting right away.
Here is a quick example of how to use the SDK to transcribe a file from a URL:
import { UrlTranscription } from '@vocalstack/js-sdk';
const sdk = new UrlTranscription({ apiKey: 'YOUR-API-KEY' });
const transcription = await sdk.connect({
url: 'http://example.com/files/meaningless.mp3',
});
transcription.start();
// This will print the transcription data as it comes in
transcription.onData(console.log);
/*
{
status: 'processing',
data: {
id: 'd1e7b3b0-7b3b-4b3b-8b3b-0b3b7b3b3b3b',
operation: 'transcription-prerecorded',
progress: 0.1,
timeline: [
{
start: 0,
end: 7.52,
text: 'Meaningless, meaningless, says the teacher, utterly meaningless, everything is meaningless.',
language: 'en',
translations: { ... },
},
...
]
}
}
*/
Transcribe Audio from URL: Transcribe speech from pre-recorded audio in a URL to plain text. Major file formats are supported, including MP3, WAV, FLAC, and OGG.
Transcribe from a Microphone or LiveStream: Transcribe live speech from a microphone or live stream. Integrate with Polyglot to create a public shareable link for the transcription which users can read in any language.
Transcribe and Present a Polyglot Session: Create a session that can be used to broadcast a live transcription via a public shareable link. Users can read live transcriptions in their preferred language, and even past transcriptions when your session is inactive.
Translate a Transcription: Translate transcribed text to another language. This can be done for any transcription, including prerecorded transcriptions, live transcriptions or Polyglot session transcriptions.
Get Transcription Data: Get data from pending or completed transcriptions. This includes the transcription timeline, key words, summary, and paragraph segments.
Client Side Authentication Tokens: Create a temporary authentication token for client side requests. Safely implement API requests in web browsers without exposing your API keys.
Transcription Sessions: Monitor and manage transcription state with sessions. Using sessions you can reconnect to a previously created asynchronous connection.
Transcription Request and Response: Common request options and responses for all transcription operations. Use options to configure the transcription settings.
FAQs
A JavaScript API Client and SDK for VocalStack
The npm package @vocalstack/js-sdk receives a total of 0 weekly downloads. As such, @vocalstack/js-sdk popularity was classified as not popular.
We found that @vocalstack/js-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.