livekit-plugins-spitch 1.2.2__py3-none-any.whl → 1.3.1__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/spitch/stt.py +10 -0
- livekit/plugins/spitch/tts.py +10 -1
- livekit/plugins/spitch/version.py +1 -1
- {livekit_plugins_spitch-1.2.2.dist-info → livekit_plugins_spitch-1.3.1.dist-info}/METADATA +3 -3
- livekit_plugins_spitch-1.3.1.dist-info/RECORD +9 -0
- livekit_plugins_spitch-1.2.2.dist-info/RECORD +0 -9
- {livekit_plugins_spitch-1.2.2.dist-info → livekit_plugins_spitch-1.3.1.dist-info}/WHEEL +0 -0
livekit/plugins/spitch/stt.py
CHANGED
|
@@ -32,6 +32,14 @@ class STT(stt.STT):
|
|
|
32
32
|
self._opts = _STTOptions(language=language)
|
|
33
33
|
self._client = AsyncSpitch()
|
|
34
34
|
|
|
35
|
+
@property
|
|
36
|
+
def model(self) -> str:
|
|
37
|
+
return "unknown"
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def provider(self) -> str:
|
|
41
|
+
return "Spitch"
|
|
42
|
+
|
|
35
43
|
def update_options(self, language: str):
|
|
36
44
|
self._opts.language = language or self._opts.language
|
|
37
45
|
|
|
@@ -50,9 +58,11 @@ class STT(stt.STT):
|
|
|
50
58
|
try:
|
|
51
59
|
config = self._sanitize_options(language=language or None)
|
|
52
60
|
data = rtc.combine_audio_frames(buffer).to_wav_bytes()
|
|
61
|
+
model = "mansa_v1" if config.language == "en" else "legacy"
|
|
53
62
|
resp = await self._client.speech.transcribe(
|
|
54
63
|
language=config.language, # type: ignore
|
|
55
64
|
content=data,
|
|
65
|
+
model=model,
|
|
56
66
|
timeout=httpx.Timeout(30, connect=conn_options.timeout),
|
|
57
67
|
)
|
|
58
68
|
|
livekit/plugins/spitch/tts.py
CHANGED
|
@@ -18,7 +18,7 @@ from spitch import AsyncSpitch
|
|
|
18
18
|
|
|
19
19
|
SAMPLE_RATE = 24_000
|
|
20
20
|
NUM_CHANNELS = 1
|
|
21
|
-
MIME_TYPE = "audio/
|
|
21
|
+
MIME_TYPE = "audio/mpeg"
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
@dataclass
|
|
@@ -36,6 +36,14 @@ class TTS(tts.TTS):
|
|
|
36
36
|
self._opts = _TTSOptions(language=language, voice=voice)
|
|
37
37
|
self._client = AsyncSpitch()
|
|
38
38
|
|
|
39
|
+
@property
|
|
40
|
+
def model(self) -> str:
|
|
41
|
+
return "unknown"
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def provider(self) -> str:
|
|
45
|
+
return "Spitch"
|
|
46
|
+
|
|
39
47
|
def synthesize(
|
|
40
48
|
self,
|
|
41
49
|
text: str,
|
|
@@ -70,6 +78,7 @@ class ChunkedStream(tts.ChunkedStream):
|
|
|
70
78
|
text=self.input_text,
|
|
71
79
|
language=self._opts.language, # type: ignore
|
|
72
80
|
voice=self._opts.voice, # type: ignore
|
|
81
|
+
format="mp3",
|
|
73
82
|
timeout=httpx.Timeout(30, connect=self._conn_options.timeout),
|
|
74
83
|
)
|
|
75
84
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: livekit-plugins-spitch
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.1
|
|
4
4
|
Summary: spitch plugin template for LiveKit Agents
|
|
5
5
|
Project-URL: Documentation, https://docs.livekit.io
|
|
6
6
|
Project-URL: Website, https://livekit.io/
|
|
7
7
|
Project-URL: Source, https://github.com/livekit/agents
|
|
8
8
|
Author: LiveKit
|
|
9
9
|
License-Expression: Apache-2.0
|
|
10
|
-
Keywords: audio,livekit,realtime,video,webrtc
|
|
10
|
+
Keywords: ai,audio,livekit,realtime,video,voice,webrtc
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -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.
|
|
21
|
+
Requires-Dist: livekit-agents[codecs]>=1.3.1
|
|
22
22
|
Requires-Dist: spitch
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
livekit/plugins/spitch/__init__.py,sha256=QBKbjYlOHAEOd9R7XlkbrLEi0GAMEyHseNOru1x74PU,1090
|
|
2
|
+
livekit/plugins/spitch/log.py,sha256=2VykVr41ZII-NHzy0Ih2ZHUpjAYB1fWRb_7LE3xMKI8,69
|
|
3
|
+
livekit/plugins/spitch/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
livekit/plugins/spitch/stt.py,sha256=wuTxS66TwpiR7N-SscU7NvL-bjVn-AcpC9E4x75S3Fw,2405
|
|
5
|
+
livekit/plugins/spitch/tts.py,sha256=W6-kkFsAml2pLQAOHxJdqk1GSTCQqT6BuAMWbQjCxG8,2871
|
|
6
|
+
livekit/plugins/spitch/version.py,sha256=5doxkSy8KW3atfzmsaZS5fV7Vec01QWf9pQeD6IN5j8,599
|
|
7
|
+
livekit_plugins_spitch-1.3.1.dist-info/METADATA,sha256=pjIKxWP3dFJwAWMZvqkcMns5smoRB16oz_u6firplqg,1481
|
|
8
|
+
livekit_plugins_spitch-1.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
9
|
+
livekit_plugins_spitch-1.3.1.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
livekit/plugins/spitch/__init__.py,sha256=QBKbjYlOHAEOd9R7XlkbrLEi0GAMEyHseNOru1x74PU,1090
|
|
2
|
-
livekit/plugins/spitch/log.py,sha256=2VykVr41ZII-NHzy0Ih2ZHUpjAYB1fWRb_7LE3xMKI8,69
|
|
3
|
-
livekit/plugins/spitch/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
livekit/plugins/spitch/stt.py,sha256=lQsiOx9sjh5csI3R2ER-SqTb610UnW0dmF-OHFLqNeA,2166
|
|
5
|
-
livekit/plugins/spitch/tts.py,sha256=faaj24PePvy6seODQRdK2biYjxywpCRujTZ8GGUlQeY,2706
|
|
6
|
-
livekit/plugins/spitch/version.py,sha256=OOez4_yMBz_28O74243ayqXPMNozZjweGPTlYP7VdBM,599
|
|
7
|
-
livekit_plugins_spitch-1.2.2.dist-info/METADATA,sha256=KwpCa3vbInwlBZObwCvdLwUoThOJW1XCL5Vi8UQcHEw,1472
|
|
8
|
-
livekit_plugins_spitch-1.2.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
9
|
-
livekit_plugins_spitch-1.2.2.dist-info/RECORD,,
|
|
File without changes
|