@charivo/server 0.10.2 → 0.12.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 +7 -1
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -51,6 +51,8 @@ const tts = createGeminiTTSProvider({
51
51
  defaultModel: "gemini-3.1-flash-tts-preview",
52
52
  defaultVoice: "Kore",
53
53
  // `@charivo/tts/remote` gives up at 30s, so the server must give up first.
54
+ // On the streaming path this same 25s also caps the streamed body itself,
55
+ // at roughly 80s of audio (Gemini delivers ~3.5x realtime).
54
56
  timeoutMs: 25_000,
55
57
  });
56
58
 
@@ -80,7 +82,11 @@ mitigations. Its 90s default `timeoutMs` is only for callers that own their
80
82
  own deadline — a route behind `@charivo/tts/remote` must set it below that
81
83
  player's fixed 30s, as above — and the text cap is the real latency control
82
84
  on top of that deadline (the demo caps at 400 characters via
83
- `TTS_GEMINI_MAX_TEXT_CHARS`).
85
+ `TTS_GEMINI_MAX_TEXT_CHARS`). `generateSpeechStream` returns a `TTSPcmStream`
86
+ of `pcm-s16le` audio instead of a finished buffer, delivering its first audio
87
+ in roughly 1.1-1.4s regardless of text length; the same `timeoutMs` bounds
88
+ that whole streamed body, not just the connect-and-headers phase, so a reply
89
+ that outlasts it errors mid-utterance rather than merely failing to start.
84
90
 
85
91
  `createGeminiSTTProvider` (implemented in `@charivo/stt/gemini`) posts the
86
92
  recording inline as base64 to `models/{model}:generateContent`; the default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charivo/server",
3
- "version": "0.10.2",
3
+ "version": "0.12.0",
4
4
  "description": "Server-side provider adapters for Charivo",
5
5
  "exports": {
6
6
  "./openai": {
@@ -31,10 +31,10 @@
31
31
  "api-route"
32
32
  ],
33
33
  "dependencies": {
34
- "@charivo/core": "^0.34.0",
35
- "@charivo/llm": "^0.11.1",
36
- "@charivo/stt": "^0.10.0",
37
- "@charivo/tts": "^0.8.1"
34
+ "@charivo/core": "^0.36.0",
35
+ "@charivo/llm": "^0.12.0",
36
+ "@charivo/stt": "^0.10.2",
37
+ "@charivo/tts": "^0.9.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "tsup": "^8.5.0",