Prerequisites
Before you start, make sure you have a valid license key from the developer portal.Installation
To useAICFilter, you need to install the aic extra for pipecat-ai (not needed when using uv):
Usage
TheAICFilter can be easily integrated into a Pipecat pipeline between an audio input transport (e.g., microphone) and an audio output transport (e.g., speaker). Here’s a complete example of a simple Pipecat application that uses the AICFilter.
Running the Example
1
Save the code
Save the code above as
bot.py.2
Set Environment Variables
Set the necessary environment variable in your terminal:Replace the placeholder value with your actual license key.
3
Run the Application
Execute the script from your terminal:Or use You can now navigate to http://localhost:7860 and click the green ‘Connect’ button in the top right corner. Please note that you will hear the filtered microphone output processed by Quail STT models; because these models are optimized specifically for human-to-machine interaction, the audio is tuned for speech-to-text accuracy rather than human listening comfort, and may sound distorted or unusual to your ears.More information on
uv:AICFilter is provided in the Pipecat Documentation.