
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
sber-salute-speech-recognition
Advanced tools
A library that produces audio transcriptions using the SBER Salute Speech service.
A library for getting audio transcriptions from the SBER Salute Speech service https://developers.sber.ru/docs/ru/salutespeech/recognition/recognition-sync.
npm install sber-salute-speech-recognition
import {
SberSaluteSpeechRecognitionService,
AudioEncoding,
} from 'sber-salute-speech-recognition';
const recognitionService = new SberSaluteSpeechRecognitionService(AUTH_KEY);
const { text, normalizedText } = await recognitionService.speechToText(
pathToAudioFile,
AudioEncoding.MP3,
);
The scope
property is set during the instantiation of the SberSaluteSpeechRecognitionService
class.
If no value is provided, it defaults to Scope.Personal
.
Here is an example of how to use the scope
property:
import {
SberSaluteSpeechRecognitionService,
Scope,
} from 'sber-salute-speech-recognition';
const service = new SberSaluteSpeechRecognitionService(
AUTH_KEY,
undefined,
Scope.Corporate
);
In this example, the scope
property is set to Scope.Corporate
what equals SALUTE_SPEECH_CORP
.
If you want to use the SALUTE_SPEECH_PERS
scope,
you can either pass Scope.Personal
as the third argument or omit the third argument entirely,
as it defaults to Scope.Personal
.
For improve speech recognition you can pass in speechToText
method hints param
Here is example of how to use the hints
param:
import {
SberSaluteSpeechRecognitionService,
AudioEncoding,
} from 'sber-salute-speech-recognition';
const recognitionService = new SberSaluteSpeechRecognitionService(AUTH_KEY);
const { text, normalizedText } = await recognitionService.speechToText(
pathToAudioFile,
AudioEncoding.MP3,
{
words: ['card', 'name'],
enable_letters: true,
eou_timeout: "2s"
}
);
In this example , we pass object with props words
, enable_letters
, eou_timeout
.
words
- A list of words or phrases whose recognition we want to strengthen.
Here you can list the words that the user is likely to pronounce
enable_letters
- A short phrase model that improves recognition of single letters and short words.
Possible values: true
and false
eou_timeout
- Setting up recognition of the end of a phrase (End of Utterance - eou).
Such recognition will be expected after the end of the phrase for as many seconds as set in this parameter.
Possible values are from 0.5 to 5 seconds.
The channels_count allows to override the number of channels to recognize in the audio file. If not specified, the number of channels will be determined automatically.
Possible values: undefined - channels count will be determined automatically 1 - mono 2 - stereo
import {
SberSaluteSpeechRecognitionService,
AudioEncoding,
} from 'sber-salute-speech-recognition';
const recognitionService = new SberSaluteSpeechRecognitionService(AUTH_KEY);
const { text, normalizedText } = await recognitionService.speechToText(
pathToAudioFile,
AudioEncoding.MP3,
1
);
In this example we set channels count to 1.
FAQs
A library that produces audio transcriptions using the SBER Salute Speech service.
The npm package sber-salute-speech-recognition receives a total of 82 weekly downloads. As such, sber-salute-speech-recognition popularity was classified as not popular.
We found that sber-salute-speech-recognition demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.