diff --git a/guides/learn/speech-input.mdx b/guides/learn/speech-input.mdx index edb92534..37754eaa 100644 --- a/guides/learn/speech-input.mdx +++ b/guides/learn/speech-input.mdx @@ -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)), ) ``` @@ -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) @@ -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), ), ) diff --git a/server/utilities/audio/aic-filter.mdx b/server/utilities/audio/aic-filter.mdx index 1e0df4ba..98ab9353 100644 --- a/server/utilities/audio/aic-filter.mdx +++ b/server/utilities/audio/aic-filter.mdx @@ -28,10 +28,10 @@ pip install "pipecat-ai[aic]" - 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"` @@ -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 @@ -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, @@ -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( @@ -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,