livekit-plugins-google 1.2.0__tar.gz → 1.2.2__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 livekit-plugins-google might be problematic. Click here for more details.

Files changed (19) hide show
  1. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/.gitignore +4 -1
  2. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/PKG-INFO +2 -2
  3. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/beta/realtime/realtime_api.py +15 -0
  4. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/version.py +1 -1
  5. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/pyproject.toml +1 -1
  6. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/README.md +0 -0
  7. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/__init__.py +0 -0
  8. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/beta/__init__.py +0 -0
  9. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/beta/gemini_tts.py +0 -0
  10. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/beta/realtime/__init__.py +0 -0
  11. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/beta/realtime/api_proto.py +0 -0
  12. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/llm.py +0 -0
  13. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/log.py +0 -0
  14. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/models.py +0 -0
  15. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/py.typed +0 -0
  16. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/stt.py +0 -0
  17. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/tools.py +0 -0
  18. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/tts.py +0 -0
  19. {livekit_plugins_google-1.2.0 → livekit_plugins_google-1.2.2}/livekit/plugins/google/utils.py +0 -0
@@ -169,4 +169,7 @@ node_modules
169
169
 
170
170
  credentials.json
171
171
  pyrightconfig.json
172
- docs/
172
+ docs/
173
+
174
+ # Database files
175
+ *.db
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: livekit-plugins-google
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: Agent Framework plugin for services from Google Cloud
5
5
  Project-URL: Documentation, https://docs.livekit.io
6
6
  Project-URL: Website, https://livekit.io/
@@ -22,7 +22,7 @@ Requires-Dist: google-auth<3,>=2
22
22
  Requires-Dist: google-cloud-speech<3,>=2
23
23
  Requires-Dist: google-cloud-texttospeech<3,>=2.27
24
24
  Requires-Dist: google-genai>=v1.23.0
25
- Requires-Dist: livekit-agents>=1.2.0
25
+ Requires-Dist: livekit-agents>=1.2.2
26
26
  Description-Content-Type: text/markdown
27
27
 
28
28
  # Google AI plugin for LiveKit Agents
@@ -786,6 +786,10 @@ class RealtimeSession(llm.RealtimeSession):
786
786
  logger.warning("starting new generation while another is active. Finalizing previous.")
787
787
  self._mark_current_generation_done()
788
788
 
789
+ # emit input_speech_started event before starting a new generation
790
+ # to interrupt the previous audio playout if any
791
+ self._handle_input_speech_started()
792
+
789
793
  response_id = utils.shortuuid("GR_")
790
794
  self._current_generation = _ResponseGeneration(
791
795
  message_ch=utils.aio.Chan[llm.MessageGeneration](),
@@ -882,6 +886,9 @@ class RealtimeSession(llm.RealtimeSession):
882
886
  if not self._current_generation or self._current_generation._done:
883
887
  return
884
888
 
889
+ # emit input_speech_stopped event after the generation is done
890
+ self._handle_input_speech_stopped()
891
+
885
892
  gen = self._current_generation
886
893
 
887
894
  # The only way we'd know that the transcription is complete is by when they are
@@ -926,6 +933,14 @@ class RealtimeSession(llm.RealtimeSession):
926
933
  def _handle_input_speech_started(self) -> None:
927
934
  self.emit("input_speech_started", llm.InputSpeechStartedEvent())
928
935
 
936
+ def _handle_input_speech_stopped(self) -> None:
937
+ self.emit(
938
+ "input_speech_stopped",
939
+ llm.InputSpeechStoppedEvent(
940
+ user_transcription_enabled=self._realtime_model.capabilities.user_transcription
941
+ ),
942
+ )
943
+
929
944
  def _handle_tool_calls(self, tool_call: types.LiveServerToolCall) -> None:
930
945
  if not self._current_generation:
931
946
  logger.warning("received tool call but no active generation.")
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "1.2.0"
15
+ __version__ = "1.2.2"
@@ -27,7 +27,7 @@ dependencies = [
27
27
  "google-cloud-speech >= 2, < 3",
28
28
  "google-cloud-texttospeech >= 2.27, < 3",
29
29
  "google-genai >= v1.23.0",
30
- "livekit-agents>=1.2.0",
30
+ "livekit-agents>=1.2.2",
31
31
  ]
32
32
 
33
33
  [project.urls]