-
Notifications
You must be signed in to change notification settings - Fork 397
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add LiveKit audio transport #467
Conversation
from livekit import rtc | ||
except ModuleNotFoundError as e: | ||
logger.error(f"Exception: {e}") | ||
logger.error("In order to use LiveKit, you need to `pip install pipecat-ai[livekit]`.") |
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.
We probably want to add livekit
to pyproject.toml with the right dependencies.
This looks really good! I'll take a final look later, thank you!!! |
This looks amazing @joachimchauvet ! I'm particularly interested in this PR as I'm using LiveKit. |
@joachimchauvet I just tested and I can't play the audio when I join the room using the LK playground. I join the same room as my agent, I have both participants active in the room, the room events are consistent, but the 'Agent connected' status on the playground remains pending, as does the audio track. |
e61427a
to
61f8f81
Compare
It seems to work fine on my side. |
This looks great! Please, rebase and make sure the pipeline is green. We are now using Ruff as our formatter. Make sure everything is green and I think we cna merge after that. Thank you! 🙏 |
@joachimchauvet I encountered an error while using the LiveKitInputTransport in my application :
|
61f8f81
to
b6e1d6e
Compare
Were you doing something special or made changes to the |
There is no |
@joachimchauvet I encountered an error in the
The issue arises when |
In theory, all processors should receive the It's possible that this branch hasn't been rebased so it doesn't have that |
You're absolutely right @aconchillo. Thanks for pointing that out! Now, regarding this part: async def send_metrics(self, frame: MetricsFrame):
metrics = {}
if frame.ttfb:
metrics["ttfb"] = frame.ttfb
if frame.processing:
metrics["processing"] = frame.processing
if hasattr(frame, "tokens"):
metrics["tokens"] = frame.tokens
if hasattr(frame, "characters"):
metrics["characters"] = frame.characters
message = LiveKitTransportMessageFrame(message={"type": "pipecat-metrics", "metrics": metrics})
await self._client.send_data(str(message.message).encode()) This needs to be updated due to changes introduced in #474 |
Everything is running perfectly; just one detail: |
I'll wait on @joachimchauvet to answer this before merging. |
I'll go ahead and merge this one. If there's any error you can provide a fix later. Thank you!!! |
I don't have this error with my agents. I have an idea where that might come from but I was not able to reproduce that |
@joachimchauvet The execution is blocked when calling The if self._sink_task:
await self._sink_task
if self._sink_clock_task:
await self._sink_clock_task As a result, the @aconchillo do you have any insights on this? Thanks |
This might not be perfect yet but I would love to get some initial feedback.
It looks like there are quite a few people interested #325