livekit-plugins-volcengine 1.2.3__tar.gz → 1.2.3.post0__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.
Files changed (15) hide show
  1. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/PKG-INFO +2 -2
  2. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/livekit/plugins/volcengine/realtime.py +14 -0
  3. livekit_plugins_volcengine-1.2.3.post0/livekit/plugins/volcengine/version.py +1 -0
  4. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/pyproject.toml +1 -1
  5. livekit_plugins_volcengine-1.2.3/livekit/plugins/volcengine/version.py +0 -1
  6. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/.gitignore +0 -0
  7. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/README.md +0 -0
  8. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/livekit/plugins/volcengine/__init__.py +0 -0
  9. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/livekit/plugins/volcengine/bigmodel_stt.py +0 -0
  10. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/livekit/plugins/volcengine/llm.py +0 -0
  11. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/livekit/plugins/volcengine/log.py +0 -0
  12. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/livekit/plugins/volcengine/py.typed +0 -0
  13. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/livekit/plugins/volcengine/stt.py +0 -0
  14. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/livekit/plugins/volcengine/tts.py +0 -0
  15. {livekit_plugins_volcengine-1.2.3 → livekit_plugins_volcengine-1.2.3.post0}/livekit/plugins/volcengine/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: livekit-plugins-volcengine
3
- Version: 1.2.3
3
+ Version: 1.2.3.post0
4
4
  Summary: LiveKit Agent Plugins for Volcengine
5
5
  Author-email: wangmengdi <790990241@qq.com>
6
6
  Keywords: audio,livekit,realtime,video,webrtc
@@ -14,7 +14,7 @@ Classifier: Topic :: Multimedia :: Sound/Audio
14
14
  Classifier: Topic :: Multimedia :: Video
15
15
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
16
16
  Requires-Python: >=3.9
17
- Requires-Dist: livekit-agents>=1.2.3
17
+ Requires-Dist: livekit-agents==1.2.2
18
18
  Requires-Dist: numpy
19
19
  Requires-Dist: openai>=1.75.0
20
20
  Requires-Dist: osc-data>=0.2.2
@@ -216,6 +216,7 @@ class _MessageGeneration:
216
216
  message_id: str
217
217
  text_ch: utils.aio.Chan[str]
218
218
  audio_ch: utils.aio.Chan[rtc.AudioFrame]
219
+ modalities: asyncio.Future[list[Literal["text", "audio"]]]
219
220
  audio_transcript: str = ""
220
221
 
221
222
 
@@ -279,6 +280,7 @@ class RealtimeModel(llm.RealtimeModel):
279
280
  )
280
281
  self._http_session = http_session
281
282
  self._sessions = weakref.WeakSet[RealtimeSession]()
283
+ print(self.capabilities.audio_output)
282
284
 
283
285
  def update_options(
284
286
  self,
@@ -440,13 +442,18 @@ class RealtimeSession(
440
442
  message_id=item_id,
441
443
  text_ch=utils.aio.Chan(),
442
444
  audio_ch=utils.aio.Chan(),
445
+ modalities=asyncio.Future(),
443
446
  )
447
+ if not self._realtime_model.capabilities.audio_output:
448
+ self._current_item.audio_ch.close()
449
+ self._current_item.modalities.set_result(["text"])
444
450
 
445
451
  self._current_generation.message_ch.send_nowait(
446
452
  llm.MessageGeneration(
447
453
  message_id=item_id,
448
454
  text_stream=self._current_item.text_ch,
449
455
  audio_stream=self._current_item.audio_ch,
456
+ modalities=self._current_item.modalities,
450
457
  )
451
458
  )
452
459
 
@@ -498,6 +505,7 @@ class RealtimeSession(
498
505
  is_final = not response["results"][0]["is_interim"]
499
506
  if is_final:
500
507
  item_id = utils.shortuuid()
508
+ logger.info("transcription completed")
501
509
  self.emit(
502
510
  "input_audio_transcription_completed",
503
511
  llm.InputTranscriptionCompleted(
@@ -527,12 +535,17 @@ class RealtimeSession(
527
535
  message_id=item_id,
528
536
  text_ch=utils.aio.Chan(),
529
537
  audio_ch=utils.aio.Chan(),
538
+ modalities=asyncio.Future(),
530
539
  )
540
+ if not self._realtime_model.capabilities.audio_output:
541
+ self._current_item.audio_ch.close()
542
+ self._current_item.modalities.set_result(["text"])
531
543
  self._current_generation.message_ch.send_nowait(
532
544
  llm.MessageGeneration(
533
545
  message_id=item_id,
534
546
  text_stream=self._current_item.text_ch,
535
547
  audio_stream=self._current_item.audio_ch,
548
+ modalities=self._current_item.modalities,
536
549
  )
537
550
  )
538
551
 
@@ -548,6 +561,7 @@ class RealtimeSession(
548
561
  logger.info("tts start")
549
562
 
550
563
  elif event == 352: # TTSResponse
564
+ logger.info("tts response")
551
565
  if self._first_tts_response:
552
566
  logger.info("llm first sentence")
553
567
  logger.info("tts first response")
@@ -0,0 +1 @@
1
+ __version__ = "1.2.3.post0"
@@ -9,11 +9,11 @@ authors = [
9
9
  keywords = ["webrtc", "realtime", "audio", "video", "livekit"]
10
10
  requires-python = ">=3.9"
11
11
  dependencies = [
12
- "livekit-agents>=1.2.3",
13
12
  "openai>=1.75.0",
14
13
  "osc-data>=0.2.2",
15
14
  "pydantic",
16
15
  "numpy",
16
+ "livekit-agents==1.2.2",
17
17
  ]
18
18
 
19
19
  classifiers = [
@@ -1 +0,0 @@
1
- __version__ = "1.2.3"