livekit-plugins-google 0.3.0__py3-none-any.whl → 1.3.11__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.
- livekit/plugins/google/__init__.py +33 -7
- livekit/plugins/google/beta/__init__.py +13 -0
- livekit/plugins/google/beta/gemini_tts.py +258 -0
- livekit/plugins/google/llm.py +562 -0
- livekit/plugins/google/log.py +3 -0
- livekit/plugins/google/models.py +160 -32
- livekit/plugins/google/realtime/__init__.py +9 -0
- livekit/plugins/google/realtime/api_proto.py +68 -0
- livekit/plugins/google/realtime/realtime_api.py +1249 -0
- livekit/plugins/google/stt.py +717 -283
- livekit/plugins/google/tools.py +71 -0
- livekit/plugins/google/tts.py +455 -0
- livekit/plugins/google/utils.py +220 -0
- livekit/plugins/google/version.py +1 -1
- livekit_plugins_google-1.3.11.dist-info/METADATA +63 -0
- livekit_plugins_google-1.3.11.dist-info/RECORD +18 -0
- {livekit_plugins_google-0.3.0.dist-info → livekit_plugins_google-1.3.11.dist-info}/WHEEL +1 -2
- livekit_plugins_google-0.3.0.dist-info/METADATA +0 -47
- livekit_plugins_google-0.3.0.dist-info/RECORD +0 -9
- livekit_plugins_google-0.3.0.dist-info/top_level.txt +0 -1
livekit/plugins/google/models.py
CHANGED
|
@@ -1,85 +1,213 @@
|
|
|
1
1
|
from typing import Literal
|
|
2
2
|
|
|
3
|
-
# Speech to Text v2
|
|
3
|
+
# Speech to Text (v1 and v2)
|
|
4
4
|
|
|
5
5
|
SpeechModels = Literal[
|
|
6
|
-
"long",
|
|
6
|
+
"long",
|
|
7
|
+
"short",
|
|
8
|
+
"telephony",
|
|
9
|
+
"medical_dictation",
|
|
10
|
+
"medical_conversation",
|
|
11
|
+
"chirp",
|
|
12
|
+
"chirp_2",
|
|
13
|
+
"chirp_3",
|
|
14
|
+
"latest_long",
|
|
15
|
+
"latest_short",
|
|
16
|
+
]
|
|
17
|
+
# https://docs.cloud.google.com/speech-to-text/docs/transcription-model
|
|
18
|
+
|
|
19
|
+
SpeechModelsV2 = Literal[
|
|
20
|
+
"telephony",
|
|
21
|
+
"chirp_2",
|
|
22
|
+
"chirp_3",
|
|
7
23
|
]
|
|
8
24
|
|
|
9
25
|
SpeechLanguages = Literal[
|
|
10
|
-
"en-US",
|
|
11
|
-
"ja-JP",
|
|
12
|
-
"en-IN",
|
|
13
|
-
"en-GB",
|
|
14
|
-
"hi-IN",
|
|
15
26
|
"af-ZA",
|
|
16
|
-
"sq-AL",
|
|
17
27
|
"am-ET",
|
|
28
|
+
"ar-AE",
|
|
29
|
+
"ar-BH",
|
|
30
|
+
"ar-DZ",
|
|
18
31
|
"ar-EG",
|
|
19
|
-
"
|
|
32
|
+
"ar-IL",
|
|
33
|
+
"ar-IQ",
|
|
34
|
+
"ar-JO",
|
|
35
|
+
"ar-KW",
|
|
36
|
+
"ar-LB",
|
|
37
|
+
"ar-MA",
|
|
38
|
+
"ar-MR",
|
|
39
|
+
"ar-OM",
|
|
40
|
+
"ar-PS",
|
|
41
|
+
"ar-QA",
|
|
42
|
+
"ar-SA",
|
|
43
|
+
"ar-TN",
|
|
44
|
+
"ar-YE",
|
|
45
|
+
"as-IN",
|
|
20
46
|
"ast-ES",
|
|
21
47
|
"az-AZ",
|
|
22
|
-
"eu-ES",
|
|
23
48
|
"be-BY",
|
|
24
|
-
"bs-BA",
|
|
25
49
|
"bg-BG",
|
|
26
|
-
"
|
|
50
|
+
"bn-BD",
|
|
51
|
+
"bn-IN",
|
|
52
|
+
"bs-BA",
|
|
27
53
|
"ca-ES",
|
|
28
54
|
"ceb-PH",
|
|
29
55
|
"ckb-IQ",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"zh-TW",
|
|
33
|
-
"hr-HR",
|
|
56
|
+
"cmn-Hans-CN",
|
|
57
|
+
"cmn-Hant-TW",
|
|
34
58
|
"cs-CZ",
|
|
59
|
+
"cy-GB",
|
|
35
60
|
"da-DK",
|
|
36
|
-
"
|
|
61
|
+
"de-AT",
|
|
62
|
+
"de-CH",
|
|
63
|
+
"de-DE",
|
|
64
|
+
"el-GR",
|
|
37
65
|
"en-AU",
|
|
66
|
+
"en-CA",
|
|
67
|
+
"en-GB",
|
|
68
|
+
"en-HK",
|
|
69
|
+
"en-IE",
|
|
70
|
+
"en-IN",
|
|
71
|
+
"en-NZ",
|
|
72
|
+
"en-PK",
|
|
73
|
+
"en-SG",
|
|
74
|
+
"en-US",
|
|
75
|
+
"es-419",
|
|
76
|
+
"es-AR",
|
|
77
|
+
"es-BO",
|
|
78
|
+
"es-CL",
|
|
79
|
+
"es-CO",
|
|
80
|
+
"es-CR",
|
|
81
|
+
"es-DO",
|
|
82
|
+
"es-EC",
|
|
83
|
+
"es-ES",
|
|
84
|
+
"es-GT",
|
|
85
|
+
"es-HN",
|
|
86
|
+
"es-MX",
|
|
87
|
+
"es-NI",
|
|
88
|
+
"es-PA",
|
|
89
|
+
"es-PE",
|
|
90
|
+
"es-PR",
|
|
91
|
+
"es-SV",
|
|
92
|
+
"es-US",
|
|
93
|
+
"es-UY",
|
|
94
|
+
"es-VE",
|
|
38
95
|
"et-EE",
|
|
39
|
-
"
|
|
96
|
+
"eu-ES",
|
|
97
|
+
"fa-IR",
|
|
98
|
+
"ff-SN",
|
|
40
99
|
"fi-FI",
|
|
100
|
+
"fil-PH",
|
|
101
|
+
"fr-BE",
|
|
41
102
|
"fr-CA",
|
|
103
|
+
"fr-CH",
|
|
42
104
|
"fr-FR",
|
|
105
|
+
"ga-IE",
|
|
43
106
|
"gl-ES",
|
|
44
|
-
"ka-GE",
|
|
45
|
-
"de-DE",
|
|
46
|
-
"el-GR",
|
|
47
107
|
"gu-IN",
|
|
48
108
|
"ha-NG",
|
|
49
|
-
"iw-IL",
|
|
50
109
|
"hi-IN",
|
|
110
|
+
"hr-HR",
|
|
51
111
|
"hu-HU",
|
|
52
|
-
"
|
|
112
|
+
"hy-AM",
|
|
53
113
|
"id-ID",
|
|
114
|
+
"ig-NG",
|
|
115
|
+
"is-IS",
|
|
116
|
+
"it-CH",
|
|
54
117
|
"it-IT",
|
|
118
|
+
"iw-IL",
|
|
55
119
|
"ja-JP",
|
|
56
120
|
"jv-ID",
|
|
57
|
-
"
|
|
121
|
+
"ka-GE",
|
|
58
122
|
"kam-KE",
|
|
59
|
-
"
|
|
123
|
+
"kea-CV",
|
|
60
124
|
"kk-KZ",
|
|
61
125
|
"km-KH",
|
|
126
|
+
"kn-IN",
|
|
62
127
|
"ko-KR",
|
|
63
128
|
"ky-KG",
|
|
64
|
-
"
|
|
65
|
-
"
|
|
129
|
+
"lb-LU",
|
|
130
|
+
"lg-UG",
|
|
66
131
|
"ln-CD",
|
|
132
|
+
"lo-LA",
|
|
67
133
|
"lt-LT",
|
|
68
134
|
"luo-KE",
|
|
69
|
-
"
|
|
135
|
+
"lv-LV",
|
|
136
|
+
"mi-NZ",
|
|
70
137
|
"mk-MK",
|
|
138
|
+
"ml-IN",
|
|
139
|
+
"mn-MN",
|
|
140
|
+
"mr-IN",
|
|
141
|
+
"ms-MY",
|
|
142
|
+
"mt-MT",
|
|
143
|
+
"my-MM",
|
|
144
|
+
"ne-NP",
|
|
145
|
+
"nl-BE",
|
|
146
|
+
"nl-NL",
|
|
71
147
|
"no-NO",
|
|
148
|
+
"nso-ZA",
|
|
149
|
+
"ny-MW",
|
|
150
|
+
"oc-FR",
|
|
151
|
+
"om-ET",
|
|
152
|
+
"or-IN",
|
|
153
|
+
"pa-Guru-IN",
|
|
72
154
|
"pl-PL",
|
|
155
|
+
"ps-AF",
|
|
73
156
|
"pt-BR",
|
|
74
157
|
"pt-PT",
|
|
75
158
|
"ro-RO",
|
|
76
159
|
"ru-RU",
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
160
|
+
"rup-BG",
|
|
161
|
+
"rw-RW",
|
|
162
|
+
"sd-IN",
|
|
163
|
+
"si-LK",
|
|
164
|
+
"sk-SK",
|
|
165
|
+
"sl-SI",
|
|
166
|
+
"sn-ZW",
|
|
167
|
+
"so-SO",
|
|
168
|
+
"sq-AL",
|
|
169
|
+
"sr-RS",
|
|
170
|
+
"ss-Latn-ZA",
|
|
171
|
+
"st-ZA",
|
|
172
|
+
"su-ID",
|
|
173
|
+
"sv-SE",
|
|
174
|
+
"sw",
|
|
175
|
+
"sw-KE",
|
|
176
|
+
"ta-IN",
|
|
177
|
+
"te-IN",
|
|
178
|
+
"tg-TJ",
|
|
80
179
|
"th-TH",
|
|
180
|
+
"tn-Latn-ZA",
|
|
81
181
|
"tr-TR",
|
|
182
|
+
"ts-ZA",
|
|
82
183
|
"uk-UA",
|
|
184
|
+
"umb-AO",
|
|
185
|
+
"ur-PK",
|
|
186
|
+
"uz-UZ",
|
|
187
|
+
"ve-ZA",
|
|
83
188
|
"vi-VN",
|
|
84
|
-
"
|
|
189
|
+
"wo-SN",
|
|
190
|
+
"xh-ZA",
|
|
191
|
+
"yo-NG",
|
|
192
|
+
"yue-Hant-HK",
|
|
193
|
+
"zu-ZA",
|
|
194
|
+
]
|
|
195
|
+
|
|
196
|
+
Gender = Literal["male", "female", "neutral"]
|
|
197
|
+
|
|
198
|
+
ChatModels = Literal[
|
|
199
|
+
"gemini-3-pro-preview",
|
|
200
|
+
"gemini-3-flash-preview",
|
|
201
|
+
"gemini-2.5-flash",
|
|
202
|
+
"gemini-2.5-pro-preview-05-06",
|
|
203
|
+
"gemini-2.5-flash-preview-04-17",
|
|
204
|
+
"gemini-2.5-flash-preview-05-20",
|
|
205
|
+
"gemini-2.0-flash-001",
|
|
206
|
+
"gemini-2.0-flash-lite-preview-02-05",
|
|
207
|
+
"gemini-2.0-pro-exp-02-05",
|
|
208
|
+
"gemini-1.5-pro",
|
|
209
|
+
]
|
|
210
|
+
|
|
211
|
+
GeminiTTSModels = Literal[
|
|
212
|
+
"gemini-2.5-flash-tts", "gemini-2.5-flash-lite-preview-tts", "gemini-2.5-pro-tts"
|
|
85
213
|
]
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Sequence
|
|
4
|
+
from typing import Literal, Union
|
|
5
|
+
|
|
6
|
+
from google.genai import types
|
|
7
|
+
|
|
8
|
+
# Gemini API deprecations: https://ai.google.dev/gemini-api/docs/deprecations
|
|
9
|
+
# Gemini API release notes with preview deprecations: https://ai.google.dev/gemini-api/docs/changelog
|
|
10
|
+
# live models: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/live-api
|
|
11
|
+
# VertexAI retirement: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/learn/model-versions#retired-models
|
|
12
|
+
# Additional references:
|
|
13
|
+
# 1. https://github.com/kazunori279/adk-streaming-test/blob/main/test_report.md
|
|
14
|
+
LiveAPIModels = Literal[
|
|
15
|
+
# VertexAI models
|
|
16
|
+
"gemini-live-2.5-flash-native-audio", # GA https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-5-flash-live-api#live-2.5-flash
|
|
17
|
+
"gemini-live-2.5-flash-preview-native-audio-09-2025", # Public preview https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-5-flash-live-api#live-2.5-flash-preview
|
|
18
|
+
"gemini-live-2.5-flash-preview-native-audio", # still works, possibly an alias, but not mentioned in any docs or changelog
|
|
19
|
+
# Gemini API models
|
|
20
|
+
"gemini-2.5-flash-native-audio-preview-12-2025", # https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-live
|
|
21
|
+
"gemini-2.5-flash-native-audio-preview-09-2025", # https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-live
|
|
22
|
+
"gemini-2.0-flash-exp", # still works in Gemini API but not VertexAI
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
Voice = Literal[
|
|
26
|
+
"Achernar",
|
|
27
|
+
"Achird",
|
|
28
|
+
"Algenib",
|
|
29
|
+
"Algieba",
|
|
30
|
+
"Alnilam",
|
|
31
|
+
"Aoede",
|
|
32
|
+
"Autonoe",
|
|
33
|
+
"Callirrhoe",
|
|
34
|
+
"Charon",
|
|
35
|
+
"Despina",
|
|
36
|
+
"Enceladus",
|
|
37
|
+
"Erinome",
|
|
38
|
+
"Fenrir",
|
|
39
|
+
"Gacrux",
|
|
40
|
+
"Iapetus",
|
|
41
|
+
"Kore",
|
|
42
|
+
"Laomedeia",
|
|
43
|
+
"Leda",
|
|
44
|
+
"Orus",
|
|
45
|
+
"Pulcherrima",
|
|
46
|
+
"Puck",
|
|
47
|
+
"Rasalgethi",
|
|
48
|
+
"Sadachbia",
|
|
49
|
+
"Sadaltager",
|
|
50
|
+
"Schedar",
|
|
51
|
+
"Sulafat",
|
|
52
|
+
"Umbriel",
|
|
53
|
+
"Vindemiatrix",
|
|
54
|
+
"Zephyr",
|
|
55
|
+
"Zubenelgenubi",
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
ClientEvents = Union[
|
|
60
|
+
types.ContentListUnion,
|
|
61
|
+
types.ContentListUnionDict,
|
|
62
|
+
types.LiveClientContentOrDict,
|
|
63
|
+
types.LiveClientRealtimeInput,
|
|
64
|
+
types.LiveClientRealtimeInputOrDict,
|
|
65
|
+
types.LiveClientToolResponseOrDict,
|
|
66
|
+
types.FunctionResponseOrDict,
|
|
67
|
+
Sequence[types.FunctionResponseOrDict],
|
|
68
|
+
]
|