pipecat
pipecat copied to clipboard
STTMuteFilter for function call does not work
pipecat version
0.0.91
Python version
3.11
Operating System
Windows 11
Issue description
Problem Description
I'm trying to implement STTMuteFilter with FUNCTION_CALL strategy to mute user STT input during function execution, but it's not working as expected.
Configuration
I've configured STTMuteFilter as follows:
stt_mute_filter = STTMuteFilter(
config=STTMuteConfig(
strategies={
STTMuteStrategy.FIRST_SPEECH,
STTMuteStrategy.FUNCTION_CALL,
}
)
)
pipeline = Pipeline([
transport.input(),
stt_service,
stt_mute_filter,
context_aggregator.user(),
llm, # OpenAILLMService
...
])
In the logs you can check that it unmutes immediately when it mutes for a function call. Its working fine for FIRST_SPEECH though
Reproduction steps
I've configured STTMuteFilter as follows:
stt_mute_filter = STTMuteFilter(
config=STTMuteConfig(
strategies={
STTMuteStrategy.FIRST_SPEECH,
STTMuteStrategy.FUNCTION_CALL,
}
)
)
pipeline = Pipeline([
transport.input(),
stt_service,
stt_mute_filter,
context_aggregator.user(),
llm, # OpenAILLMService
...
])
### Expected behavior
According to the documentation, when `FUNCTION_CALL` strategy is enabled, `STTMuteFilter` should:
1. Mute STT when it receives `FunctionCallInProgressFrame`
2. Unmute STT when it receives `FunctionCallResultFrame`
### Actual behavior
Function muting is not happening. When functions are called:
- STT continues to process user input during function execution
- No muting occurs, leading to interruptions
### Logs
```shell
2025-10-31T14:44:12.441+0530 - DEBUG - CA9690e2f0fb1d4c5e24a348a8010900f2 - > TranscriptLogger: MetricsFrame#17
2025-10-31T14:44:12.454+0530 - DEBUG - CA9690e2f0fb1d4c5e24a348a8010900f2 - > TranscriptLogger: FunctionCallsStartedFrame#0
2025-10-31T14:44:12.459+0530 - DEBUG - CA9690e2f0fb1d4c5e24a348a8010900f2 - > TranscriptLogger: MetricsFrame#18
2025-10-31T14:44:12.462+0530 - DEBUG - CA9690e2f0fb1d4c5e24a348a8010900f2 - < STT Logger: FunctionCallsStartedFrame#1
**2025-10-31T14:44:12.464+0530 - DEBUG - CA9690e2f0fb1d4c5e24a348a8010900f2 - STTMuteFilter muting
2025-10-31T14:44:12.466+0530 - DEBUG - CA9690e2f0fb1d4c5e24a348a8010900f2 - STTMuteFilter unmuting**
2025-10-31T14:44:12.478+0530 - DEBUG - CA9690e2f0fb1d4c5e24a348a8010900f2 - > TranscriptLogger: FunctionCallInProgressFrame#0
2025-10-31T14:44:12.481+0530 - DEBUG - CA9690e2f0fb1d4c5e24a348a8010900f2 - > TranscriptLogger: FunctionCallResultFrame#0
2025-10-31T14:44:12.485+0530 - DEBUG - CA9690e2f0fb1d4c5e24a348a8010900f2 - < STT Logger: FunctionCallInProgressFrame#1
2025-10-31T14:44:12.490+0530 - DEBUG - CA9690e2f0fb1d4c5e24a348a8010900f2 - < STT Logger: STTMuteFrame#4
2025-10-31T14:44:12.492+0530 - DEBUG - CA9690e2f0fb1d4c5e24a348a8010900f2 - < STT Logger: FunctionCallResultFrame#1
2025-10-31T14:44:12.492+0530 - DEBUG - CA9690e2f0fb1d4c5e24a348a8010900f2 - < STT Logger: STTMuteFrame#6