Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making pipecat work with Krisp #689

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Making pipecat work with Krisp #689

merged 1 commit into from
Nov 8, 2024

Conversation

filipi87
Copy link
Contributor

@filipi87 filipi87 commented Nov 4, 2024

Creating Krisp filter for audio processor.

@aconchillo
Copy link
Contributor

@filipi87 We will be using an input transport filter instead: #611. I think I will merge that now, so you can use that instead.

@aconchillo
Copy link
Contributor

@filipi87 We will be using an input transport filter instead: #611. I think I will merge that now, so you can use that instead.

This is now merged.

README.md Outdated Show resolved Hide resolved

#Krisp
KRISP_MODEL_PATH=...
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easy way to choose which model we wish to use.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any new environment variables...

Copy link
Contributor Author

@filipi87 filipi87 Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using it here inside krisp_filter.py, in case a model path is not provided.

pyproject.toml Outdated Show resolved Hide resolved
@filipi87 filipi87 marked this pull request as ready for review November 5, 2024 14:51

```shell
source venv/bin/activate
pip install pipecat-ai[krisp]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the library has not been published yet, you can test it by creating a local distribution using the PR and then installing it.

@filipi87
Copy link
Contributor Author

filipi87 commented Nov 7, 2024

Hi @aconchillo , we are going to be able to publish the pipecat-ai-krisp, but without including the Krisp SDK, so we don't go against any policy from Krisp. Thanks again for all your suggestions. 🙂

So, in summary, the pipecat-ai-krisp module that we are going to publish will have the source code for the wrapper, along with all the scripts and everything else that we need to build it.

At install time, we are going to receive the path to the SDK as an environment variable, and at that point, we will build and install it.

So it will work like this:

export KRISP_SDK_PATH=/PATH/TO/YOUR/KRISP/SDK
pip install pipecat-ai-krisp

//or while we don't have published it yet, you can test with the local version:
pip install ../pipecat-krisp/dist/pipecat_krisp-0.1.0.tar.gz

@@ -129,6 +129,24 @@ Pipecat makes use of WebRTC VAD by default when using a WebRTC transport layer.
pip install pipecat-ai[silero]
```

## Running the Krisp Audio Filter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say something like ## Reduce background noise with audio filters (just to make it more attractive) and then a subsection for Krisp.

3. **Export the path to you krisp SDK**:
`export KRISP_SDK_PATH=/PATH/TO/KRISP/SDK`

### Step 2: Install the `pipecat-krisp` Module
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance the project can be called pipecat-ai-krisp? Just to match pipecat-ai. There's another pipecat project completely unrelated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project I mean the pypi package. The repo is fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see it's already pipecat-ai-krisp, then I guess just updating this text. :-D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it seems I have missed this text. 😬

@aconchillo
Copy link
Contributor

I'd squash this into a single commit probably, or two one for the filter and one for the example.

@aconchillo
Copy link
Contributor

LGTM! Just a couple of minor things. This is awesome!

@filipi87
Copy link
Contributor Author

filipi87 commented Nov 8, 2024

Great. I will address the missing things and squash in a single commit before merging it.
Thank you @aconchillo. 🙂

@markbackman
Copy link
Contributor

Very minor feedback. We already have a 07o foundational example (i.e. 07o-interruptible-assemblyai.py). Can the example be 07p-interruptible-krisp.py?

@filipi87 filipi87 merged commit 4379db4 into main Nov 8, 2024
3 checks passed
@filipi87 filipi87 deleted the filipi/krisp branch November 8, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants