livekit-plugins-neuphonic 1.0.19__py3-none-any.whl → 1.0.21__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.
@@ -12,6 +12,11 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ """Neuphonic plugin for LiveKit Agents
16
+
17
+ See https://docs.livekit.io/agents/integrations/tts/neuphonic/ for more information.
18
+ """
19
+
15
20
  from .tts import TTS, ChunkedStream
16
21
  from .version import __version__
17
22
 
@@ -134,9 +134,14 @@ class TTS(tts.TTS):
134
134
  num_channels=NUM_CHANNELS,
135
135
  )
136
136
 
137
- neuphonic_api_key = api_key if is_given(api_key) else os.environ.get("NEUPHONIC_API_TOKEN")
137
+ neuphonic_api_key = (
138
+ api_key
139
+ if is_given(api_key)
140
+ else os.environ.get("NEUPHONIC_API_KEY") or os.environ.get("NEUPHONIC_API_TOKEN")
141
+ )
142
+
138
143
  if not neuphonic_api_key:
139
- raise ValueError("API key must be provided or set in NEUPHONIC_API_TOKEN")
144
+ raise ValueError("API key must be provided or set in NEUPHONIC_API_KEY")
140
145
 
141
146
  self._opts = _TTSOptions(
142
147
  model=model,
@@ -366,7 +371,14 @@ class SynthesizeStream(tts.SynthesizeStream):
366
371
  )
367
372
 
368
373
  while True:
369
- msg = await ws.receive()
374
+ try:
375
+ msg = await ws.receive()
376
+ except Exception as e:
377
+ raise APIStatusError(
378
+ "Neuphonic connection closed unexpectedly",
379
+ request_id=request_id,
380
+ ) from e
381
+
370
382
  if msg.type in (
371
383
  aiohttp.WSMsgType.CLOSED,
372
384
  aiohttp.WSMsgType.CLOSE,
@@ -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.0.19"
15
+ __version__ = "1.0.21"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: livekit-plugins-neuphonic
3
- Version: 1.0.19
3
+ Version: 1.0.21
4
4
  Summary: Neuphonic inference plugin for LiveKit Agents
5
5
  Project-URL: Documentation, https://docs.livekit.io
6
6
  Project-URL: Website, https://livekit.io/
@@ -16,12 +16,14 @@ Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Topic :: Multimedia :: Sound/Audio
17
17
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
18
  Requires-Python: >=3.9.0
19
- Requires-Dist: livekit-agents>=1.0.19
19
+ Requires-Dist: livekit-agents>=1.0.21
20
20
  Description-Content-Type: text/markdown
21
21
 
22
- # LiveKit Plugins Neuphonic
22
+ # Neuphonic plugin for LiveKit Agents
23
23
 
24
- Agent Framework plugin for voice synthesis with [Neuphonic](https://neuphonic.com) API.
24
+ Support for voice synthesis with [Neuphonic](https://neuphonic.com).
25
+
26
+ See [https://docs.livekit.io/agents/integrations/tts/neuphonic/](https://docs.livekit.io/agents/integrations/tts/neuphonic/) for more information.
25
27
 
26
28
  ## Installation
27
29
 
@@ -0,0 +1,9 @@
1
+ livekit/plugins/neuphonic/__init__.py,sha256=QtlNAqYqv0gIHcVddh5INfdC1bnGkXErplWzhThtN3Q,1227
2
+ livekit/plugins/neuphonic/log.py,sha256=rAHz71IcbvPkixndXBVffPQsmWUKTLqRaYRuPIxO29w,72
3
+ livekit/plugins/neuphonic/models.py,sha256=Svfn_sWA3Q2ZXsPBXY-K5hslq5FE62hvyXBES2C3aSc,201
4
+ livekit/plugins/neuphonic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ livekit/plugins/neuphonic/tts.py,sha256=OIi6kqAJqqbczW1etEfy2-c244RqK2agm9kKalUdO28,14577
6
+ livekit/plugins/neuphonic/version.py,sha256=5lzQkS1jEPqreexacwMd18b2EOx7R5m8AQMKtQRBgC4,601
7
+ livekit_plugins_neuphonic-1.0.21.dist-info/METADATA,sha256=cTiACfSU9YYyW0g5rdPI08Zi3A0YADBK6hC4jE9sGLs,1315
8
+ livekit_plugins_neuphonic-1.0.21.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
+ livekit_plugins_neuphonic-1.0.21.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- livekit/plugins/neuphonic/__init__.py,sha256=mJnPVLsKAdUkdWuHWd16A0n2vsVBi3GjgNmB8gv9jjI,1097
2
- livekit/plugins/neuphonic/log.py,sha256=rAHz71IcbvPkixndXBVffPQsmWUKTLqRaYRuPIxO29w,72
3
- livekit/plugins/neuphonic/models.py,sha256=Svfn_sWA3Q2ZXsPBXY-K5hslq5FE62hvyXBES2C3aSc,201
4
- livekit/plugins/neuphonic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- livekit/plugins/neuphonic/tts.py,sha256=vRFkQl9sxI4lMeEWSvyQ8YWJcxX2N7eCG7e5fzTTgbM,14240
6
- livekit/plugins/neuphonic/version.py,sha256=UDC8ahmGgRkv-qMQUY3QibuuVevGMQ9Fd4yIhcQBZwA,601
7
- livekit_plugins_neuphonic-1.0.19.dist-info/METADATA,sha256=yI87agWYMrwzj-2r_DqBWzslcapafrHMhwva8MXOb7M,1176
8
- livekit_plugins_neuphonic-1.0.19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
- livekit_plugins_neuphonic-1.0.19.dist-info/RECORD,,