diff --git a/cli/cloud/deploy.mdx b/cli/cloud/deploy.mdx index db137df9..2079231b 100644 --- a/cli/cloud/deploy.mdx +++ b/cli/cloud/deploy.mdx @@ -56,11 +56,15 @@ pipecat cloud deploy [ARGS] [OPTIONS] [Discord](https://discord.gg/dailyco). - - Enable Krisp noise cancellation for this deployed agent. In addition, you also - need to enable the `KrispFilter()` for your transport. See the [Krisp Noise - Cancellation](/deployment/pipecat-cloud/guides/krisp-noise-cancellation) guide - for more information. + + Enable Krisp VIVA noise cancellation with the specified audio filter model. + Valid values are: + + - `tel`: Telephony model (up to 16kHz) + - `pro`: WebRTC model (up to 32kHz) + +In addition to this flag, you also need to enable the `KrispVivaFilter()` for your transport. See the [Krisp VIVA](/server/utilities/audio/krisp-viva-filter) documentation for more information. + @@ -130,6 +134,12 @@ pipecat cloud deploy my-first-agent your-docker-repository/my-first-agent:0.1 -- pipecat cloud deploy my-first-agent your-docker-repository/my-first-agent:0.1 --region eu-central ``` +**Deploy with Krisp VIVA noise cancellation:** + +```shell +pipecat cloud deploy my-first-agent your-docker-repository/my-first-agent:0.1 --krisp-viva-audio-filter tel +``` + ## Configuration File (pcc-deploy.toml) The `deploy` command supports a configuration file for repeatable deployments. Create a `pcc-deploy.toml` file in your project root to define deployment settings that can be shared across your team and version controlled. diff --git a/deployment/pipecat-cloud/guides/ci-with-github-actions.mdx b/deployment/pipecat-cloud/guides/ci-with-github-actions.mdx index 728845b4..fe359a23 100644 --- a/deployment/pipecat-cloud/guides/ci-with-github-actions.mdx +++ b/deployment/pipecat-cloud/guides/ci-with-github-actions.mdx @@ -36,54 +36,56 @@ name: Docker Image CI on: push: - branches: [ "main" ] + branches: ["main"] jobs: deploy: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Get date - id: date - run: echo "date=$(date +'%F')" >> $GITHUB_OUTPUT - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and Push - uses: docker/build-push-action@v5 - with: - platforms: linux/arm64 - context: . - push: true - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:latest - ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ steps.date.outputs.date }} - - - name: Deploy to Pipecat Cloud - run: | - curl -X POST https://api.pipecat.daily.co/v1/agents/${{ github.event.repository.name }} \ - -H "Authorization: Bearer ${{ secrets.PCC_API_KEY }}" \ - -H "Content-Type: application/json" \ - -d '{ - "image": "${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ steps.date.outputs.date }}", - "imagePullSecretSet": "my-image-pull-secret", - "secretSet": "my-secret-set", - "enableKrisp": true, - "autoScaling": { - "minAgents": 0, - "maxAgents": 10 - } - }' + - name: Checkout + uses: actions/checkout@v4 + + - name: Get date + id: date + run: echo "date=$(date +'%F')" >> $GITHUB_OUTPUT + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and Push + uses: docker/build-push-action@v5 + with: + platforms: linux/arm64 + context: . + push: true + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:latest + ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ steps.date.outputs.date }} + + - name: Deploy to Pipecat Cloud + run: | + curl -X POST https://api.pipecat.daily.co/v1/agents/${{ github.event.repository.name }} \ + -H "Authorization: Bearer ${{ secrets.PCC_API_KEY }}" \ + -H "Content-Type: application/json" \ + -d '{ + "image": "${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ steps.date.outputs.date }}", + "imagePullSecretSet": "my-image-pull-secret", + "secretSet": "my-secret-set", + "krispViva": { + "audioFilter": "tel" + }, + "autoScaling": { + "minAgents": 0, + "maxAgents": 10 + } + }' ``` This workflow will: @@ -132,9 +134,9 @@ name: Docker Image CI on: push: - branches: [ "main" ] + branches: ["main"] paths: - - 'server/**' + - "server/**" jobs: deploy: @@ -144,47 +146,49 @@ jobs: working-directory: ./server steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Get date - id: date - run: echo "date=$(date +'%F')" >> $GITHUB_OUTPUT - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and Push - uses: docker/build-push-action@v5 - with: - platforms: linux/arm64 - context: ./server - push: true - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:latest - ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ steps.date.outputs.date }} - - - name: Deploy to Pipecat Cloud - run: | - curl -X POST https://api.pipecat.daily.co/v1/agents/${{ github.event.repository.name }} \ - -H "Authorization: Bearer ${{ secrets.PCC_API_KEY }}" \ - -H "Content-Type: application/json" \ - -d '{ - "image": "${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ steps.date.outputs.date }}", - "imagePullSecretSet": "my-image-pull-secret", - "secretSet": "my-secret-set", - "enableKrisp": true, - "autoScaling": { - "minAgents": 0, - "maxAgents": 10 - } - }' + - name: Checkout + uses: actions/checkout@v4 + + - name: Get date + id: date + run: echo "date=$(date +'%F')" >> $GITHUB_OUTPUT + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and Push + uses: docker/build-push-action@v5 + with: + platforms: linux/arm64 + context: ./server + push: true + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:latest + ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ steps.date.outputs.date }} + + - name: Deploy to Pipecat Cloud + run: | + curl -X POST https://api.pipecat.daily.co/v1/agents/${{ github.event.repository.name }} \ + -H "Authorization: Bearer ${{ secrets.PCC_API_KEY }}" \ + -H "Content-Type: application/json" \ + -d '{ + "image": "${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ steps.date.outputs.date }}", + "imagePullSecretSet": "my-image-pull-secret", + "secretSet": "my-secret-set", + "krispViva": { + "audioFilter": "tel" + }, + "autoScaling": { + "minAgents": 0, + "maxAgents": 10 + } + }' ``` The `paths` filter ensures the workflow only runs when files in the `server/` directory change, preventing unnecessary builds. @@ -206,17 +210,16 @@ To use native ARM runners when available: ```yml jobs: deploy: - runs-on: ubuntu-24.04-arm # Use ARM runner + runs-on: ubuntu-24.04-arm # Use ARM runner steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - # Remove the "Set up QEMU" step entirely - - - name: Login to Docker Hub - uses: docker/login-action@v3 - # ... rest of workflow + # Remove the "Set up QEMU" step entirely + - name: Login to Docker Hub + uses: docker/login-action@v3 + # ... rest of workflow ``` ## Customizing Deployment Configuration @@ -226,7 +229,7 @@ The deployment step in the workflow configures your agent using the Pipecat Clou - `image`: The Docker image tag to deploy - `imagePullSecretSet`: Reference to your image pull credentials (replace `my-image-pull-secret` with your actual secret name) - `secretSet`: Reference to your environment secrets (replace `my-secret-set` with your actual secret set name) -- `enableKrisp`: Enable or disable Krisp noise suppression +- `krispViva.audioFilter`: The Krisp VIVA audio filter model to use (replace `tel` with your actual filter model) - `autoScaling.minAgents`: Minimum number of agent instances to maintain - `autoScaling.maxAgents`: Maximum number of agent instances allowed diff --git a/deployment/pipecat-cloud/guides/daily-webrtc.mdx b/deployment/pipecat-cloud/guides/daily-webrtc.mdx index 6952ed43..7042b27c 100644 --- a/deployment/pipecat-cloud/guides/daily-webrtc.mdx +++ b/deployment/pipecat-cloud/guides/daily-webrtc.mdx @@ -19,9 +19,10 @@ The integrated Daily API key provides: - **Built-in compatibility**: All Pipecat base images work with Daily out of the box - While 1:1 voice minutes are included, additional Daily features like - recording, transcription, and PSTN/SIP connections are billed according to - [Daily's standard pricing](https://www.daily.co/pricing). + Free voice minutes apply only to 1:1 voice sessions running on Pipecat Cloud. + Video sessions, WebRTC sessions outside of Pipecat Cloud, and additional Daily + features (recording, transcription, PSTN/SIP) are billed according to [Daily's + standard pricing](https://www.daily.co/pricing/webrtc-infrastructure/). ## Using Daily with Pipecat Cloud Agents diff --git a/deployment/pipecat-cloud/guides/krisp-noise-cancellation.mdx b/deployment/pipecat-cloud/guides/krisp-noise-cancellation.mdx deleted file mode 100644 index d2ef4f79..00000000 --- a/deployment/pipecat-cloud/guides/krisp-noise-cancellation.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: "Krisp Noise Cancellation" -description: "Eliminate background noise and voices for more reliable agent interactions" ---- - - - The `KrispFilter` is deprecated and will be removed in a future version. - Please use the `KrispVivaFilter`, which is the latest model from Krisp. See - the [Krisp VIVA guide](/deployment/pipecat-cloud/guides/krisp-viva) for more - information. - - -## Overview - -Voice agents are vulnerable to background noise, especially other voices that trigger false interruptions. When this happens, your bot stops mid-sentence unnecessarily, creating a poor user experience. Pipecat Cloud's Krisp integration processes incoming audio to remove ambient noise and background voices before they reach your agent, resulting in cleaner audio input with fewer false interruptions and better transcription. - - - Krisp processes the audio before it reaches your agent's speech recognition - and VAD systems, helping to ensure that only the intended user's voice - triggers interruptions. - - -## Enabling Krisp - -Enabling Krisp with Pipecat Cloud involves the following steps: - -### 1. Use the Pipecat Base Image - -Krisp dependencies are pre-installed in the official Pipecat base image. You don't need to add any Krisp-related packages to your `requirements.txt` file. - - - Krisp support is available in the `dailyco/pipecat-base` image starting with - version `0.0.6`. - - -### 2. Add the Krisp Filter to Your Transport - -In your bot code, import and add the `KrispFilter` to your transport: - -```python -from pipecat.audio.filters.krisp_filter import KrispFilter -from pipecat.audio.vad.silero import SileroVADAnalyzer -from pipecat.transports.daily.transport import DailyParams, DailyTransport - -transport = DailyTransport( - room_url, - token, - "Voice AI Bot", - DailyParams( - audio_in_enabled=True, - audio_in_filter=KrispFilter(), # Add Krisp filter here - audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), - ), -) -``` - -### 3. Enable Krisp in Your Deployment - -You can enable Krisp when deploying your agent through: - - - - - ```bash - pipecat cloud deploy --enable-krisp true - ``` - - - - -In your `pcc-deploy.toml`: - -```toml -agent_name = "voice-starter" -image = "your-repo/voice-starter:0.1" -secret_set = "voice-starter-secrets" -enable_krisp = true - -[scaling] -min_agents = 0 - -``` - - - - In the Pipecat Cloud dashboard: - - 1. Navigate to your agent - 2. Go to Settings > Agent Configuration - 3. Toggle "Krisp Noise Cancellation" on - 4. Save your changes - - - - - - Once configured, your agent will process incoming audio through Krisp's noise - cancellation. - - -## Testing Your Integration - -To verify Krisp is working: - -1. Deploy your agent with Krisp enabled -2. Connect to your agent in an environment with background noise; try turning on a TV or podcast -3. Observe whether background noises and voices affect your agent's behavior - -## Pricing - -Krisp processing is billed based on active session minutes: - -| Usage Tier | Price | -| ------------------------------- | ------------------ | -| First 100,000 minutes per month | Free | -| Additional minutes | $0.0002 per minute | - - - For agents deployed with Krisp enabled, active session minutes count as Krisp - usage, accruing towards your monthly bill. - - -## Local Development - -Krisp cannot be used in local development environments, as it requires a proprietary SDK and model which can only be distributed on Pipecat Cloud. When running locally be sure to not import the KrispFilter module and don't apply it to your transport. - -## Troubleshooting - -If you're experiencing issues with Krisp noise cancellation: - -- Verify `enable_krisp` is set to `true` in your deployment configuration -- Confirm you've added the `KrispFilter()` to your transport configuration -- Check your logs for any Krisp-related error messages -- Confirm that you have not added any Krisp-related dependencies to your `requirements.txt` file, as they are not needed and may cause conflicts. -``` diff --git a/deployment/pipecat-cloud/rest-reference/openapi-agent-list-one.json b/deployment/pipecat-cloud/rest-reference/openapi-agent-list-one.json index 9c20ff14..3a2c8b03 100644 --- a/deployment/pipecat-cloud/rest-reference/openapi-agent-list-one.json +++ b/deployment/pipecat-cloud/rest-reference/openapi-agent-list-one.json @@ -74,6 +74,10 @@ "krispModels": { "enabled": false }, + "krispViva": { + "audioFilters": true, + "version": "20251010" + }, "enableManagedKeys": { "enabled": false } @@ -252,6 +256,20 @@ } } }, + "krispViva": { + "type": "object", + "description": "Krisp VIVA noise cancellation configuration", + "properties": { + "audioFilters": { + "type": "boolean", + "description": "Whether Krisp VIVA audio filters are enabled" + }, + "version": { + "type": "string", + "description": "Version of the Krisp VIVA models" + } + } + }, "enableManagedKeys": { "type": "object", "description": "Managed API keys configuration", diff --git a/docs.json b/docs.json index aa0d541b..934bd2f7 100644 --- a/docs.json +++ b/docs.json @@ -65,7 +65,6 @@ "group": "Features", "pages": [ "guides/features/pipecat-flows", - "guides/features/krisp", "guides/features/krisp-viva", "guides/features/whatsapp", "guides/features/gemini-live", @@ -256,7 +255,6 @@ "server/utilities/audio/aic-filter", "server/utilities/audio/audio-buffer-processor", "server/utilities/audio/koala-filter", - "server/utilities/audio/krisp-filter", "server/utilities/audio/krisp-viva-filter", "server/utilities/audio/silero-vad-analyzer", "server/utilities/audio/soundfile-mixer" @@ -563,7 +561,6 @@ }, "deployment/pipecat-cloud/guides/ci-with-github-actions", "deployment/pipecat-cloud/guides/daily-webrtc", - "deployment/pipecat-cloud/guides/krisp-noise-cancellation", "deployment/pipecat-cloud/guides/krisp-viva", "deployment/pipecat-cloud/guides/managed-api-keys", { diff --git a/guides/features/krisp.mdx b/guides/features/krisp.mdx deleted file mode 100644 index a08f2a00..00000000 --- a/guides/features/krisp.mdx +++ /dev/null @@ -1,236 +0,0 @@ ---- -title: "Noise cancellation with Krisp" -sidebarTitle: "Noise cancellation: Krisp" -description: "Learn how to integrate Krisp noise cancellation into your Pipecat application" ---- - - - The `KrispFilter` is deprecated and will be removed in a future version. - Please use the `KrispVivaFilter`, which is the latest model from Krisp. See - the [Krisp VIVA guide](/guides/features/krisp-viva) for more information. - - -## Overview - -This guide will walk you through setting up and using Krisp's noise reduction capabilities in your Pipecat application. Krisp provides professional-grade noise cancellation that can significantly improve audio quality in real-time communications. - -To use Krisp's noise cancellation, you'll need to obtain their SDK and models through a Krisp developer account. Our Pipecat Krisp module simplifies the integration process, which we'll cover in this guide. - -## Walkthrough - -### Get Access to Krisp SDK and Models - -1. Create a Krisp developers account at [krisp.ai/developers](https://krisp.ai/developers) -2. Download the [Krisp Desktop SDK (v7)](https://sdk.krisp.ai/sdk/desktop) that matches your platform: - - Linux: `Desktop SDK v7.0.2: Linux` - - macOS (ARM): `Desktop SDK v7.0.1: Mac ARM` - - macOS (Intel): `Desktop SDK v7.0.1: Mac Intel` - - Windows(ARM): `Desktop SDK v7.0.2: Windows ARM` - - Windows (x64): `Desktop SDK v7.0.2: Windows` -3. Download the corresponding models. We recommend trying the `Background Voice Cancellation` model. Recommended model for each platform: - - Linux (ARM): `hs.c6.f.s.de56df.kw` - - Mac (ARM): `hs.c6.f.s.de56df.kw` - - Linux (x86_64): `hs.c6.f.s.de56df.kw` - - Mac (x86_64): `hs.c6.f.s.de56df.kw` - - Windows (x86_64): `hs.c6.f.s.de56df.kw` - -![Krisp SDK Portal](/images/krisp-portal.png) - -### Install build dependencies - -The `pipecat-ai-krisp` module is a python wrapper around Krisp's C++ SDK. To build the module, you'll need to install the following dependencies: - - - - ```bash - # Using Homebrew - brew install cmake pybind11 - ``` - - - ```bash - # Using apt - sudo apt-get update - sudo apt-get install cmake python3-dev pybind11-dev g++ - ``` - - - ```powershell - # Using Chocolatey - choco install cmake - # pybind11 will be installed via pip during the build process - - # OR using Visual Studio - # 1. Install Visual Studio with C++ development tools - # 2. Install CMake from https://cmake.org/download/ - # pybind11 will be installed via pip during the build process - ``` - - - - - - For Windows users: Make sure you have Visual Studio installed with C++ - development tools, or alternatively, have the Visual C++ Build Tools - installed. - - -### Install the pipecat-ai-krisp module - -In your Pipecat repo, activate your virtual environment: - - - - ```bash - python3 -m venv venv - source venv/bin/activate - ``` - - - ```powershell - # Using PowerShell - python -m venv venv - .\venv\Scripts\Activate.ps1 - - # OR using Command Prompt - python -m venv venv - .\venv\Scripts\activate.bat - - # OR using Git Bash - python -m venv venv - source venv/Scripts/activate - ``` - - - - -Export the path to your Krisp SDK and model files: - - - - ```bash - # Add to your .env file or shell configuration - export KRISP_SDK_PATH=/PATH/TO/KRISP/SDK - export KRISP_MODEL_PATH=/PATH/TO/KRISP/MODEL.kef - ``` - - - ```powershell - # Using PowerShell - $env:KRISP_SDK_PATH = "C:\PATH\TO\KRISP\SDK" - $env:KRISP_MODEL_PATH = "C:\PATH\TO\KRISP\MODEL.kef" - - # OR using Command Prompt - set KRISP_SDK_PATH=C:\PATH\TO\KRISP\SDK - set KRISP_MODEL_PATH=C:\PATH\TO\KRISP\MODEL.kef - ``` - - - - - - When selecting a `KRISP_MODEL_PATH`, ensure that you're selecting the actual - model file, not just the directory. The path should look something like this: - - - ```bash - export KRISP_MODEL_PATH=./krisp/hs.c6.f.s.de56df.kw - ``` - - - ```bash export - KRISP_MODEL_PATH=./krisp/outbound-bvc-models-fp16/hs.c6.f.s.de56df.bucharest.kef - ``` - - - ```powershell - $env:KRISP_MODEL_PATH="C:\krisp\outbound-bvc-models-fp32\hs.c6.f.s.de56df.bucharest.kef" - ``` - - - - - -Next, install the `pipecat-ai[krisp]` module, which will automatically build the `pipecat-ai-krisp` python wrapper module: - -```bash -pip install "pipecat-ai[krisp]" -``` - -### Test the integration - -You can now test the Krisp integration. The easiest way to do this is to run the foundational example: [07p-interruptible-krisp.py](https://github.com/pipecat-ai/pipecat/blob/main/examples/foundational/07p-interruptible-krisp.py). - - -You can run a foundational example by running the following command: - -```bash -python examples/foundational/07p-interruptible-krisp.py -u YOUR_DAILY_ROOM_URL -``` - - - -#### Important for macOS users - -If you're running on macOS you may receive a security warning about running the script. This is expected. You can allow access by going to `System Settings > Privacy & Security` then click `Allow Anyway` to permit the example to run. - -![Security & Privacy](/images/allow-krisp.png) - -After allowing and re-running, you may get a pop-up asking for permission. Select `Open Anyway` to run the script. - -![Open Anyway](/images/open-anyway-krisp.png) - -## Usage Example - -Here's a basic example of how to add Krisp noise reduction to your Pipecat pipeline: - -```python -from pipecat.audio.filters.krisp_filter import KrispFilter -from pipecat.transports.services.daily import DailyParams, DailyTransport - -# Add to transport configuration -transport = DailyTransport( - room_url, - token, - "Audio Bot", - DailyParams( - audio_in_filter=KrispFilter(), # Enable Krisp noise reduction - audio_in_enabled=True, - audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), - ), -) -``` - -## Troubleshooting - -Common issues and solutions: - -1. **Missing Dependencies** - -```bash -Error: Missing module: pipecat_ai_krisp -``` - -Solution: Ensure you've installed with the krisp extra: `pip install "pipecat-ai[krisp]"` - -2. **Model Path Not Found** - -```bash -Error: Model path for KrispAudioProcessor must be provided -``` - -Solution: Set the `KRISP_MODEL_PATH` environment variable or provide it in the constructor - -3. **SDK Path Issues** - -```bash -Error: Cannot find Krisp SDK -``` - -Solution: Verify `KRISP_SDK_PATH` points to a valid Krisp SDK installation - -## Additional Resources - -- [KrispFilter Reference Documentation](/server/utilities/audio/krisp-filter) -- [Example Application](https://github.com/pipecat-ai/pipecat/blob/main/examples/foundational/07p-interruptible-krisp.py) diff --git a/server/utilities/audio/krisp-filter.mdx b/server/utilities/audio/krisp-filter.mdx deleted file mode 100644 index 23af6092..00000000 --- a/server/utilities/audio/krisp-filter.mdx +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "KrispFilter" -description: "Audio noise reduction filter using Krisp AI technology" ---- - - - The `KrispFilter` is deprecated and will be removed in a future version. - Please use the `KrispVivaFilter`, which is the latest model from Krisp. See - the [Krisp VIVA guide](/server/utilities/audio/krisp-viva-filter) for more - information. - - -## Overview - -`KrispFilter` is an audio processor that reduces background noise in real-time audio streams using Krisp AI technology. It inherits from `BaseAudioFilter` and processes audio frames to improve audio quality by removing unwanted noise. - -To use Krisp, you need a Krisp SDK license. Get started at [Krisp.ai](https://krisp.ai/developers/). - - - Looking for help getting started with Krisp and Pipecat? Checkout our [Krisp - noise cancellation guide](/guides/features/krisp). - - -## Installation - -The Krisp filter requires additional dependencies: - -```bash -pip install "pipecat-ai[krisp]" -``` - -## Environment Variables - -You need to provide the path to the Krisp model. This can either be done by setting the `KRISP_MODEL_PATH` environment variable or by setting the `model_path` in the constructor. - -## Constructor Parameters - - - Audio sample type format - - - - Number of audio channels - - - -Path to the Krisp model file. - -You can set the `model_path` directly. Alternatively, you can set the `KRISP_MODEL_PATH` environment variable to the model file path. - - - -## Input Frames - - - Specific control frame to toggle filtering on/off - -```python -from pipecat.frames.frames import FilterEnableFrame - -# Disable noise reduction -await task.queue_frame(FilterEnableFrame(False)) - -# Re-enable noise reduction -await task.queue_frame(FilterEnableFrame(True)) -``` - - - -## Usage Example - -```python -from pipecat.audio.filters.krisp_filter import KrispFilter - -transport = DailyTransport( - room_url, - token, - "Respond bot", - DailyParams( - audio_in_filter=KrispFilter(), # Enable Krisp noise reduction - audio_in_enabled=True, - audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), - ), -) -``` - -## Audio Flow - -```mermaid -graph TD - A[AudioRawFrame] --> B[KrispFilter] - B[KrispFilter] --> C[VAD] - C[VAD] --> D[STT] -``` - -## Notes - -- Requires Krisp SDK and model file to be available -- Supports real-time audio processing -- Supports additional features like background voice removal -- Handles PCM_16 audio format -- Thread-safe for pipeline processing -- Can be dynamically enabled/disabled -- Maintains audio quality while reducing noise -- Efficient processing for low latency diff --git a/server/utilities/audio/krisp-viva-filter.mdx b/server/utilities/audio/krisp-viva-filter.mdx index b55dbc83..7015b3aa 100644 --- a/server/utilities/audio/krisp-viva-filter.mdx +++ b/server/utilities/audio/krisp-viva-filter.mdx @@ -9,14 +9,9 @@ description: "Audio noise reduction filter using Krisp VIVA model" To use Krisp, you need a Krisp SDK license. Get started at [Krisp.ai](https://krisp.ai/developers/). - - Looking for help getting started with Krisp and Pipecat? Checkout our [Krisp - noise cancellation guide](/guides/features/krisp). - - ## Installation -See the [Krisp guide](/guides/features/krisp) to learn how to install the Krisp VIVA SDK. +See the [Krisp guide](/guides/features/krisp-viva) to learn how to install the Krisp VIVA SDK. ## Environment Variables diff --git a/server/utilities/runner/guide.mdx b/server/utilities/runner/guide.mdx index d94ae1cb..fb49c777 100644 --- a/server/utilities/runner/guide.mdx +++ b/server/utilities/runner/guide.mdx @@ -33,7 +33,7 @@ Your bot code receives runner arguments that contain everything it needs, includ ## Pipecat Cloud Ready -The bot runner is designed to be cloud-ready, meaning that you can run the same bot code locally and deployed to Pipecat Cloud without any modifications. It automatically handles the differences in transport setup, providing you with the flexibility to test locally using a free transport, like SmallWebRTCTransport, but run in production using Daily or telephony transports. +The bot runner is designed to be cloud-ready, meaning that you can run the same bot code locally and deployed to Pipecat Cloud without any modifications. It automatically handles the differences in transport setup, providing you with the flexibility to test locally using an open source transport, like SmallWebRTCTransport, but run in production using Daily or telephony transports. ## Building with the Runner @@ -187,8 +187,8 @@ async def bot(runner_args: RunnerArguments): # Enable production features only when deployed if not is_local: - from pipecat.audio.filters.krisp_filter import KrispFilter - krisp_filter = KrispFilter() + from pipecat.audio.filters.krisp_viva_filter import KrispVivaFilter + krisp_filter = KrispVivaFilter() else: krisp_filter = None @@ -197,7 +197,7 @@ async def bot(runner_args: RunnerArguments): runner_args.token, "Pipecat Bot", params=DailyParams( - audio_in_filter=krisp_filter, # Krisp filter only in production + audio_in_filter=krisp_filter, # Krisp VIVA filter only in production audio_in_enabled=True, audio_out_enabled=True, vad_analyzer=SileroVADAnalyzer(),