Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions guides/learn/speech-input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ vad_analyzer = SileroVADAnalyzer(

user_aggregator, assistant_aggregator = LLMContextAggregatorPair(
context,
user_params=LLMUserAggregatorParams(
vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=0.2)),
),
user_params=LLMUserAggregatorParams(vad_analyzer=vad_analyzer)),
)
```

Expand Down Expand Up @@ -190,9 +188,7 @@ vad_params = VADParams(
)

transport = YourTransport(
params=TransportParams(
vad_analyzer=SileroVADAnalyzer(params=vad_params),
),
params=TransportParams(),
)

# Configure Smart Turn via user turn strategies (if using turn detection)
Expand All @@ -204,6 +200,7 @@ user_aggregator, assistant_aggregator = LLMContextAggregatorPair(
turn_analyzer=LocalSmartTurnAnalyzerV3()
)]
) if using_smart_turn_detection else None,
vad_analyzer=SileroVADAnalyzer(params=vad_params),
),
)

Expand Down
24 changes: 22 additions & 2 deletions server/utilities/audio/aic-filter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ pip install "pipecat-ai[aic]"
</ParamField>

<ParamField path="model_id" type="Optional[str]" default="None">
Model identifier to download from CDN. Required if `model_path` is not provided.
Model identifier to download from CDN. Required if `model_path` is not provided.
See [artifacts.ai-coustics.io](https://artifacts.ai-coustics.io/) for available models.
See the [documentation](https://docs.ai-coustics.com/guides/models) for more detailed information about the models.

Examples: `"quail-vf-l-16khz"`, `"quail-s-16khz"`, `"quail-l-8khz"`
</ParamField>

Expand Down Expand Up @@ -110,6 +110,10 @@ The recommended approach is to use `AICFilter` with its built-in VAD analyzer:

```python
from pipecat.audio.filters.aic_filter import AICFilter
from pipecat.processors.aggregators.llm_response_universal import (
LLMContextAggregatorPair,
LLMUserAggregatorParams,
)
from pipecat.transports.services.daily import DailyTransport, DailyParams

# Create the AIC filter
Expand All @@ -127,6 +131,12 @@ transport = DailyTransport(
audio_in_enabled=True,
audio_out_enabled=True,
audio_in_filter=aic_filter,
),
)

user_aggregator, assistant_aggregator = LLMContextAggregatorPair(
context,
user_params=LLMUserAggregatorParams(
vad_analyzer=aic_filter.create_vad_analyzer(
speech_hold_duration=0.05,
minimum_speech_duration=0.0,
Expand Down Expand Up @@ -169,6 +179,10 @@ The AIC filter works with any Pipecat transport:

```python
from pipecat.audio.filters.aic_filter import AICFilter
from pipecat.processors.aggregators.llm_response_universal import (
LLMContextAggregatorPair,
LLMUserAggregatorParams,
)
from pipecat.transports.websocket import FastAPIWebsocketTransport, FastAPIWebsocketParams

aic_filter = AICFilter(
Expand All @@ -181,6 +195,12 @@ transport = FastAPIWebsocketTransport(
audio_in_enabled=True,
audio_out_enabled=True,
audio_in_filter=aic_filter,
),
)

user_aggregator, assistant_aggregator = LLMContextAggregatorPair(
context,
user_params=LLMUserAggregatorParams(
vad_analyzer=aic_filter.create_vad_analyzer(
speech_hold_duration=0.05,
sensitivity=6.0,
Expand Down