livekit-plugins-deepgram 1.0.0rc9__py3-none-any.whl → 1.0.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.
- livekit/plugins/deepgram/models.py +1 -0
- livekit/plugins/deepgram/stt.py +8 -8
- livekit/plugins/deepgram/tts.py +1 -3
- livekit/plugins/deepgram/version.py +1 -1
- {livekit_plugins_deepgram-1.0.0rc9.dist-info → livekit_plugins_deepgram-1.0.2.dist-info}/METADATA +2 -2
- livekit_plugins_deepgram-1.0.2.dist-info/RECORD +11 -0
- livekit_plugins_deepgram-1.0.0rc9.dist-info/RECORD +0 -11
- {livekit_plugins_deepgram-1.0.0rc9.dist-info → livekit_plugins_deepgram-1.0.2.dist-info}/WHEEL +0 -0
livekit/plugins/deepgram/stt.py
CHANGED
@@ -119,7 +119,7 @@ class STT(stt.STT):
|
|
119
119
|
def __init__(
|
120
120
|
self,
|
121
121
|
*,
|
122
|
-
model: DeepgramModels | str = "nova-
|
122
|
+
model: DeepgramModels | str = "nova-3",
|
123
123
|
language: DeepgramLanguages | str = "en-US",
|
124
124
|
detect_language: bool = False,
|
125
125
|
interim_results: bool = True,
|
@@ -705,16 +705,19 @@ class SpeechStream(stt.SpeechStream):
|
|
705
705
|
def live_transcription_to_speech_data(language: str, data: dict) -> list[stt.SpeechData]:
|
706
706
|
dg_alts = data["channel"]["alternatives"]
|
707
707
|
|
708
|
-
|
709
|
-
|
708
|
+
speech_data = []
|
709
|
+
for alt in dg_alts:
|
710
|
+
sd = stt.SpeechData(
|
710
711
|
language=language,
|
711
712
|
start_time=alt["words"][0]["start"] if alt["words"] else 0,
|
712
713
|
end_time=alt["words"][-1]["end"] if alt["words"] else 0,
|
713
714
|
confidence=alt["confidence"],
|
714
715
|
text=alt["transcript"],
|
715
716
|
)
|
716
|
-
|
717
|
-
|
717
|
+
if language == "multi" and "languages" in alt:
|
718
|
+
sd.language = alt["languages"][0] # TODO: handle multiple languages
|
719
|
+
speech_data.append(sd)
|
720
|
+
return speech_data
|
718
721
|
|
719
722
|
|
720
723
|
def prerecorded_transcription_to_speech_event(
|
@@ -779,9 +782,6 @@ def _validate_model(
|
|
779
782
|
"nova-2-medical",
|
780
783
|
"nova-2-drivethru",
|
781
784
|
"nova-2-automotive",
|
782
|
-
# nova-3 will support more languages, but english-only for now
|
783
|
-
"nova-3",
|
784
|
-
"nova-3-general",
|
785
785
|
}
|
786
786
|
if is_given(language) and language not in ("en-US", "en") and model in en_only_models:
|
787
787
|
logger.warning(
|
livekit/plugins/deepgram/tts.py
CHANGED
@@ -75,9 +75,7 @@ class TTS(tts.TTS):
|
|
75
75
|
raise ValueError("Deepgram API key required. Set DEEPGRAM_API_KEY or provide api_key.")
|
76
76
|
|
77
77
|
if not is_given(word_tokenizer):
|
78
|
-
word_tokenizer = tokenize.basic.WordTokenizer(
|
79
|
-
ignore_punctuation=False
|
80
|
-
)
|
78
|
+
word_tokenizer = tokenize.basic.WordTokenizer(ignore_punctuation=False)
|
81
79
|
|
82
80
|
self._opts = _TTSOptions(
|
83
81
|
model=model,
|
{livekit_plugins_deepgram-1.0.0rc9.dist-info → livekit_plugins_deepgram-1.0.2.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: livekit-plugins-deepgram
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.2
|
4
4
|
Summary: Agent Framework plugin for services using Deepgram's API.
|
5
5
|
Project-URL: Documentation, https://docs.livekit.io
|
6
6
|
Project-URL: Website, https://livekit.io/
|
@@ -18,7 +18,7 @@ Classifier: Topic :: Multimedia :: Sound/Audio
|
|
18
18
|
Classifier: Topic :: Multimedia :: Video
|
19
19
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
20
20
|
Requires-Python: >=3.9.0
|
21
|
-
Requires-Dist: livekit-agents[codecs]>=1.0.
|
21
|
+
Requires-Dist: livekit-agents[codecs]>=1.0.2
|
22
22
|
Requires-Dist: numpy>=1.26
|
23
23
|
Description-Content-Type: text/markdown
|
24
24
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
livekit/plugins/deepgram/__init__.py,sha256=o1BgJLSoxrTkSUHXkKrFMl9e0bF6am2TFrDMV4U6j7g,584
|
2
|
+
livekit/plugins/deepgram/_utils.py,sha256=0O3O77qURXjYYCenl5McE85fcBApaQvQl5zKQzvYfR8,1276
|
3
|
+
livekit/plugins/deepgram/log.py,sha256=isjd2-ROJXiDFhRRnqRmYxv16U5H9dBV6ut2g5bU7q0,71
|
4
|
+
livekit/plugins/deepgram/models.py,sha256=dVguYc9AfjlexreN_O1C0NxX3q-ZK9k8s5B3hWsbtZ0,1236
|
5
|
+
livekit/plugins/deepgram/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
livekit/plugins/deepgram/stt.py,sha256=qbfGWX_zQynMkX7mdxjARX8swJjMmVyrhfQIzUJjho8,32568
|
7
|
+
livekit/plugins/deepgram/tts.py,sha256=Cm3u6Oa2WumOLfup8j9wgK3s_-68Nkc7QtuP_hoppvM,15461
|
8
|
+
livekit/plugins/deepgram/version.py,sha256=VAosEGj0ByVVgOD0nuevp_anp63XZCFxkxz7t-41kg8,600
|
9
|
+
livekit_plugins_deepgram-1.0.2.dist-info/METADATA,sha256=om3PzVQA2V-uZ9g2PAA5LIewdy9UnytNDhCXnL2SNRg,1348
|
10
|
+
livekit_plugins_deepgram-1.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
11
|
+
livekit_plugins_deepgram-1.0.2.dist-info/RECORD,,
|
@@ -1,11 +0,0 @@
|
|
1
|
-
livekit/plugins/deepgram/__init__.py,sha256=o1BgJLSoxrTkSUHXkKrFMl9e0bF6am2TFrDMV4U6j7g,584
|
2
|
-
livekit/plugins/deepgram/_utils.py,sha256=0O3O77qURXjYYCenl5McE85fcBApaQvQl5zKQzvYfR8,1276
|
3
|
-
livekit/plugins/deepgram/log.py,sha256=isjd2-ROJXiDFhRRnqRmYxv16U5H9dBV6ut2g5bU7q0,71
|
4
|
-
livekit/plugins/deepgram/models.py,sha256=TdytPIBC5X6POp6QbfHqOIVee_7u6MQ1S7umlst6pNQ,1223
|
5
|
-
livekit/plugins/deepgram/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
livekit/plugins/deepgram/stt.py,sha256=-TCeE9QIWFYZc2G5tvBbeXdF9nRAm9cAjsxC_DkrX8U,32497
|
7
|
-
livekit/plugins/deepgram/tts.py,sha256=mIkm-jrPpDrqX_Fm3yvfSymWvaXPkzG6SAAQRojJHzg,15505
|
8
|
-
livekit/plugins/deepgram/version.py,sha256=5bk2f3atP67YoCoyxLdm3aJrB_QkLXroUSkhYmjhT1o,604
|
9
|
-
livekit_plugins_deepgram-1.0.0rc9.dist-info/METADATA,sha256=ZMY4izBv90AyM93nWpUBFHEENEVVls1JmxA8P3Ryysc,1355
|
10
|
-
livekit_plugins_deepgram-1.0.0rc9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
11
|
-
livekit_plugins_deepgram-1.0.0rc9.dist-info/RECORD,,
|
{livekit_plugins_deepgram-1.0.0rc9.dist-info → livekit_plugins_deepgram-1.0.2.dist-info}/WHEEL
RENAMED
File without changes
|