dv-pipecat-ai 0.0.85.dev840__py3-none-any.whl → 0.0.85.dev841__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.
- {dv_pipecat_ai-0.0.85.dev840.dist-info → dv_pipecat_ai-0.0.85.dev841.dist-info}/METADATA +1 -1
- {dv_pipecat_ai-0.0.85.dev840.dist-info → dv_pipecat_ai-0.0.85.dev841.dist-info}/RECORD +6 -6
- pipecat/services/soniox/stt.py +40 -9
- {dv_pipecat_ai-0.0.85.dev840.dist-info → dv_pipecat_ai-0.0.85.dev841.dist-info}/WHEEL +0 -0
- {dv_pipecat_ai-0.0.85.dev840.dist-info → dv_pipecat_ai-0.0.85.dev841.dist-info}/licenses/LICENSE +0 -0
- {dv_pipecat_ai-0.0.85.dev840.dist-info → dv_pipecat_ai-0.0.85.dev841.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
dv_pipecat_ai-0.0.85.
|
|
1
|
+
dv_pipecat_ai-0.0.85.dev841.dist-info/licenses/LICENSE,sha256=DWY2QGf2eMCFhuu2ChairtT6CB7BEFffNVhXWc4Od08,1301
|
|
2
2
|
pipecat/__init__.py,sha256=j0Xm6adxHhd7D06dIyyPV_GlBYLlBnTAERVvD_jAARQ,861
|
|
3
3
|
pipecat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
pipecat/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -329,7 +329,7 @@ pipecat/services/sarvam/tts.py,sha256=lrwfdC53kZ7f2QPgNRxzryISNkrJCvNtlZ-19-iXg9
|
|
|
329
329
|
pipecat/services/simli/__init__.py,sha256=cbDcqOaGsEgKbGYKpJ1Vv7LN4ZjOWA04sE84WW5vgQI,257
|
|
330
330
|
pipecat/services/simli/video.py,sha256=Zu2XLvl2Y6VHaWzT9wEdzW9d0EYoZyzYLxjQFyV8vho,8320
|
|
331
331
|
pipecat/services/soniox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
332
|
-
pipecat/services/soniox/stt.py,sha256=
|
|
332
|
+
pipecat/services/soniox/stt.py,sha256=Ndml6QvPQ1WZBvdGT3LSg-LLWwrZ8KlqW8wBBFsQrrM,16509
|
|
333
333
|
pipecat/services/speechmatics/__init__.py,sha256=Jgq1fqrZVkpWC21D79L1cn5Ub8PnYgnnCaqC5pOlbIc,89
|
|
334
334
|
pipecat/services/speechmatics/stt.py,sha256=GLGJzlMSeZ1WzTOMjhKXDl5JYkqGhnFTbP3o0ez0hSw,44696
|
|
335
335
|
pipecat/services/tavus/__init__.py,sha256=SNyyi2Xq6tXIihDG2Bwvmg6Srbd-uWd1RwG-NKWcPuI,257
|
|
@@ -416,7 +416,7 @@ pipecat/utils/tracing/service_decorators.py,sha256=fwzxFpi8DJl6BJbK74G0UEB4ccMJg
|
|
|
416
416
|
pipecat/utils/tracing/setup.py,sha256=7TEgPNpq6M8lww8OQvf0P9FzYc5A30xICGklVA-fua0,2892
|
|
417
417
|
pipecat/utils/tracing/turn_context_provider.py,sha256=ikon3plFOx0XbMrH6DdeHttNpb-U0gzMZIm3bWLc9eI,2485
|
|
418
418
|
pipecat/utils/tracing/turn_trace_observer.py,sha256=dma16SBJpYSOE58YDWy89QzHyQFc_9gQZszKeWixuwc,9725
|
|
419
|
-
dv_pipecat_ai-0.0.85.
|
|
420
|
-
dv_pipecat_ai-0.0.85.
|
|
421
|
-
dv_pipecat_ai-0.0.85.
|
|
422
|
-
dv_pipecat_ai-0.0.85.
|
|
419
|
+
dv_pipecat_ai-0.0.85.dev841.dist-info/METADATA,sha256=xq4O-F0nWpeT1pXQ6uVPqT-eYvdnGrm_ktReRPPqrYo,32955
|
|
420
|
+
dv_pipecat_ai-0.0.85.dev841.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
421
|
+
dv_pipecat_ai-0.0.85.dev841.dist-info/top_level.txt,sha256=kQzG20CxGf-nSsHmtXHx3hY2-8zHA3jYg8jk0TajqXc,8
|
|
422
|
+
dv_pipecat_ai-0.0.85.dev841.dist-info/RECORD,,
|
pipecat/services/soniox/stt.py
CHANGED
|
@@ -49,6 +49,33 @@ END_TOKEN = "<end>"
|
|
|
49
49
|
FINALIZED_TOKEN = "<fin>"
|
|
50
50
|
|
|
51
51
|
|
|
52
|
+
class SonioxContextGeneralItem(BaseModel):
|
|
53
|
+
"""Represents a key-value pair for structured general context information."""
|
|
54
|
+
|
|
55
|
+
key: str
|
|
56
|
+
value: str
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class SonioxContextTranslationTerm(BaseModel):
|
|
60
|
+
"""Represents a custom translation mapping for ambiguous or domain-specific terms."""
|
|
61
|
+
|
|
62
|
+
source: str
|
|
63
|
+
target: str
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class SonioxContextObject(BaseModel):
|
|
67
|
+
"""Context object for models with context_version 2, for Soniox stt-rt-v3-preview and higher.
|
|
68
|
+
|
|
69
|
+
Learn more about context in the documentation:
|
|
70
|
+
https://soniox.com/docs/stt/concepts/context
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
general: Optional[List[SonioxContextGeneralItem]] = None
|
|
74
|
+
text: Optional[str] = None
|
|
75
|
+
terms: Optional[List[str]] = None
|
|
76
|
+
translation_terms: Optional[List[SonioxContextTranslationTerm]] = None
|
|
77
|
+
|
|
78
|
+
|
|
52
79
|
class SonioxInputParams(BaseModel):
|
|
53
80
|
"""Real-time transcription settings.
|
|
54
81
|
|
|
@@ -60,9 +87,9 @@ class SonioxInputParams(BaseModel):
|
|
|
60
87
|
audio_format: Audio format to use for transcription.
|
|
61
88
|
num_channels: Number of channels to use for transcription.
|
|
62
89
|
language_hints: List of language hints to use for transcription.
|
|
63
|
-
context: Customization for transcription.
|
|
64
|
-
|
|
65
|
-
|
|
90
|
+
context: Customization for transcription. String for models with context_version 1 and ContextObject for models with context_version 2.
|
|
91
|
+
enable_speaker_diarization: Whether to enable speaker diarization. Tokens are annotated with speaker IDs.
|
|
92
|
+
enable_language_identification: Whether to enable language identification. Tokens are annotated with language IDs.
|
|
66
93
|
client_reference_id: Client reference ID to use for transcription.
|
|
67
94
|
"""
|
|
68
95
|
|
|
@@ -72,10 +99,10 @@ class SonioxInputParams(BaseModel):
|
|
|
72
99
|
num_channels: Optional[int] = 1
|
|
73
100
|
|
|
74
101
|
language_hints: Optional[List[Language]] = None
|
|
75
|
-
context: Optional[str] = None
|
|
102
|
+
context: Optional[SonioxContextObject | str] = None
|
|
76
103
|
|
|
77
|
-
|
|
78
|
-
|
|
104
|
+
enable_speaker_diarization: Optional[bool] = False
|
|
105
|
+
enable_language_identification: Optional[bool] = False
|
|
79
106
|
|
|
80
107
|
client_reference_id: Optional[str] = None
|
|
81
108
|
|
|
@@ -173,6 +200,10 @@ class SonioxSTTService(STTService):
|
|
|
173
200
|
# Either one or the other is required.
|
|
174
201
|
enable_endpoint_detection = not self._vad_force_turn_endpoint
|
|
175
202
|
|
|
203
|
+
context = self._params.context
|
|
204
|
+
if isinstance(context, SonioxContextObject):
|
|
205
|
+
context = context.model_dump()
|
|
206
|
+
|
|
176
207
|
# Send the initial configuration message.
|
|
177
208
|
config = {
|
|
178
209
|
"api_key": self._api_key,
|
|
@@ -182,9 +213,9 @@ class SonioxSTTService(STTService):
|
|
|
182
213
|
"enable_endpoint_detection": enable_endpoint_detection,
|
|
183
214
|
"sample_rate": self.sample_rate,
|
|
184
215
|
"language_hints": _prepare_language_hints(self._params.language_hints),
|
|
185
|
-
"context":
|
|
186
|
-
"
|
|
187
|
-
"
|
|
216
|
+
"context": context,
|
|
217
|
+
"enable_speaker_diarization": self._params.enable_speaker_diarization,
|
|
218
|
+
"enable_language_identification": self._params.enable_language_identification,
|
|
188
219
|
"client_reference_id": self._params.client_reference_id,
|
|
189
220
|
}
|
|
190
221
|
|
|
File without changes
|
{dv_pipecat_ai-0.0.85.dev840.dist-info → dv_pipecat_ai-0.0.85.dev841.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{dv_pipecat_ai-0.0.85.dev840.dist-info → dv_pipecat_ai-0.0.85.dev841.dist-info}/top_level.txt
RENAMED
|
File without changes
|