
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@picovoice/leopard-react-native
Advanced tools
Made in Vancouver, Canada by Picovoice
Leopard is an on-device speech-to-text engine. Leopard is:
This binding is for running Leopard on React Native 0.62.2+ on the following platforms:
To start install, be sure you have installed yarn and cocoapods. Then, add the following native modules to your react-native project:
yarn add @picovoice/leopard-react-native
or
npm i @picovoice/leopard-react-native --save
Link the iOS package
cd ios && pod install && cd ..
NOTE: Due to a limitation in React Native CLI auto-linking, the native module cannot be included as a transitive dependency. If you are creating a module that depends on leopard-react-native, you will have to list these as peer dependencies and require developers to install it alongside.
Leopard requires a valid Picovoice AccessKey at initialization. AccessKey acts as your credentials when using Leopard SDKs.
You can get your AccessKey for free. Make sure to keep your AccessKey secret.
Signup or Login to Picovoice Console to get your AccessKey.
Create an instance of Leopard:
import { Leopard, LeopardErrors } from '@picovoice/leopard-react-native'
const accessKey = "${ACCESS_KEY}" // AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)
const modelPath = "${LEOPARD_MODEL_PATH}" // path relative to the assets folder or absolute path to file on device
try {
const leopard = await Leopard.create(accessKey, modelPath)
} catch (err: any) {
if (err instanceof LeopardErrors) {
// handle error
}
}
Transcribe an audio file by passing the file path to Leopard:
try {
const { transcript, words } = await leopard.processFile("${AUDIO_FILE_PATH}")
console.log(transcript)
} catch (err: any) {
if (err instanceof LeopardErrors) {
// handle error
}
}
Finally, when done be sure to explicitly release the resources using leopard.delete().
Create a custom model using the Picovoice Console or use one of the default language models found in lib/common.
To add a Leopard model file to your Android application, add the file as a bundled resource by placing it under the assets directory of your Android application.
To add a Leopard model file to your iOS application, add the file as a bundled resource by selecting Build Phases in Xcode and adding it to the Copy Bundle Resources step.
Along with the transcript, Leopard returns metadata for each transcribed word. Available metadata items are:
[0, 1].0 reserved for unknown speakers. If speaker diarization is not enabled, the value will always be -1.For example usage refer to our React Native demo application.
FAQs
Picovoice Leopard React Native binding
The npm package @picovoice/leopard-react-native receives a total of 33 weekly downloads. As such, @picovoice/leopard-react-native popularity was classified as not popular.
We found that @picovoice/leopard-react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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 researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.