@sentry/junior-tts 0.267.0 → 0.269.0

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.
Files changed (2) hide show
  1. package/README.md +4 -60
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,71 +1,15 @@
1
1
  # @sentry/junior-tts
2
2
 
3
- Generate WAV narration through Vercel AI Gateway with `google/gemini-3.8-flash-tts`. Includes a reusable `junior-v1` voice preset and a short sample script. No OpenRouter account, Google key, SDK install, or voice cloning is needed.
3
+ Gemini narration for Junior through Vercel AI Gateway, with a reusable Junior voice preset.
4
4
 
5
- ## Setup
6
-
7
- ```sh
5
+ ```bash
8
6
  pnpm add @sentry/junior @sentry/junior-tts
9
7
  ```
10
8
 
11
- Register the package in the app's shared plugin set:
12
-
13
9
  ```ts
14
10
  import { defineJuniorPlugins } from "@sentry/junior";
15
- export const plugins = defineJuniorPlugins(["@sentry/junior-tts"]);
16
- ```
17
-
18
- Use the same plugin set for the app and `juniorNitro`. See [plugin setup](https://junior.sentry.dev/extend/).
19
-
20
- Set **`AI_GATEWAY_API_KEY` on the host deployment**. In Vercel, use the Junior app project's Settings → Environment Variables, select the intended environment, and mark the variable sensitive. Then redeploy with the plugin installed and registered. Do not paste the key into Slack, Git, `jr-rpc config`, or the Sandbox.
21
-
22
- An existing deployment API key can be reused if the team has speech access and credits. **This manifest does not reuse core's Vercel OIDC credential flow.** If the app uses only OIDC, an operator must provision a Gateway API key for this plugin. No new secret is needed when a suitable `AI_GATEWAY_API_KEY` already exists. Speech is in beta; availability can differ by team.
23
-
24
- The host proxy inserts the bearer key only for `ai-gateway.vercel.sh`. The script neither reads nor accepts the key. This is a shared deployment account, not per-user authorization. Enable it only where users may spend that account's credits. Use a dedicated key with a spending limit when isolation is needed. Rotate the key in Vercel, replace the deployment value, and redeploy.
25
-
26
- The domain permission covers the Gateway host, not only the speech route. The bundled script uses one fixed speech endpoint and refuses redirects; it does not create an endpoint-level credential restriction.
27
-
28
- ## Junior Voice
29
-
30
- `skills/tts/assets/junior-v1.json` pairs the prebuilt `Puck` voice with sustained delivery instructions: bright, warm, quietly confident, lightly raspy, mischievous, and gently snarky. It is an original adult helper voice, not an imitation of a character or performer.
31
-
32
- The preset translates the supplied Junior persona into performance cues. It does not transmit the full persona or unrelated user-specific instructions. Model and voice selection are pinned in the preset; style is sent separately as `instructions`, never prepended to the spoken text. Reusing a preset does not guarantee identical audio across provider updates.
33
11
 
34
- Use `--delivery plain` for serious or sensitive material. It keeps the same voice but removes teasing and dramatic delivery. Version a changed voice identity as a new preset rather than silently changing `junior-v1` after it is accepted.
35
-
36
- ## Generate the Sample
37
-
38
- From the skill directory, with the plugin active:
39
-
40
- ```sh
41
- node scripts/speech.mjs --profile
42
- node scripts/speech.mjs --sample --output /tmp/junior-sample.wav
43
- node scripts/speech.mjs --text-file /tmp/narration.txt --output /tmp/narration.wav
44
- node scripts/speech.mjs --text-file /tmp/incident.txt --output /tmp/incident.wav --delivery plain
45
- ```
46
-
47
- Sample text:
48
-
49
- > Hey, I'm Junior. I check the evidence, do the work, and keep the recap short. Fewer mystery errors. Fewer meetings about mystery errors. That's the dream, anyway. Show me what you're building. Let's make it work.
50
-
51
- The sample is a generation recipe, **not a recorded or listening-approved sample**. A real clip requires an active plugin, a funded key, and team model access. Share generated audio with `sendFiles`; for PR evidence, link the delivered sample or an approved artifact location. Do not label synthetic narration as a recording by a person.
52
-
53
- ## Request Contract
54
-
55
- - Fixed REST endpoint: `https://ai-gateway.vercel.sh/v4/ai/speech-model`.
56
- - Headers: Gateway protocol `0.0.1`, speech model specification `4`, selected model ID. Authorization is host-managed.
57
- - Request: `text`, `voice`, `instructions`, and `outputFormat: wav`.
58
- - Response: JSON with base64 `audio`; decode before saving. This is **not** OpenRouter's raw-audio endpoint.
59
- - Maximum: 5,000 characters per clip, a local limit. Split longer scripts into scenes.
60
- - Exclusive output creation avoids overwrites. Failures remove incomplete local files; an abrupt process exit can leave a reserved file that needs inspection.
61
- - No automatic retry. A timeout or local validation failure after the request can still spend credits. Check Gateway usage before an authorized retry.
62
- - Provider warnings fail generation rather than silently dropping voice instructions.
63
- - The requested text and voice directions go to Vercel and its model provider. This plugin does not promise zero retention.
64
-
65
- No deployment changes or keys are included. Unit/component checks use a mocked HTTP edge and do not spend credits:
66
-
67
- ```sh
68
- pnpm --filter @sentry/junior-tts test
12
+ export const plugins = defineJuniorPlugins(["@sentry/junior-tts"]);
69
13
  ```
70
14
 
71
- References: [Vercel TTS](https://vercel.com/docs/ai-gateway/modalities/text-to-speech), [Gemini TTS launch](https://vercel.com/changelog/gemini-3-8-text-to-speech-models-now-available-on-ai-gateway).
15
+ Setup and configuration: https://junior.sentry.dev/extend/tts-plugin/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-tts",
3
- "version": "0.267.0",
3
+ "version": "0.269.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"