
Product
Introducing Socket Scanning for OpenVSX Extensions
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
@project-sunbird/open-speech-streaming-client
Advanced tools
Streaming client library for EkStep open speech API
This package contains a client lib to provide real-time streaming functionality for Open Speech API https://open-speech-ekstep.github.io/.
Step 1: Install the package
npm i @project-sunbird/open-speech-streaming-client
Step 2: Connect to socket and stream
import {StreamingClient,SocketStatus} from '@project-sunbird/open-speech-streaming-client'
//Create instance of streaming client.
const streamingClient= new StreamingClient();
//Connect to inferencing server
streaming.connect('<inferencing-server-url>', 'en-IN'/* langugaue*/, function (action, id) {
if (action === SocketStatus.CONNECTED) {
// Once connection is succesful, start streaming
streaming.startStreaming(function (transcript) {
// transcript will give you the text which can be used further
console.log('transcript:', transcript);
}, (e) => {
console.log("I got error", e);
})
} else if (action === SocketStatus.TERMINATED) {
// Socket is closed and punctuation can be done after it.
} else {
//unexpected failures action on connect.
console.log("Action", action, id);
}
})
Punctuation
You can punctuate a text using the punctuation endpoint.
streaming.punctuateText('Text to punctuate', '<inferencing-server-url>', (status, text) => {
console.log("Punctuted Text:", text);
}, (status, error) => {
console.log("Failed to punctuate", status, error);
});
SocketStatus
SocketStatus has two possible states.CONNECTED and TERMINATED
This repo contains examples inside examples directory
React Example
Location: examples/react-example
This example has a React implementation of a streaming client which points to https://inference.vakyansh.in.
You can start example by npm start from inside examples/react-example.
By default, this examples will point to parent repo as SDK so make sure you have dependencies installed on parent project. You can change to point npm by updating package.json
FAQs
Streaming client library for EkStep open speech API
The npm package @project-sunbird/open-speech-streaming-client receives a total of 90 weekly downloads. As such, @project-sunbird/open-speech-streaming-client popularity was classified as not popular.
We found that @project-sunbird/open-speech-streaming-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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 scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies