livekit-plugins-google 1.2.1__py3-none-any.whl → 1.2.2__py3-none-any.whl

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.

@@ -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.1"
15
+ __version__ = "1.2.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: livekit-plugins-google
3
- Version: 1.2.1
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.1
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
@@ -7,12 +7,12 @@ livekit/plugins/google/stt.py,sha256=ssDMH5U1vQOLA44XMlovYWIR4UqVtZSge3YFN-zZ7Iw
7
7
  livekit/plugins/google/tools.py,sha256=tD5HVDHO5JfUF029Cx3axHMJec0Gxalkl7s1FDgxLzI,259
8
8
  livekit/plugins/google/tts.py,sha256=SODcGwteJIpGmuFArVRwuwy49k8-uQXJAIK5wBNiMC8,16219
9
9
  livekit/plugins/google/utils.py,sha256=6iihkKx76DDtLiHOoTU2ZXqzupBRY_gN3njpnwdmeqY,8829
10
- livekit/plugins/google/version.py,sha256=iPQIVYvAlr-64s2ztWSUDdom8KYqdQVSojiZcxUdAdM,600
10
+ livekit/plugins/google/version.py,sha256=39CTDpbLs48II4i9weO-jS-pvn0iSHM1YQvYHpw8bl8,600
11
11
  livekit/plugins/google/beta/__init__.py,sha256=RvAUdvEiRN-fe4JrgPcN0Jkw1kZR9wPerGMFVjS1Cc0,270
12
12
  livekit/plugins/google/beta/gemini_tts.py,sha256=esWjr0Xf95tl0_AB7MXiFZ_VCORWgcWjzvLvRa3t0FQ,8515
13
13
  livekit/plugins/google/beta/realtime/__init__.py,sha256=_fW2NMN22F-hnQ4xAJ_g5lPbR7CvM_xXzSWlUQY-E-U,188
14
14
  livekit/plugins/google/beta/realtime/api_proto.py,sha256=cbKmpX32G4gPjF6cxFNzGEDfYX19SK-vWi4Myxb8Yks,777
15
- livekit/plugins/google/beta/realtime/realtime_api.py,sha256=LMUOhmv4KWTI6mrLAKnnRdZ72ouug69a_oULGKvoMvw,46073
16
- livekit_plugins_google-1.2.1.dist-info/METADATA,sha256=z6fi69F8Gjpn9XhCQlC8aZRWZeZ5T7YvzK7XkHzZ9MY,1907
17
- livekit_plugins_google-1.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
18
- livekit_plugins_google-1.2.1.dist-info/RECORD,,
15
+ livekit/plugins/google/beta/realtime/realtime_api.py,sha256=fu03CE94RFEkGWVT9CPkG3R2DFl4AXbT4XMNJ0oIdtM,46636
16
+ livekit_plugins_google-1.2.2.dist-info/METADATA,sha256=CfM0C1WDRcTUlFUfI7pYuTUzg1BAC5GTiApxZaBV-e8,1907
17
+ livekit_plugins_google-1.2.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
18
+ livekit_plugins_google-1.2.2.dist-info/RECORD,,