meshagent-livekit 0.6.1__tar.gz → 0.6.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of meshagent-livekit might be problematic. Click here for more details.
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/CHANGELOG.md +6 -0
- {meshagent_livekit-0.6.1/meshagent_livekit.egg-info → meshagent_livekit-0.6.3}/PKG-INFO +3 -3
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent/livekit/agents/meeting_transcriber.py +21 -5
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent/livekit/agents/voice.py +23 -23
- meshagent_livekit-0.6.3/meshagent/livekit/version.py +1 -0
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3/meshagent_livekit.egg-info}/PKG-INFO +3 -3
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent_livekit.egg-info/requires.txt +2 -2
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/pyproject.toml +2 -2
- meshagent_livekit-0.6.1/meshagent/livekit/version.py +0 -1
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/LICENSE +0 -0
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/MANIFEST.in +0 -0
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/README.md +0 -0
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent/livekit/__init__.py +0 -0
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent/livekit/agents/transcriber.py +0 -0
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent/livekit/livekit_protocol.py +0 -0
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent/livekit/livekit_protocol_test.py +0 -0
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent_livekit.egg-info/SOURCES.txt +0 -0
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent_livekit.egg-info/dependency_links.txt +0 -0
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent_livekit.egg-info/top_level.txt +0 -0
- {meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-livekit
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.3
|
|
4
4
|
Summary: Livekit support for Meshagent
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Documentation, https://docs.meshagent.com
|
|
@@ -17,8 +17,8 @@ Requires-Dist: livekit-agents~=1.2
|
|
|
17
17
|
Requires-Dist: livekit-plugins-openai~=1.2
|
|
18
18
|
Requires-Dist: livekit-plugins-silero~=1.2
|
|
19
19
|
Requires-Dist: livekit-plugins-turn-detector~=1.2
|
|
20
|
-
Requires-Dist: meshagent-api~=0.6.
|
|
21
|
-
Requires-Dist: meshagent-tools~=0.6.
|
|
20
|
+
Requires-Dist: meshagent-api~=0.6.3
|
|
21
|
+
Requires-Dist: meshagent-tools~=0.6.3
|
|
22
22
|
Dynamic: license-file
|
|
23
23
|
|
|
24
24
|
# [Meshagent](https://www.meshagent.com)
|
{meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent/livekit/agents/meeting_transcriber.py
RENAMED
|
@@ -15,6 +15,9 @@ from livekit.agents import (
|
|
|
15
15
|
llm,
|
|
16
16
|
utils,
|
|
17
17
|
)
|
|
18
|
+
from livekit.agents.stt import STT
|
|
19
|
+
|
|
20
|
+
from meshagent.openai.proxy import get_client
|
|
18
21
|
from livekit.plugins import openai, silero
|
|
19
22
|
from meshagent.api import MeshDocument, SchemaRegistration, SchemaRegistry
|
|
20
23
|
from meshagent.agents import SingleRoomAgent
|
|
@@ -83,7 +86,12 @@ class StopTranscriptionTool(Tool):
|
|
|
83
86
|
|
|
84
87
|
|
|
85
88
|
class MeetingTranscriber(SingleRoomAgent):
|
|
86
|
-
def __init__(
|
|
89
|
+
def __init__(
|
|
90
|
+
self,
|
|
91
|
+
name: str,
|
|
92
|
+
requires: Optional[list[Requirement]] = None,
|
|
93
|
+
stt: Optional[STT] = None,
|
|
94
|
+
):
|
|
87
95
|
super().__init__(
|
|
88
96
|
name=name,
|
|
89
97
|
requires=requires,
|
|
@@ -95,6 +103,7 @@ class MeetingTranscriber(SingleRoomAgent):
|
|
|
95
103
|
StopTranscriptionTool(transcriber=self),
|
|
96
104
|
],
|
|
97
105
|
)
|
|
106
|
+
self.stt = stt
|
|
98
107
|
self._vad = None
|
|
99
108
|
self._transcription_tasks = dict[str, tuple[asyncio.Task, asyncio.Future]]()
|
|
100
109
|
|
|
@@ -120,7 +129,12 @@ class MeetingTranscriber(SingleRoomAgent):
|
|
|
120
129
|
) as conn:
|
|
121
130
|
doc = await self.room.sync.open(path=path, create=True)
|
|
122
131
|
|
|
123
|
-
|
|
132
|
+
stt = self.stt
|
|
133
|
+
if stt is None:
|
|
134
|
+
openai_client = get_client(room=self.room)
|
|
135
|
+
stt = openai.STT(client=openai_client)
|
|
136
|
+
|
|
137
|
+
transcriber = MultiUserTranscriber(conn, doc, self._vad, stt)
|
|
124
138
|
transcriber.start()
|
|
125
139
|
|
|
126
140
|
for participant in conn.livekit_room.remote_participants.values():
|
|
@@ -180,10 +194,10 @@ class TranscriptRegistry(SchemaRegistry):
|
|
|
180
194
|
|
|
181
195
|
|
|
182
196
|
class Transcriber(Agent):
|
|
183
|
-
def __init__(self, *, participant, doc: MeshDocument):
|
|
197
|
+
def __init__(self, *, participant, doc: MeshDocument, stt):
|
|
184
198
|
super().__init__(
|
|
185
199
|
instructions="not-needed",
|
|
186
|
-
stt=
|
|
200
|
+
stt=stt,
|
|
187
201
|
)
|
|
188
202
|
self.doc = doc
|
|
189
203
|
self.participant = participant
|
|
@@ -205,10 +219,11 @@ class Transcriber(Agent):
|
|
|
205
219
|
|
|
206
220
|
|
|
207
221
|
class MultiUserTranscriber:
|
|
208
|
-
def __init__(self, ctx: VoiceConnection, doc: MeshDocument, vad):
|
|
222
|
+
def __init__(self, ctx: VoiceConnection, doc: MeshDocument, vad, stt):
|
|
209
223
|
self.ctx = ctx
|
|
210
224
|
self.doc = doc
|
|
211
225
|
self.vad = vad
|
|
226
|
+
self.stt = stt
|
|
212
227
|
self._sessions: dict[str, AgentSession] = {}
|
|
213
228
|
self._tasks: set[asyncio.Task] = set()
|
|
214
229
|
|
|
@@ -285,6 +300,7 @@ class MultiUserTranscriber:
|
|
|
285
300
|
agent=Transcriber(
|
|
286
301
|
participant=participant,
|
|
287
302
|
doc=self.doc,
|
|
303
|
+
stt=self.stt,
|
|
288
304
|
)
|
|
289
305
|
)
|
|
290
306
|
return session
|
|
@@ -18,9 +18,15 @@ from meshagent.tools import ToolContext, Toolkit
|
|
|
18
18
|
from livekit.agents import Agent, AgentSession, ChatContext
|
|
19
19
|
from livekit.agents.llm import RawFunctionTool, ToolError, function_tool
|
|
20
20
|
|
|
21
|
-
from openai import
|
|
21
|
+
from meshagent.openai.proxy import get_client
|
|
22
22
|
from meshagent.agents import AgentChatContext
|
|
23
|
-
from livekit.agents import
|
|
23
|
+
from livekit.agents import (
|
|
24
|
+
BackgroundAudioPlayer,
|
|
25
|
+
AudioConfig,
|
|
26
|
+
BuiltinAudioClip,
|
|
27
|
+
RoomInputOptions,
|
|
28
|
+
RoomOutputOptions,
|
|
29
|
+
)
|
|
24
30
|
|
|
25
31
|
from livekit.plugins import openai, silero
|
|
26
32
|
# from livekit.plugins.turn_detector.multilingual import MultilingualModel
|
|
@@ -32,7 +38,6 @@ from typing import Any
|
|
|
32
38
|
|
|
33
39
|
|
|
34
40
|
from livekit import rtc
|
|
35
|
-
from livekit.agents import RunContext
|
|
36
41
|
|
|
37
42
|
from typing import Optional
|
|
38
43
|
|
|
@@ -270,13 +275,6 @@ class VoiceBot(SingleRoomAgent):
|
|
|
270
275
|
)
|
|
271
276
|
|
|
272
277
|
async def create_agent(self, *, context: ToolContext, session: AgentSession):
|
|
273
|
-
@function_tool
|
|
274
|
-
async def say(context: RunContext, text: str):
|
|
275
|
-
"says something out loud to the user"
|
|
276
|
-
logger.info(f"saying: {text}")
|
|
277
|
-
session.say(text)
|
|
278
|
-
return "success"
|
|
279
|
-
|
|
280
278
|
ctx = ChatContext()
|
|
281
279
|
|
|
282
280
|
initial_context = await self.init_chat_context()
|
|
@@ -287,7 +285,7 @@ class VoiceBot(SingleRoomAgent):
|
|
|
287
285
|
chat_ctx=ctx,
|
|
288
286
|
instructions="\n".join(self.rules),
|
|
289
287
|
allow_interruptions=True,
|
|
290
|
-
tools=[*await self.make_function_tools(context=context)
|
|
288
|
+
tools=[*await self.make_function_tools(context=context)],
|
|
291
289
|
)
|
|
292
290
|
|
|
293
291
|
# agent = Agent(
|
|
@@ -305,23 +303,14 @@ class VoiceBot(SingleRoomAgent):
|
|
|
305
303
|
return AgentChatContext()
|
|
306
304
|
|
|
307
305
|
def create_session(self, *, context: ToolContext) -> AgentSession:
|
|
308
|
-
|
|
309
|
-
url: str = context.room.room_url
|
|
310
|
-
|
|
311
|
-
room_proxy_url = f"{url}/v1"
|
|
312
|
-
|
|
313
|
-
oaiclient = AsyncOpenAI(
|
|
314
|
-
api_key=token,
|
|
315
|
-
base_url=room_proxy_url,
|
|
316
|
-
default_headers={"Meshagent-Session": context.room.session_id},
|
|
317
|
-
)
|
|
306
|
+
oaiclient = get_client(room=self.room)
|
|
318
307
|
|
|
319
308
|
session = AgentSession(
|
|
320
309
|
max_tool_steps=50,
|
|
321
310
|
allow_interruptions=True,
|
|
322
311
|
vad=silero.VAD.load(),
|
|
323
312
|
stt=openai.STT(client=oaiclient),
|
|
324
|
-
tts=openai.TTS(client=oaiclient
|
|
313
|
+
tts=openai.TTS(client=oaiclient),
|
|
325
314
|
llm=openai.LLM(client=oaiclient),
|
|
326
315
|
# turn_detection=MultilingualModel(),
|
|
327
316
|
)
|
|
@@ -355,7 +344,18 @@ class VoiceBot(SingleRoomAgent):
|
|
|
355
344
|
room=connection.livekit_room, agent_session=session
|
|
356
345
|
)
|
|
357
346
|
|
|
358
|
-
await session.start(
|
|
347
|
+
await session.start(
|
|
348
|
+
agent=agent,
|
|
349
|
+
room=connection.livekit_room,
|
|
350
|
+
room_input_options=RoomInputOptions(
|
|
351
|
+
text_enabled=False,
|
|
352
|
+
delete_room_on_close=False,
|
|
353
|
+
),
|
|
354
|
+
room_output_options=RoomOutputOptions(
|
|
355
|
+
transcription_enabled=True,
|
|
356
|
+
audio_enabled=True,
|
|
357
|
+
),
|
|
358
|
+
)
|
|
359
359
|
|
|
360
360
|
if self.auto_greet_prompt is not None:
|
|
361
361
|
session.generate_reply(user_input=self.auto_greet_prompt)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.3"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-livekit
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.3
|
|
4
4
|
Summary: Livekit support for Meshagent
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Documentation, https://docs.meshagent.com
|
|
@@ -17,8 +17,8 @@ Requires-Dist: livekit-agents~=1.2
|
|
|
17
17
|
Requires-Dist: livekit-plugins-openai~=1.2
|
|
18
18
|
Requires-Dist: livekit-plugins-silero~=1.2
|
|
19
19
|
Requires-Dist: livekit-plugins-turn-detector~=1.2
|
|
20
|
-
Requires-Dist: meshagent-api~=0.6.
|
|
21
|
-
Requires-Dist: meshagent-tools~=0.6.
|
|
20
|
+
Requires-Dist: meshagent-api~=0.6.3
|
|
21
|
+
Requires-Dist: meshagent-tools~=0.6.3
|
|
22
22
|
Dynamic: license-file
|
|
23
23
|
|
|
24
24
|
# [Meshagent](https://www.meshagent.com)
|
|
@@ -18,8 +18,8 @@ dependencies = [
|
|
|
18
18
|
"livekit-plugins-openai~=1.2",
|
|
19
19
|
"livekit-plugins-silero~=1.2",
|
|
20
20
|
"livekit-plugins-turn-detector~=1.2",
|
|
21
|
-
"meshagent-api~=0.6.
|
|
22
|
-
"meshagent-tools~=0.6.
|
|
21
|
+
"meshagent-api~=0.6.3",
|
|
22
|
+
"meshagent-tools~=0.6.3"
|
|
23
23
|
]
|
|
24
24
|
|
|
25
25
|
[project.urls]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.6.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent/livekit/livekit_protocol_test.py
RENAMED
|
File without changes
|
|
File without changes
|
{meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent_livekit.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{meshagent_livekit-0.6.1 → meshagent_livekit-0.6.3}/meshagent_livekit.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|