-
Notifications
You must be signed in to change notification settings - Fork 947
Sending audio to Tavus using custom tracks #1950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service 10000 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…stead of `app-messages`
… instead of `app-messages`
8de4d1a
to
9f4fed2
Compare
Nice cleanup! Added some comments. |
- `TavusTransport` and `TavusVideoService` now send audio to Tavus using WebRTC | ||
audio tracks instead of `app-messages` over WebSocket. This should improve the | ||
overall audio quality. | ||
- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably needs a rebase.
@@ -58,7 +54,7 @@ def __init__( | |||
*, | |||
api_key: str, | |||
replica_id: str, | |||
persona_id: str = "pipecat0", # Use `pipecat0` so that your TTS voice is used in place of the Tavus persona | |||
persona_id: str = "pipecat-stream", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstring above needs to be updated with pipecat-stream
@@ -133,15 +142,14 @@ def __init__( | |||
callbacks: TavusCallbacks, | |||
api_key: str, | |||
replica_id: str, | |||
persona_id: str = "pipecat0", # Use `pipecat0` so that your TTS voice is used in place of the Tavus persona | |||
persona_id: str = "pipecat-stream", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstring above needs to mention pipecat-stream
LGTM. Just 3 minor comments about CHANGELOG and docstrings. Nice work! 🙌 |
@@ -767,6 +767,7 @@ async def add_custom_audio_track(self, track_name: str) -> DailyAudioTrack: | |||
self._client.add_custom_audio_track( | |||
track_name=track_name, | |||
audio_track=audio_track, | |||
ignore_audio_level=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is preventing the SFU to use the custom audio tracker to trigger the active speaker event.
This PR adds support for sending audio to Tavus using custom tracks instead of app messages.
It also includes a test script (
scripts/test_tavus_transport.py
) that mimics the behavior expected to be supported by Tavus.