Pipecat
Add emotion, strength and positivity to each user turn in a Pipecat voice agent with the pipecat-behavioralsignals package (uv add pipecat-behavioralsignals)
Pipecat voice agents can hear how the user speaks, not just what they say. The pipecat-behavioralsignals package streams the user's voice to the Behavioral Signals API and adds what it reads, such as emotion, strength and positivity, to each user turn. The LLM reads it together with the user's words.
Installation
uv add pipecat-behavioralsignalsOr with pip: pip install pipecat-behavioralsignals. Requires Python 3.12 or later and Pipecat 1.16.
Setup
Create an API key in the portal, then set your client ID and API key:
export BEHAVIORALSIGNALS_CID=...
export BEHAVIORALSIGNALS_API_KEY=...Usage
Put BehavioralSignalsPerceptionService right after your STT service, and turn on expressive conversation:
from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.worker import PipelineParams, PipelineWorker
from pipecat_behavioralsignals import BehavioralSignalsPerceptionService
perception = BehavioralSignalsPerceptionService()
pipeline = Pipeline([
transport.input(),
stt,
perception,
user_aggregator,
llm,
tts,
transport.output(),
assistant_aggregator,
])
worker = PipelineWorker(pipeline, params=PipelineParams(enable_expressive_conversation=True))Links
- Package on PyPI
- Example voice agent on GitHub
- Pipecat's documentation page
Updated 1 day ago
Did this page help you?

