Skip to main content

pipecat-hecttor

Hecttor speech enhancement audio filter for Pipecat.

HecttorFilter is an input audio filter that removes background noise from the user's audio in real time using the Hecttor SDK's ASR-optimized speech enhancer. It runs before audio reaches the STT service, improving transcription accuracy in noisy environments. You can choose among several enhancement models and blend the enhanced output with the original audio.

This integration is maintained by Saima AI, the company behind Hecttor.

Installation

Install the package:

uv add pipecat-hecttor

The filter requires the hecttor_sdk Python package, which is not published to PyPI. Contact Hecttor for SDK access and an API key — you'll receive a wheel for your platform and Python version:

pip install hecttor_sdk-<version>-<python>-<platform>.whl

Set your API key:

export HECTTOR_API_KEY=your_api_key_here

Usage

Add the filter to any Pipecat transport via the audio_in_filter parameter:

from pipecat_hecttor import HecttorFilter
from pipecat.transports.base_transport import TransportParams

params = TransportParams(
    audio_in_enabled=True,
    audio_in_filter=HecttorFilter(),
    audio_out_enabled=True,
)

Configuration

Parameter Default Description
api_key None Hecttor API key. Falls back to the HECTTOR_API_KEY environment variable.
model_name "coda-vi-1.0" ASR enhancement model: crest-1.0, crest-2.0, mist-1.0, coda-1.0, or coda-vi-1.0.
chunk_size_ms 20 Chunk size in milliseconds, 16 or 20. crest-2.0, coda-1.0, and coda-vi-1.0 require 20.
enhancer_weight None Blend factor [0.0, 1.0] between original (0.0) and enhanced (1.0) audio. None uses the model's default.

Runtime toggle

Disable and re-enable denoising at runtime with Pipecat's FilterEnableFrame:

from pipecat.frames.frames import FilterEnableFrame

await worker.queue_frame(FilterEnableFrame(False))  # disable
await worker.queue_frame(FilterEnableFrame(True))  # re-enable

Running the example

examples/voice-hecttor.py is a complete voice bot with Hecttor denoising, Deepgram STT, OpenAI LLM, and Cartesia TTS.

  1. Install the example's dependencies:

    uv add pipecat-hecttor "pipecat-ai[deepgram,cartesia,openai,silero,webrtc,runner]"
    
  2. Install the hecttor_sdk wheel (see Installation).

  3. Create a .env file with your keys:

    HECTTOR_API_KEY=...
    DEEPGRAM_API_KEY=...
    OPENAI_API_KEY=...
    CARTESIA_API_KEY=...
    
  4. Run the bot and open the printed URL in your browser:

    python examples/voice-hecttor.py
    

Testing the filter offline

scripts/test_hecttor_filter_audiofile.py runs the filter over a pre-recorded audio file so you can compare original and enhanced audio:

uv add soundfile
python scripts/test_hecttor_filter_audiofile.py input.wav output.wav

It reports the realtime factor and before/after audio statistics.

Compatibility

Tested with Pipecat v1.7.0.

Pipecat evolves rapidly; if you hit a compatibility issue with a newer release, please open an issue.

License

BSD 2-Clause — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipecat_hecttor-0.1.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipecat_hecttor-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file pipecat_hecttor-0.1.0.tar.gz.

File metadata

  • Download URL: pipecat_hecttor-0.1.0.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.7

File hashes

Hashes for pipecat_hecttor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5d2eb4d0c1a91475cc95161de95cb987038ac890c82eb877261e470a1fc83923
MD5 aad6a2b902764080d71f8524e1847df3
BLAKE2b-256 d3e1da26b47cd44ccc69a42cdd4e2af80d93c8dd2a1e433797a37bbcbdd63bff

See more details on using hashes here.

File details

Details for the file pipecat_hecttor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pipecat_hecttor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 324474d08f454e191c015861ce31de3e60fcb55994a5891e8ae1e3e327315865
MD5 0ef7ff3877766d459f12477581500539
BLAKE2b-256 aa59452a7293d4df130c376e3b4e87e066838fefe1d0220a9f61e87730928a76

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page