{"id":21423917,"url":"https://github.com/picovoice/koala","last_synced_at":"2025-07-14T08:31:39.472Z","repository":{"id":65445882,"uuid":"589710065","full_name":"Picovoice/koala","owner":"Picovoice","description":"On-device noise suppression powered by deep learning","archived":false,"fork":false,"pushed_at":"2025-06-23T19:25:21.000Z","size":30273,"stargazers_count":73,"open_issues_count":0,"forks_count":4,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-06-23T20:28:14.838Z","etag":null,"topics":["noise-cancellation","noise-reduction","noise-suppression","on-device","picovoice","speech-enhancement"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Picovoice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-16T18:53:05.000Z","updated_at":"2025-06-23T19:25:23.000Z","dependencies_parsed_at":"2023-12-13T16:52:42.393Z","dependency_job_id":"1e822a75-d13d-490f-956e-fdd446f4cbb0","html_url":"https://github.com/Picovoice/koala","commit_stats":{"total_commits":81,"total_committers":7,"mean_commits":"11.571428571428571","dds":"0.32098765432098764","last_synced_commit":"19872db46d0cc5249204fdbd86279778d17a81e6"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Picovoice/koala","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picovoice%2Fkoala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picovoice%2Fkoala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picovoice%2Fkoala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picovoice%2Fkoala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Picovoice","download_url":"https://codeload.github.com/Picovoice/koala/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picovoice%2Fkoala/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265262609,"owners_count":23736428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["noise-cancellation","noise-reduction","noise-suppression","on-device","picovoice","speech-enhancement"],"created_at":"2024-11-22T21:18:52.103Z","updated_at":"2025-07-14T08:31:34.426Z","avatar_url":"https://github.com/Picovoice.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Koala\n\n[![GitHub release](https://img.shields.io/github/release/Picovoice/Koala.svg)](https://github.com/Picovoice/Koala/releases)\n[![GitHub](https://img.shields.io/github/license/Picovoice/koala)](https://github.com/Picovoice/koala/)\n\n[![Maven Central](https://img.shields.io/maven-central/v/ai.picovoice/koala-android?label=maven-central%20%5Bandroid%5D)](https://repo1.maven.org/maven2/ai/picovoice/koala-android/)\n[![npm](https://img.shields.io/npm/v/@picovoice/koala-web?label=npm%20%5Bweb%5D)](https://www.npmjs.com/package/@picovoice/koala-web)\n[![CocoaPods](https://img.shields.io/cocoapods/v/Koala-iOS)](https://cocoapods.org/pods/Koala-iOS)\u003c!-- markdown-link-check-disable-line --\u003e\n[![PyPI](https://img.shields.io/pypi/v/pvkoala)](https://pypi.org/project/pvkoala/)\n\nMade in Vancouver, Canada by [Picovoice](https://picovoice.ai)\n\n[![Twitter URL](https://img.shields.io/twitter/url?label=%40AiPicovoice\u0026style=social\u0026url=https%3A%2F%2Ftwitter.com%2FAiPicovoice)](https://twitter.com/AiPicovoice)\u003c!-- markdown-link-check-disable-line --\u003e\n[![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UCAdi9sTCXLosG1XeqDwLx7w?label=YouTube\u0026style=social)](https://www.youtube.com/channel/UCAdi9sTCXLosG1XeqDwLx7w)\n\nKoala is an on-device noise suppression engine. Koala is:\n\n- Private; All voice processing runs locally.\n- Cross-Platform:\n  - Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)\n  - Android and iOS\n  - Chrome, Safari, Firefox, and Edge\n  - Raspberry Pi (3, 4, 5)\n\n## Table of Contents\n\n- [Koala](#koala)\n  - [Table of Contents](#table-of-contents)\n  - [AccessKey](#accesskey)\n  - [Demos](#demos)\n    - [Python Demos](#python-demos)\n    - [Android Demo](#android-demo)\n    - [iOS Demo](#ios-demo)\n    - [C Demos](#c-demos)\n    - [Web Demo](#web-demo)\n  - [SDKs](#sdks)\n    - [Python](#python)\n    - [Android](#android)\n    - [iOS](#ios)\n    - [C](#c)\n    - [Web](#web)\n  - [Releases](#releases)\n\n## AccessKey\n\nAccessKey is your authentication and authorization token for deploying Picovoice SDKs, including Koala. Anyone who is\nusing Picovoice needs to have a valid AccessKey. You must keep your AccessKey secret. You would need internet\nconnectivity to validate your AccessKey with Picovoice license servers even though the noise suppression is running 100%\noffline.\n\nAccessKey also verifies that your usage is within the limits of your account. Everyone who signs up for\n[Picovoice Console](https://console.picovoice.ai/) receives the `Free Tier` usage rights described\n[here](https://picovoice.ai/pricing/). If you wish to increase your limits, you can purchase a subscription plan.\n\n## Demos\n\n### Python Demos\n\nInstall the demo package:\n\n```console\npip3 install pvkoalademo\n```\n\n```console\nkoala_demo_mic --access_key ${ACCESS_KEY} --output_path ${WAV_OUTPUT_PATH}\n```\n\n```console\nkoala_demo_file \\\n    --access_key ${ACCESS_KEY} \\\n    --input_path ${WAV_INPUT_PATH} \\\n    --output_path ${WAV_OUTPUT_PATH}\n```\n\nReplace `${ACCESS_KEY}` with yours obtained from Picovoice Console.\n\n### Android Demo\n\nUsing [Android Studio](https://developer.android.com/studio/index.html), open\n[demo/android/Activity](./demo/android/Activity) as an Android project and then run the application.\n\nReplace `\"${YOUR_ACCESS_KEY_HERE}\"` in the file [MainActivity.java](./demo/android/Activity/koala-activity-demo-app/src/main/java/ai/picovoice/koalaactivitydemo/MainActivity.java) with your `AccessKey`.\n\n### iOS Demo\n\nCopy your `AccessKey` into the `ACCESS_KEY` variable inside [`ViewModel.swift`](./demo/ios/KoalaDemo/KoalaDemo/ViewModel.swift).\n\nBefore building the demo app, run the following from [`KoalaDemo`](./demo/ios/KoalaDemo) directory to install the `Koala-iOS` CocoaPod:\n\n```ruby\npod install\n```\n\nOpen [KoalaDemo.xcworkspace](./demo/ios/KoalaDemo/KoalaDemo.xcworkspace) and run the demo.\n\n\n### C Demos\n\nBuild the demo:\n\n```console\ncmake -S demo/c/ -B demo/c/build \u0026\u0026 cmake --build demo/c/build --target koala_demo_mic\n```\n\nTo list the available audio input devices:\n\n```console\n./demo/c/build/koala_demo_mic -s\n```\n\nTo run the demo:\n\n```console\n./demo/c/build/koala_demo_mic -l ${LIBRARY_PATH} -m ${MODEL_PATH} -a ${ACCESS_KEY} -o ${WAV_OUTPUT_PATH}\n```\n\nReplace `${LIBRARY_PATH}` with path to appropriate library available under [lib](./lib), `${MODEL_PATH}` with path\nto the model file available under [lib/common](./lib/common), `${ACCESS_KEY}` with AccessKey\nobtained from [Picovoice Console](https://console.picovoice.ai/), and `${WAV_OUTPUT_PATH}` with a path to a `.wav` file\nwhere the enhanced audio will be stored. Terminate the demo with `Ctrl+C`.\n\nFor more information about C demos go to [demo/c](./demo/c).\n\n### Web Demo\n\nFrom [demo/web](./demo/web) run the following in the terminal:\n\n```console\nyarn\nyarn start\n```\n\n(or)\n\n```console\nnpm install\nnpm run start\n```\n\nOpen `http://localhost:5000` in your browser to try the demo.\n\n## SDKs\n\n### Python\n\nInstall the Python SDK:\n\n```console\npip3 install pvkoala\n```\n\nCreate an instance of the engine and enhance audio in real-time:\n\n```python\nimport pvkoala\n\nkoala = pvkoala.create(access_key='${ACCESS_KEY}')\n```\n\nReplace `${ACCESS_KEY}` with yours obtained from Picovoice Console.\n\n```python\ndef get_next_audio_frame():\n    pass\n\nwhile True:\n    enhanced_audio = koala.process(get_next_audio_frame())\n```\n\nFinally, when done be sure to explicitly release the resources using `koala.delete()`.\n\n### Android\n\nTo include the package in your Android project, ensure you have included `mavenCentral()` in your top-level `build.gradle` file and then add the following to your app's `build.gradle`:\n\n```groovy\ndependencies {\n    implementation 'ai.picovoice:koala-android:${LATEST_VERSION}'\n}\n```\n\nCreate an instance of the engine and enhance audio in real-time:\n\n```java\nimport ai.picovoice.koala.*;\n\nfinal String accessKey = \"${ACCESS_KEY}\"; // AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)\n\nshort[] getNextAudioFrame() {\n    // .. get audioFrame\n    return audioFrame;\n}\n\ntry {\n    Koala koala = new Koala.Builder()\n        .setAccessKey(accessKey)\n        .build(appContext);\n\n    while true {\n        short[] enhancedFrame = koala.process(getNextAudioFrame());\n    };\n\n} catch (KoalaException ex) { }\n```\n\nReplace `${ACCESS_KEY}` with yours obtained from [Picovoice Console](https://console.picovoice.ai/).\n\n### iOS\n\nCreate an instance of the engine and enhance audio:\n\n```swift\nimport Koala\n\ndo {\n  let koala = try Koala(accessKey: \"${ACCESS_KEY}\")\n} catch {}\n\nfunc getNextAudioFrame() -\u003e [Int16] {\n  // .. get a frame of audio\n  return audioFrame;\n}\n\nwhile true {\n  do {\n    let enhancedAudio = try koala.process(getNextAudioFrame())\n    // .. use enhanced audio\n  } catch {}\n}\n```\n\nReplace `${ACCESS_KEY}` with yours obtained from [Picovoice Console](https://console.picovoice.ai/).\n\nIn case the next audio frame does not directly follow the previous one, call `koala.reset()`.\n\nWhen done be sure to explicitly release the resources using `koala.delete()`.\n\n### C\n\n[include/pv_koala.h](./include/pv_koala.h) header file contains relevant information. Build an instance of the object:\n\n```c\n    pv_koala_t *handle = NULL;\n    const char *model_path = \"${MODEL_PATH}\";\n    pv_status_t status = pv_koala_init(${ACCESS_KEY}, model_path, \u0026handle);\n    if (status != PV_STATUS_SUCCESS) {\n        // error handling logic\n    }\n```\n\nReplace `${ACCESS_KEY}` with the AccessKey obtained from Picovoice Console, and `${MODEL_PATH}` with the path to the\nmodel file available under [lib/common](./lib/common).\n\nNow the `handle` can be used to enhance audio in real-time:\n\n```c\nextern const int16_t *get_next_audio_frame(void);\n\nconst int32_t frame_length = pv_koala_frame_length();\nint16_t *enhanced_pcm = (int16_t *) malloc(frame_length * sizeof(int16_t));\n\nwhile (true) {\n    const int16_t *pcm = get_next_audio_frame();\n    const pv_status_t status = pv_koala_process(handle, pcm, enhanced_pcm);\n    if (status != PV_STATUS_SUCCESS) {\n        // error handling logic\n    }\n}\n```\n\nFinally, when done be sure to release the acquired resources:\n\n```c\npv_koala_delete(handle);\n```\n\n### Web\n\nInstall the web SDK using yarn:\n\n```console\nyarn add @picovoice/koala-web\n```\n\nor using npm:\n\n```console\nnpm install --save @picovoice/koala-web\n```\n\nCreate an instance of the engine using `KoalaWorker` and enhance audio in real-time:\n\n```typescript\nimport { Koala } from \"@picovoice/koala-web\";\nimport koalaParams from \"${PATH_TO_BASE64_KOALA_PARAMS}\";\n\nfunction processCallback(enhancedPcm) {\n  // do something with enhancedPcm\n}\n\nfunction getAudioData(): Int16Array {\n... // function to get audio data\n  return new Int16Array();\n}\n\nconst koala = await KoalaWorker.create(\n  \"${ACCESS_KEY}\",\n  processCallback,\n  { base64: koalaParams },\n);\n\nawait koala.reset();\nfor (;;) {\n    await koala.process(getAudioData());\n}\n```\n\nReplace `${ACCESS_KEY}` with yours obtained from [Picovoice Console](https://console.picovoice.ai/). Finally, when done release the resources using `koala.release()`.\n\n## Releases\n\n### v2.0.0 - November 24th, 2023\n\n- Improvements to error reporting\n- Upgrades to authorization and authentication system\n- Various bug fixes and improvements\n- Web min support bumped to Node 16\n- iOS support bumped to iOS 13\n\n### v1.0.0 - February 7th, 2023\n\n- Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicovoice%2Fkoala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpicovoice%2Fkoala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicovoice%2Fkoala/lists"}