
Product
Announcing Socket Certified Patches: One-Click Fixes for Vulnerable Dependencies
A safer, faster way to eliminate vulnerabilities without updating dependencies
@project-sunbird/open-speech-streaming-client
Advanced tools
Streaming client library for EkStep open speech API
This package contains the client library to provide real-time streaming functionality for Open Speech API https://open-speech-ekstep.github.io/asr_model_api/. It requires a Socket.io proxy to support it. Details of the proxy can be found https://github.com/Open-Speech-EkStep/speech-recognition-open-api-proxy.
Visit Speech Recognititon Streaming API for architecture and other details.
The preferred way to install the client SDK for Node.js is to use the npm package manager for Node.js. Run the following into a terminal window:
npm i @project-sunbird/open-speech-streaming-client
To use the client SDK in a react native project, first install the SDK using npm:
npm i @project-sunbird/open-speech-streaming-client
Then within your application, you can reference the react native compatible version of the SDK with the following:
import { StreamingClient, SocketStatus } from '@project-sunbird/open-speech-streaming-client';
Import the StreamingClient module and create an instance.
import {StreamingClient,SocketStatus} from '@project-sunbird/open-speech-streaming-client'
//Create instance of streaming client.
const streamingClient= new StreamingClient();
Connect to the streaming server with the url and the language required.
//Connect to inferencing server
const inferenceServerURL = '<inferencing-server-url>';
const language = '<language>'; //(eg: 'en')
streaming.connect(inferenceServerURL, language, 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);
}
})
If punctuation needed in the client sdk, do the following: [Note: Use this inside the condition block(action === SocketStatus.TERMINATED)]
streaming.punctuateText('<Text to punctuate>', '<punctuation-url>', (status, text) => {
console.log("Punctuted Text:", text);
}, (status, error) => {
console.log("Failed to punctuate", status, error);
});
SocketStatus has two possible states.CONNECTED and TERMINATED
This repo contains samples in examples directory.
Location: examples/react-example
This example has a React implementation of a streaming client.
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
The best way to interact with our team is through GitHub. Please open an issue in github.
FAQs
Streaming client library for EkStep open speech API
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
A safer, faster way to eliminate vulnerabilities without updating dependencies

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.