added livekit dependency
This commit is contained in:
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added `LivekitFrameSerializer` audio frame serializer.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix `FastAPIWebsocketOutputTransport` variable name clash with subclass.
|
- Fix `FastAPIWebsocketOutputTransport` variable name clash with subclass.
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ google = [ "google-generativeai~=0.7.2" ]
|
|||||||
gstreamer = [ "pygobject~=3.48.2" ]
|
gstreamer = [ "pygobject~=3.48.2" ]
|
||||||
fireworks = [ "openai~=1.37.2" ]
|
fireworks = [ "openai~=1.37.2" ]
|
||||||
langchain = [ "langchain~=0.2.14", "langchain-community~=0.2.12", "langchain-openai~=0.1.20" ]
|
langchain = [ "langchain~=0.2.14", "langchain-community~=0.2.12", "langchain-openai~=0.1.20" ]
|
||||||
|
livekit = [ "livekit~=0.13.1" ]
|
||||||
local = [ "pyaudio~=0.2.14" ]
|
local = [ "pyaudio~=0.2.14" ]
|
||||||
moondream = [ "einops~=0.8.0", "timm~=1.0.8", "transformers~=4.44.0" ]
|
moondream = [ "einops~=0.8.0", "timm~=1.0.8", "transformers~=4.44.0" ]
|
||||||
openai = [ "openai~=1.37.2" ]
|
openai = [ "openai~=1.37.2" ]
|
||||||
|
|||||||
@@ -7,10 +7,19 @@
|
|||||||
import ctypes
|
import ctypes
|
||||||
import pickle
|
import pickle
|
||||||
|
|
||||||
from livekit.rtc import AudioFrame
|
|
||||||
from pipecat.frames.frames import AudioRawFrame, Frame
|
from pipecat.frames.frames import AudioRawFrame, Frame
|
||||||
from pipecat.serializers.base_serializer import FrameSerializer
|
from pipecat.serializers.base_serializer import FrameSerializer
|
||||||
|
|
||||||
|
from loguru import logger
|
||||||
|
|
||||||
|
try:
|
||||||
|
from livekit.rtc import AudioFrame
|
||||||
|
except ModuleNotFoundError as e:
|
||||||
|
logger.error(f"Exception: {e}")
|
||||||
|
logger.error(
|
||||||
|
"In order to use LiveKit, you need to `pip install pipecat-ai[livekit]`.")
|
||||||
|
raise Exception(f"Missing module: {e}")
|
||||||
|
|
||||||
|
|
||||||
class LivekitFrameSerializer(FrameSerializer):
|
class LivekitFrameSerializer(FrameSerializer):
|
||||||
SERIALIZABLE_TYPES = {
|
SERIALIZABLE_TYPES = {
|
||||||
|
|||||||
Reference in New Issue
Block a user