![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@picovoice/koala-web
Advanced tools
Made in Vancouver, Canada by Picovoice
Koala is an on-device noise suppression engine. Koala is:
IndexedDB is required to use Koala
in a worker thread. Browsers without IndexedDB support
(i.e. Firefox Incognito Mode) should use Koala
in the main thread.
Using Yarn
:
yarn add @picovoice/koala-web
or using npm
:
npm install --save @picovoice/koala-web
Koala requires a valid Picovoice AccessKey
at initialization. AccessKey
acts as your credentials when using Koala 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
.
For the web packages, there are two methods to initialize Koala.
NOTE: Due to modern browser limitations of using a file URL, this method does not work if used without hosting a server.
This method fetches the model file from the public directory and feeds it to Koala. Copy the model file into the public directory:
cp ${KOALA_MODEL_FILE} ${PATH_TO_PUBLIC_DIRECTORY}
NOTE: This method works without hosting a server, but increases the size of the model file roughly by 33%.
This method uses a base64 string of the model file and feeds it to Koala. Use the built-in script pvbase64
to
base64 your model file:
npx pvbase64 -i ${KOALA_MODEL_FILE} -o ${OUTPUT_DIRECTORY}/${MODEL_NAME}.js
The output will be a js file which you can import into any file of your project. For detailed information about pvbase64
,
run:
npx pvbase64 -h
Koala saves and caches your model file in IndexedDB to be used by WebAssembly. Use a different customWritePath
variable
to hold multiple models and set the forceWrite
value to true to force re-save a model file.
Either base64
or publicPath
must be set to instantiate Koala. If both are set, Koala will use the base64
model.
const koalaModel = {
publicPath: ${MODEL_RELATIVE_PATH},
// or
base64: ${MODEL_BASE64_STRING},
// Optionals
customWritePath: "koala_model",
forceWrite: false,
version: 1,
}
Set processErrorCallback
to handle errors if an error occurs while enhancing audio.
Create a processCallback
function to get the streaming results from the engine:
// Optional
const options = {
processErrorCallback: (error) => {}
}
function processCallback(enhancedPcm: Int16Array) {
// do something with enhancedPcm
}
Create an instance of Koala
on the main thread:
const handle = await Koala.create(
${ACCESS_KEY},
processCallback,
koalaModel,
options // optional options
);
Or create an instance of Koala
in a worker thread:
const handle = await KoalaWorker.create(
${ACCESS_KEY},
processCallback,
koalaModel,
options // optional options
);
The process
function will send the input frames to the engine.
The enhanced audio is received from processCallback
as mentioned above.
In case the next audio frame does not follow the previous one, call reset
before calling process
.
function getAudioFrame(): Int16Array {
... // function to get a frame of audio
return new Int16Array();
}
await handle.reset();
for (;;) {
await handle.process(getAudioFrame());
// break on some condition
}
Clean up used resources by Koala
or KoalaWorker
:
await handle.release();
Terminate KoalaWorker
instance:
await handle.terminate();
For example usage refer to our Web demo application.
FAQs
Koala Noise Suppression engine for web browsers (via WebAssembly)
The npm package @picovoice/koala-web receives a total of 0 weekly downloads. As such, @picovoice/koala-web popularity was classified as not popular.
We found that @picovoice/koala-web demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.