Add AWS Nova Sonic support to Pipecat Flows #160
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR integrates AWS Nova Sonic LLM support into pipecat_flows, allowing Nova Sonic's speech-to-speech capabilities to work seamlessly with our flow-based conversation management system.
What Changed
Core Implementation
AWSNovaSonicAdapter
class that handles Nova Sonic's specific formatting requirementsAWSNovaSonicLLMService
instancestoolSpec
format and our internalFlowsFunctionSchema
Key Adapter Features
The new adapter handles Nova Sonic's unique requirements:
toolSpec
structureTechnical Details
Nova Sonic Format Handling:
Integration Points:
from pipecat.adapters.services.aws_nova_sonic_adapter import AWSNovaSonicLLMAdapter
create_adapter()
functionAWSNovaSonicLLMAdapter
as the base providerWhy This Matters
Nova Sonic offers unique speech-to-speech capabilities that weren't previously accessible through our flow system. This integration enables:
Testing Approach
Compatibility
This is a purely additive change. All existing functionality remains unchanged, and Nova Sonic support only activates when the service is explicitly used. The feature requires the optional
pipecat-ai[aws-nova-sonic]
package.Usage