Skip to content

Commit 648c850

Browse files
davidzhaojayeshp19
andauthored
fix Neuphonic CI, export key from GH secrets (#1642)
Co-authored-by: jayesh <jayeshparmar9829@gmail.com>
1 parent e0081f1 commit 648c850

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

.changeset/young-ties-suffer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"livekit-plugins-neuphonic": patch
3+
---
4+
5+
rename NEUPHONIC_API_TOKEN to NEUPHONIC_API_KEY

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ jobs:
118118
PYTEST_ADDOPTS: "--color=yes"
119119
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
120120
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
121+
NEUPHONIC_API_KEY: ${{ secrets.NEUPHONIC_API_KEY }}
121122
working-directory: tests
122123
run: |
123124
echo "$GOOGLE_CREDENTIALS_JSON" > google.json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ We've partnered with OpenAI on a new `MultimodalAgent` API in the Agents framewo
102102
| Deepgram | livekit-plugins-deepgram || | [deepgram.TTS()](https://docs.livekit.io/python/livekit/plugins/deepgram/index.html#livekit.plugins.deepgram.TTS) |
103103
| Play.ai | livekit-plugins-playai ||| [playai.TTS()](https://docs.livekit.io/python/livekit/plugins/playai/index.html#livekit.plugins.playai.TTS) |
104104
| Rime | livekit-plugins-rime || | [rime.TTS()](https://docs.livekit.io/python/livekit/plugins/rime/index.html#livekit.plugins.rime.TTS) |
105-
| Neuphonic | livekit-plugins-neuphonic ||| neuphonic.TTS() |
105+
| Neuphonic | livekit-plugins-neuphonic ||| [neuphonic.TTS()](https://docs.livekit.io/python/livekit/plugins/neuphonic/index.html#livekit.plugins.neuphonic.TTS) |
106106
| AWS Polly | livekit-plugins-aws || | [aws.TTS()](https://docs.livekit.io/python/livekit/plugins/aws/index.html#livekit.plugins.aws.TTS) |
107107

108108
### Other plugins

livekit-plugins/livekit-plugins-neuphonic/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ pip install livekit-plugins-neuphonic
1010

1111
## Pre-requisites
1212

13-
You'll need an API key from Neuphonic. It can be set as an environment variable: `NEUPHONIC_API_TOKEN`
13+
You'll need an API key from Neuphonic. It can be set as an environment variable: `NEUPHONIC_API_KEY`

livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/tts.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def __init__(
130130
encoding (TTSEncodings | str, optional): The audio encoding format. Defaults to "pcm_mulaw".
131131
speed (float, optional): The audio playback speed. Defaults to 1.0.
132132
sample_rate (int, optional): The audio sample rate in Hz. Defaults to 22050.
133-
api_key (str | None, optional): The Neuphonic API key. If not provided, it will be read from the NEUPHONIC_API_TOKEN environment variable.
133+
api_key (str | None, optional): The Neuphonic API key. If not provided, it will be read from the NEUPHONIC_API_KEY environment variable.
134134
http_session (aiohttp.ClientSession | None, optional): An existing aiohttp ClientSession to use. If not provided, a new session will be created.
135135
base_url (str, optional): The base URL for the Neuphonic API. Defaults to "api.neuphonic.com".
136136
"""
@@ -140,10 +140,12 @@ def __init__(
140140
num_channels=NUM_CHANNELS,
141141
)
142142

143-
api_key = api_key or os.environ.get("NEUPHONIC_API_TOKEN")
143+
api_key = api_key or os.environ.get("NEUPHONIC_API_KEY")
144144

145145
if not api_key:
146-
raise ValueError("NEUPHONIC_API_TOKEN must be set")
146+
raise ValueError(
147+
"NEUPHONIC_API_KEY must be set using the argument or by setting the NEUPHONIC_API_KEY environment variable."
148+
)
147149

148150
self._opts = _TTSOptions(
149151
model=model,

0 commit comments

Comments
 (0)